-
Notifications
You must be signed in to change notification settings - Fork 1.8k
140 lines (130 loc) · 4.33 KB
/
build.yaml
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: CI
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt-get update -qq
- run: sudo apt-get install -qq nasm g++-multilib gcc-multilib libc6-dev-i386 python3-pip python3-setuptools
- run: sudo python3 -m pip install meson==0.52.1 ninja
- run: nasm -v
- run: c++ --version
- run: make gmp-bootstrap
- run: make gtest-bootstrap
- run: meson builddir --werror
- run: ninja -C builddir -v
- run: ( cd test/encoder_binary_comparison ; CFLAGS=-Werror ./run_PrepareAllTestData.sh 64 )
- run: meson test -C builddir -v
- run: ./run_Test.sh BinaryCompare BA_MW_D.264
- run: ./run_Test.sh BinaryCompare Adobe_PDF_sample_a_1024x768_50Frms.264
- run: ./run_Test.sh BinaryCompare Zhling_1280x720.264
asan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt-get update -qq
- run: sudo apt-get install -qq nasm
- run: nasm -v
- run: c++ --version
- run: make gtest-bootstrap
- run: LDFLAGS=-fsanitize=address CFLAGS=-fsanitize=address make -j$(nproc)
- run: ./codec_unittest
windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- run: choco install nasm
# nasm is not installed into the $PATH so add it manually
- run: echo "C:\Program Files\NASM" >> $env:GITHUB_PATH
- run: nasm -v
- run: make OS=msvc gmp-bootstrap
- run: make OS=msvc gtest-bootstrap
- working-directory: ./build
env:
CFLAGS: -WX
run: ./AutoBuildForWindows.bat
- run: ./bin/Win32/Release/codec_unittest.exe
mingw:
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
install: >-
git
make
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-nasm
mingw-w64-x86_64-meson
- uses: actions/checkout@v3
- run: c++ --version
- run: make gmp-bootstrap
- run: make gtest-bootstrap
# disable Werror on gcc 12 until #3533 is fixed.
#- run: CFLAGS=-Werror make -j$(nproc) all plugin test
- run: make -j$(nproc) all plugin test
#- run: meson builddir --werror
- run: meson builddir
- run: ninja -C builddir -v
- run: meson test -C builddir -v
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- run: brew install nasm meson
- run: make gmp-bootstrap
- run: make gtest-bootstrap
- run: nasm -v
- run: c++ --version
- run: CFLAGS=-Werror make -j$(sysctl -n hw.ncpu) all plugin test
- run: meson builddir --werror
- run: ninja -C builddir -v
- run: meson test -C builddir -v
linux-cross-arm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt-get update -qq
- run: sudo apt-get install -qq g++-arm-linux-gnueabihf g++-aarch64-linux-gnu qemu-user
- run: arm-linux-gnueabihf-g++ --version
- run: make gmp-bootstrap
- run: make gtest-bootstrap
- run: CFLAGS=-Werror make -j$(nproc) ARCH=armv7 CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++
- run: CFLAGS=-Werror make clean
- run: CFLAGS=-Werror make -j$(nproc) ARCH=aarch64 CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++
- run: qemu-aarch64 -L /usr/aarch64-linux-gnu/ ./codec_unittest
macos-cross-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- run: make gmp-bootstrap
- run: make gtest-bootstrap
- run: c++ --version
- run: CFLAGS=-Werror make -j$(sysctl -n hw.ncpu) ARCH=arm64
fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'openh264'
language: c++
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'openh264'
language: c++
fuzz-seconds: 600
- name: Upload Crash
uses: actions/upload-artifact@v1
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts