-
Notifications
You must be signed in to change notification settings - Fork 1
114 lines (97 loc) · 5.35 KB
/
BuildAndTest.yml
File metadata and controls
114 lines (97 loc) · 5.35 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Build and test
on:
push:
release:
types:
- created
jobs:
build:
strategy:
matrix:
config: [ {os: windows-2025, copyCommand: copy, artifactName: integrationTestWindows, buildPath: Release/, dummyLib: dummyLib.dll, integrationTest: integrationTest.exe},
{os: windows-11-arm, copyCommand: copy, artifactName: integrationTestWindowsArm, buildPath: Release/, dummyLib: dummyLib.dll, integrationTest: integrationTest.exe},
{os: ubuntu-24.04, copyCommand: cp, artifactName: integrationTestUbuntu, buildPath: , dummyLib: libdummyLib.so, integrationTest: integrationTest},
{os: ubuntu-24.04-arm, copyCommand: cp, artifactName: integrationTestUbuntuArm, buildPath: , dummyLib: libdummyLib.so, integrationTest: integrationTest},
{os: macos-15, copyCommand: cp, artifactName: integrationTestMacArm, buildPath: , dummyLib: libdummyLib.dylib, integrationTest: integrationTest},
{os: macos-15-intel, copyCommand: cp, artifactName: integrationTestMacIntel, buildPath: , dummyLib: libdummyLib.dylib, integrationTest: integrationTest} ]
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B ${{ github.workspace }}/build -S ${{ github.workspace }} -DENABLE_TEST=ON
- name: Build
run: cmake --build ${{ github.workspace }}/build -j 4 --config Release
- name: Unit tests
run: |
${{ matrix.config.copyCommand }} ${{ github.workspace }}/build/test/dummyLib/${{ matrix.config.buildPath }}${{ matrix.config.dummyLib }} ${{ github.workspace }}/build/test/unit/${{ matrix.config.buildPath }}
cd ${{ github.workspace }}/build/test/unit/${{ matrix.config.buildPath }}
./unitTest
- uses: actions/upload-artifact@master
with:
name: ${{ matrix.config.artifactName }}
path: ${{ github.workspace }}/build/test/integration/${{ matrix.config.buildPath }}${{ matrix.config.integrationTest }}
testFFmpegVersions:
needs: build
strategy:
matrix:
config: [ {os: windows-2025, artifactName: integrationTestWindows, unzipCommand: 7z x },
{os: windows-11-arm, artifactName: integrationTestWindowsArm, unzipCommand: 7z x },
{os: ubuntu-24.04, artifactName: integrationTestUbuntu, unzipCommand: unzip },
{os: ubuntu-24.04-arm, artifactName: integrationTestUbuntuArm, unzipCommand: unzip },
{os: macos-15, artifactName: integrationTestMacArm, unzipCommand: unzip },
{os: macos-15-intel, artifactName: integrationTestMacIntel, unzipCommand: unzip } ]
ffmpegVersions: ["2.8.22", "3.4.14", "4.4.6", "5.1.8", "6.1.4", "7.0.3", "8.0.1"]
exclude:
# I did not manage to compile the older ffmpeg versions an windows ARM
# Let me know if you manage to do so.
- ffmpegVersions: "2.8.22"
config: {os: windows-11-arm, artifactName: integrationTestWindowsArm, unzipCommand: 7z x }
- ffmpegVersions: "3.4.14"
config: {os: windows-11-arm, artifactName: integrationTestWindowsArm, unzipCommand: 7z x }
runs-on: ${{ matrix.config.os }}
continue-on-error: true
steps:
- uses: actions/download-artifact@master
with:
name: ${{ matrix.config.artifactName }}
- name: Make integrationTest executable
run: chmod a+x integrationTest
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: Download FFmpeg
run: |
curl -L "${{ secrets.AZURE_BLOB_ROOT_PATH }}ffmpeg/github/ffmpeg-${{ matrix.ffmpegVersions }}-${{ matrix.config.os }}.zip?${{ secrets.AZURE_BLOB_TOKEN }}" -o ffmpeg.zip
curl -L "${{ secrets.AZURE_BLOB_ROOT_PATH }}bitstream-testfiles/TestFile_h264_aac_1s_320x240.mp4?${{ secrets.AZURE_BLOB_TOKEN }}" -o TestFile_h264_aac_1s_320x240.mp4
${{ matrix.config.unzipCommand }} ffmpeg.zip
rm ffmpeg.zip
- name: Run integration tests
run: ./integrationTest
testFFmpegNativeInstall:
needs: build
strategy:
matrix:
config: [ {os: windows-2025, artifactName: integrationTestWindows},
{os: ubuntu-24.04, artifactName: integrationTestUbuntu},
{os: ubuntu-24.04-arm, artifactName: integrationTestUbuntuArm},
{os: macos-15, artifactName: integrationTestMacArm},
{os: macos-15-intel, artifactName: integrationTestMacIntel} ]
runs-on: ${{ matrix.config.os }}
continue-on-error: true
steps:
- uses: actions/download-artifact@master
with:
name: ${{ matrix.config.artifactName }}
- uses: ConorMacBride/install-package@main
with:
brew: ffmpeg
apt: ffmpeg
choco: ffmpeg-shared
- name: Make integrationTest executable
run: chmod a+x integrationTest
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: Add ffmpeg to path
run: echo "C:\ProgramData\chocolatey\lib\ffmpeg-shared\tools\ffmpeg-8.0.1-full_build-shared\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
if: runner.os == 'Windows'
- name: Download Test files
run: curl -L "${{ secrets.AZURE_BLOB_ROOT_PATH }}bitstream-testfiles/TestFile_h264_aac_1s_320x240.mp4?${{ secrets.AZURE_BLOB_TOKEN }}" -o TestFile_h264_aac_1s_320x240.mp4
- name: Run integration tests
run: ./integrationTest