generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 56
302 lines (263 loc) · 10 KB
/
ci.yml
File metadata and controls
302 lines (263 loc) · 10 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
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
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-15-intel
- name: Mac Apple Silicon
runner: macos-15
compiler:
# - gcc # Fragile builds due to homebrew GCC being compiled using different MacOSX SDK version
- 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-22.04
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 cmake build-essential automake git clang
- name: Check installed clang versions
run: |
ls /usr/bin/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:
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
runs-on: ubuntu-latest
container: public.ecr.aws/ubuntu/ubuntu:20.04
env:
DEBIAN_FRONTEND: noninteractive
CC: gcc-4.4
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Install deps
run: |
apt-get -q update
apt-get install -y software-properties-common build-essential cmake git
add-apt-repository -y ppa:ubuntu-toolchain-r/test
add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty main'
add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty universe'
apt-get -q update
apt-get -y install gcc-4.4
- name: Build repository
run: |
mkdir build && cd build
cmake .. ${{ matrix.config.cmake_flags }}
make -j
- name: Run tests
working-directory: ./build
run: |
timeout --signal=SIGABRT 40m ./tst/kvspic_test --gtest_filter="${{ env.TEST_FILTER }}"
al2:
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
runs-on: ubuntu-latest
container: public.ecr.aws/sam/build-provided.al2:1.137.1-x86_64
steps:
- name: Clone repository
uses: actions/checkout@v1
- name: Install deps
run: |
yum update -y
yum install -y cmake3 which
ln -s /usr/bin/cmake3 /usr/local/bin/cmake
- name: Check GCC version
run: |
gcc --version
which gcc
gcc -v
- name: Check CMake version
run: |
cmake --version
which cmake
- name: Build repository
run: |
mkdir build
cd build
cmake .. ${{ matrix.config.cmake_flags }}
make -j
- name: Run tests
working-directory: ./build
run: |
# 2400s = 40m
timeout 2400 ./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)
cmake-flags-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run CMake Flag Combination Test
run: |
./tst/scripts/test_cmake_flags.sh >> $GITHUB_STEP_SUMMARY
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*"