forked from AOMediaCodec/libavif
-
Notifications
You must be signed in to change notification settings - Fork 3
78 lines (70 loc) · 3.05 KB
/
ci-linux-golden-tests.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
# Workflow that builds libabvif with aom and libyuv, also builds MP4box,
# and runs tests with "golden" in their name. Test results are saved as artifacts
# which can be downloaded from GitHub'S UI or with 'gh run download'.
name: CI Linux Golden Tests
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-shared-run-golden-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
include:
- runs-on: ubuntu-24.04
compiler: gcc
gcc: 14
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/setup-linux
id: setup
with:
codec-aom: "LOCAL"
codec-dav1d: "LOCAL"
gcc-version: ${{ matrix.gcc }}
libxml2: "LOCAL"
libyuv: "LOCAL"
- name: Build mp4box
if: steps.setup.outputs.ext-cache-hit != 'true'
working-directory: ./ext
run: bash -e mp4box.sh
- name: Prepare libavif (cmake)
run: >
cmake -G Ninja -S . -B build
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
-DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=LOCAL
-DAVIF_BUILD_EXAMPLES=ON -DAVIF_BUILD_APPS=ON
-DAVIF_ENABLE_EXPERIMENTAL_GAIN_MAP=ON
-DAVIF_LIBXML2=LOCAL
-DAVIF_BUILD_TESTS=ON -DAVIF_ENABLE_GOLDEN_TESTS=ON
-DAVIF_ENABLE_GTEST=OFF -DAVIF_ENABLE_WERROR=ON
-DGOLDEN_TESTS_OUTPUT_DIR=${{ runner.temp }}/golden_tests
- name: Build libavif (ninja)
working-directory: ./build
run: ninja
- name: Run AVIF golden tests
working-directory: ./build
# Runs test that have "golden" in their name.
run: ctest -j $(getconf _NPROCESSORS_ONLN) --output-on-failure -R golden
# See https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
- name: Archive golden tests output for debugging
if: failure()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: golden-tests-output
path: ${{ runner.temp }}/golden_tests/**/*
# Print instructions to help fix the tests.
- name: How to fix failing tests
if: failure()
run: >
echo "If the tests fail, download the test results from the Artifacts list at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} or with:
gh run download --dir /tmp/golden-tests-output-${{ github.run_id }} --repo ${{ github.repository }} --name golden-tests-output ${{ github.run_id }}
Update all files with:
cp /tmp/golden-tests-output-${{ github.run_id }}/*/*.xml ~/git/libavif/tests/data/goldens
Or look at detailed instructions in the README.txt file in the test ouputs."