-
Notifications
You must be signed in to change notification settings - Fork 51
230 lines (210 loc) · 8.31 KB
/
ci.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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
name: PIC CI
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master
env:
AWS_KVS_LOG_LEVEL: 2
TEST_FILTER: "-TimerQueueFunctionalityTest.*:HeapPerfTest.*"
jobs:
mac-tests:
strategy:
matrix:
os:
- name: Mac Intel
runner: macos-13
- name: Mac Apple Silicon
runner: macos-15
compiler: [ gcc, clang ]
config:
- name: Default Build
cmake_flags: "-DBUILD_TEST=TRUE"
- name: Aligned Memory Model Build
cmake_flags: "-DBUILD_TEST=TRUE -DALIGNED_MEMORY_MODEL=TRUE -DFIXUP_ANNEX_B_TRAILING_NALU_ZERO=TRUE"
fail-fast: false
runs-on: ${{ matrix.os.runner }}
name: ${{ matrix.os.name }}, ${{ matrix.compiler }}, ${{ matrix.config.name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure and build ${{ matrix.config.name }}
run: |
if [[ "${{ matrix.compiler }}" == "gcc" ]]; then
export CC="gcc-14"
export CXX="g++-14"
else
export CC="clang"
export CXX="clang++"
fi
echo "Using $CC and $CXX"
mkdir -p build
cd build
cmake .. ${{ matrix.config.cmake_flags }}
make -j$(sysctl -n hw.ncpu)
shell: bash
- name: Run tests
run: |
cd build
./tst/kvspic_test --gtest_filter="${{ env.TEST_FILTER }}"
shell: bash
linux-gcc-code-coverage:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Build repository
run: |
mkdir build && cd build
cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE
make
- name: Run tests
run: |
cd build
ulimit -c unlimited -S
timeout --signal=SIGABRT 40m ./tst/kvspic_test --gtest_filter="${{ env.TEST_FILTER }}"
- name: Build With ALIGNED_MEMORY_MODEL and FIXUP_ANNEX_B_TRAILING_NALU_ZERO definitions TRUE
run: |
rm -rf build
mkdir build && cd build
cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE -DALIGNED_MEMORY_MODEL=TRUE -DFIXUP_ANNEX_B_TRAILING_NALU_ZERO=TRUE
make
- name: Run tests
run: |
cd build
ulimit -c unlimited -S
timeout --signal=SIGABRT 40m ./tst/kvspic_test --gtest_filter="${{ env.TEST_FILTER }}"
- name: Code coverage
run: |
for test_file in $(find CMakeFiles/kvspic.dir CMakeFiles/kvspicClient.dir CMakeFiles/kvspicState.dir CMakeFiles/kvspicUtils.dir -name '*.gcno'); do gcov $test_file; done
bash <(curl -s https://codecov.io/bash)
linux-sanitizers:
strategy:
matrix:
sanitizer:
- ADDRESS_SANITIZER
- UNDEFINED_BEHAVIOR_SANITIZER
- THREAD_SANITIZER
# - MEMORY_SANITIZER
config:
- name: Default Build
cmake_flags: "-DBUILD_TEST=TRUE"
- name: Aligned Memory Model Build
cmake_flags: "-DBUILD_TEST=TRUE -DALIGNED_MEMORY_MODEL=TRUE -DFIXUP_ANNEX_B_TRAILING_NALU_ZERO=TRUE"
fail-fast: false
runs-on: ubuntu-latest
env:
CC: clang
CXX: clang++
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install clang
- name: Build repository - ${{ matrix.config.name }}
run: |
mkdir -p build
cd build
cmake .. -D${{ matrix.sanitizer }}=TRUE ${{ matrix.config.cmake_flags }}
make
- name: Configure sanitizers
run: |
if [[ "${{ matrix.sanitizer }}" == "UNDEFINED_BEHAVIOR_SANITIZER" ]]; then
echo "UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1:suppressions=../../tst/suppressions/UBSAN.supp" >> $GITHUB_ENV
elif [[ "${{ matrix.sanitizer }}" == "THREAD_SANITIZER" ]]; then
echo "TSAN_OPTIONS=halt_on_error=1:suppressions=../../tst/suppressions/TSAN.supp" >> $GITHUB_ENV
fi
- name: Run tests - ${{ matrix.config.name }}
run: |
cd build
ulimit -c unlimited -S
timeout --signal=SIGABRT 40m ./tst/kvspic_test --gtest_filter="${{ env.TEST_FILTER }}"
linux-gcc-4_4:
runs-on: ubuntu-20.04
strategy:
matrix:
config:
- name: Default Build
cmake_flags: "-DBUILD_TEST=TRUE"
- name: Aligned Memory Model Build
cmake_flags: "-DBUILD_TEST=TRUE -DALIGNED_MEMORY_MODEL=TRUE -DFIXUP_ANNEX_B_TRAILING_NALU_ZERO=TRUE"
fail-fast: false
env:
CC: gcc-4.4
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Install deps
run: |
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty main'
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty universe'
sudo apt-get -q update
sudo apt-get -y install gcc-4.4
sudo apt-get -y install gdb
- name: Build repository
run: |
mkdir build && cd build
cmake .. ${{ matrix.config.cmake_flags }}
make
- name: Run tests
run: |
cd build
ulimit -c unlimited -S
timeout --signal=SIGABRT 40m ./tst/kvspic_test --gtest_filter="${{ env.TEST_FILTER }}"
arm-cross-compilation:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ arm32, arm64 ]
config:
- name: Default Build
cmake_flags: "-DBUILD_TEST=TRUE"
- name: Aligned Memory Model Build
cmake_flags: "-DBUILD_TEST=TRUE -DALIGNED_MEMORY_MODEL=TRUE -DFIXUP_ANNEX_B_TRAILING_NALU_ZERO=TRUE"
fail-fast: false
steps:
- name: Install dependencies
run: |
sudo apt update
if [[ "${{ matrix.arch }}" == "arm64" ]]; then
sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
else
sudo apt-get -y install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi binutils-arm-linux-gnueabi
fi
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Repository - ${{ matrix.arch }} - ${{ matrix.config.name }}
run: |
if [[ "${{ matrix.arch }}" == "arm64" ]]; then
export CC="aarch64-linux-gnu-gcc"
export CXX="aarch64-linux-gnu-g++"
else
export CC="arm-linux-gnueabi-gcc"
export CXX="arm-linux-gnueabi-g++"
fi
echo "Using compiler $CC and $CXX for ${{ matrix.arch }}"
mkdir -p build
cd build
cmake .. ${{ matrix.config.cmake_flags }}
make -j$(nproc)
windows-msvc:
runs-on: windows-2022
env:
AWS_KVS_LOG_LEVEL: 7
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Build and run
run: |
.github/build_windows.bat
- name: Run tests
run: |
D:\a\amazon-kinesis-video-streams-pic\amazon-kinesis-video-streams-pic\build\tst\kvspic_test.exe --gtest_filter="-TimerQueueFunctionalityTest.*:HeapPerfTest.*:PermutatedStreamInfo/StateTransitionFunctionalityTest.ControlPlaneServiceCallExhaustRetry*:PermutatedStreamInfo/IntermittentProducerAutomaticStreamingTest.ValidateTimerInvokedBeforeTime*:PermutatedStreamInfo/IntermittentProducerAutomaticStreamingTest.ValidateTimerInvokedAfterFirstPeriod*:PermutatedStreamInfo/IntermittentProducerAutomaticStreamingTest.ValidateLastUpdateTimeOfStreamUpdated*:PermutatedStreamInfo/IntermittentProducerAutomaticStreamingTest.MultiTrackVerifyNoInvocationsWithSingleTrackProducer*:PermutatedStreamInfo/IntermittentProducerAutomaticStreamingTest.ValidateNoConsecutiveEOFR*:PermutatedStreamInfo/IntermittentProducerAutomaticStreamingTest.ValidateErrorOnForceConsecutiveEOFR*:*StreamStateTransitionsTest*:*PermutatedStreamInfo/StateTransitionFunctionalityTest.StreamTerminatedAndGoToGetEndpointState*:*PermutatedStreamInfo/StateTransitionFunctionalityTest.StreamTerminatedAndGoToDescribeState*:*PermutatedStreamInfo/StateTransitionFunctionalityTest*"