-
Notifications
You must be signed in to change notification settings - Fork 208
84 lines (77 loc) · 2.4 KB
/
ci-mingw.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# This is a copy of ci-unix-shared-local.yml for building shared libraries
# with an additional build configuration (using installed deps and dav1d).
name: CI MinGW
on: [push, pull_request]
permissions:
contents: read
# Cancel the workflow if a new one is triggered from the same PR, branch, or tag, except on main.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build-mingw:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sys:
- mingw64
- ucrt64
- clang64
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: >-
git
pacboy: >-
aom:p
cmake:p
diffutils:p
cc:p
dav1d:p
imagemagick:p
libjpeg-turbo:p
libpng:p
libyuv:p
ninja:p
zlib:p
- name: Cache external dependencies
id: cache-ext
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ext
key: ${{ matrix.sys }}-mingw-${{ hashFiles('ext/*.cmd') }}
- name: Print cmake version
run: cmake --version
- name: Build libsharpyuv
if: steps.cache-ext.outputs.cache-hit != 'true'
working-directory: ./ext
run: ./libsharpyuv.cmd
- name: Build GoogleTest
if: steps.cache-ext.outputs.cache-hit != 'true'
working-directory: ./ext
run: ./googletest.cmd
- name: Prepare libavif (cmake)
run: >
mkdir build && cd build
cmake .. -G Ninja
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
-DAVIF_CODEC_AOM=SYSTEM
-DAVIF_CODEC_AOM_DECODE=OFF -DAVIF_CODEC_AOM_ENCODE=ON
-DAVIF_CODEC_DAV1D=SYSTEM
-DAVIF_LIBSHARPYUV=LOCAL -DAVIF_LIBYUV=SYSTEM
-DAVIF_BUILD_EXAMPLES=ON -DAVIF_BUILD_APPS=ON
-DAVIF_BUILD_TESTS=ON -DAVIF_ENABLE_GTEST=ON -DAVIF_LOCAL_GTEST=ON
-DAVIF_BUILD_GDK_PIXBUF=ON -DCMAKE_INSTALL_PREFIX=./install
- name: Build libavif (ninja)
working-directory: ./build
run: ninja
- name: Run AVIF Tests
working-directory: ./build
run: ctest -j $Env:NUMBER_OF_PROCESSORS --output-on-failure