-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
\# 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 | ||
- mingw32 | ||
- ucrt64 | ||
- clang64 | ||
|
||
steps: | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: ${{matrix.sys}} | ||
update: true | ||
install: >- | ||
cmake | ||
gcc | ||
git | ||
ninja | ||
pacboy: >- | ||
aom | ||
dav1d | ||
libyuv | ||
- name: Cache external dependencies | ||
id: cache-ext | ||
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | ||
with: | ||
path: ext | ||
key: ${{ runner.sys }}-mingw | ||
- name: Print cmake version | ||
run: cmake --version | ||
- name: Build GoogleTest | ||
if: steps.cache-ext.outputs.cache-hit != 'true' | ||
working-directory: ./ext | ||
run: bash -e googletest.cmd | ||
|
||
- name: Prepare libavif (cmake) | ||
run: > | ||
mkdir build && cd build | ||
cmake .. -G Ninja | ||
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON | ||
-DAVIF_CODEC_AOM=SYSTEM | ||
-DAVIF_CODEC_AOM_DECODE=OFF -DAVIF_CODEC_AOM_ENCODE=ON | ||
-DAVIF_CODEC_DAV1D=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 $(getconf _NPROCESSORS_ONLN) --output-on-failure | ||
- name: Install AVIF | ||
working-directory: ./build | ||
run: ninja install | ||
- name: Test installed cmake | ||
working-directory: ./build | ||
run: > | ||
mkdir test && cd test | ||
echo "cmake_minimum_required(VERSION 3.13) | ||
project(FindPackageTest) | ||
message(STATUS ${CMAKE_PREFIX_PATH}) | ||
find_package(libavif REQUIRED) | ||
if(TARGET avif) | ||
message(STATUS "\""avif found"\"") | ||
else() | ||
message(FATAL_ERROR "\""avif not found"\"") | ||
endif()" >> CMakeLists.txt | ||
cmake . -DCMAKE_PREFIX_PATH=../install |