Debian Codegraph @

crt/aws-c-common/.github/workflows/ci.yml

raw symbols SCIP
1 name: CI
2
3 on:
4 push:
5 branches-ignore:
6 - 'main'
7
8 env:
9 BUILDER_VERSION: v0.9.96
10 BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
11 BUILDER_SOURCE: releases
12 PACKAGE_NAME: aws-c-common
13 LINUX_BASE_IMAGE: ubuntu-18-x64
14 RUN: ${{ github.run_id }}-${{ github.run_number }}
15 CRT_CI_ROLE: ${{ secrets.CRT_CI_ROLE_ARN }}
16 AWS_DEFAULT_REGION: us-east-1
17
18 permissions:
19 id-token: write # This is required for requesting the JWT
20
21 jobs:
22 linux-compat:
23 runs-on: ubuntu-24.04 # latest
24 strategy:
25 fail-fast: false
26 matrix:
27 image:
28 - manylinux1-x64
29 - manylinux1-x86
30 - manylinux2014-x64
31 - manylinux2014-x86
32 - raspbian-bullseye
33 - fedora-34-x64
34 - opensuse-leap
35 - rhel8-x64
36 - al2-x64
37 steps:
38 - uses: aws-actions/configure-aws-credentials@v6
39 with:
40 role-to-assume: ${{ env.CRT_CI_ROLE }}
41 aws-region: ${{ env.AWS_DEFAULT_REGION }}
42 - name: Build ${{ env.PACKAGE_NAME }}
43 run: |
44 aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
45 docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
46 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }}
47
48 linux-compiler-compat:
49 runs-on: ubuntu-24.04 # latest
50 strategy:
51 matrix:
52 compiler:
53 - clang-6
54 - clang-8
55 - clang-9
56 - clang-10
57 - clang-11
58 - clang-15
59 - clang-17
60 - clang-latest
61 - gcc-4.8
62 - gcc-5
63 - gcc-6
64 - gcc-7
65 - gcc-8
66 - gcc-11
67 - gcc-13
68 steps:
69 - uses: aws-actions/configure-aws-credentials@v6
70 with:
71 role-to-assume: ${{ env.CRT_CI_ROLE }}
72 aws-region: ${{ env.AWS_DEFAULT_REGION }}
73 - name: Build ${{ env.PACKAGE_NAME }}
74 run: |
75 aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
76 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=${{ matrix.compiler }}
77
78 # Test downstream repos.
79 # This should not be required because we can run into a chicken and egg problem if there is a change that needs some fix in a downstream repo.
80 downstream:
81 runs-on: ubuntu-24.04 # latest
82 steps:
83 - uses: aws-actions/configure-aws-credentials@v6
84 with:
85 role-to-assume: ${{ env.CRT_CI_ROLE }}
86 aws-region: ${{ env.AWS_DEFAULT_REGION }}
87 - name: Build ${{ env.PACKAGE_NAME }}
88 run: |
89 aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
90 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build downstream -p ${{ env.PACKAGE_NAME }}
91
92 clang-sanitizers:
93 runs-on: ubuntu-24.04 # latest
94 strategy:
95 matrix:
96 sanitizers: [",thread", ",address,undefined"]
97 steps:
98 - uses: aws-actions/configure-aws-credentials@v6
99 with:
100 role-to-assume: ${{ env.CRT_CI_ROLE }}
101 aws-region: ${{ env.AWS_DEFAULT_REGION }}
102 - name: Build ${{ env.PACKAGE_NAME }}
103 run: |
104 aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
105 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=clang-11 --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}"
106
107 linux-shared-libs:
108 runs-on: ubuntu-24.04 # latest
109 steps:
110 - uses: aws-actions/configure-aws-credentials@v6
111 with:
112 role-to-assume: ${{ env.CRT_CI_ROLE }}
113 aws-region: ${{ env.AWS_DEFAULT_REGION }}
114 - name: Build ${{ env.PACKAGE_NAME }}
115 run: |
116 aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
117 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
118
119 linux-no-cpu-extensions:
120 runs-on: ubuntu-24.04 # latest
121 steps:
122 - uses: aws-actions/configure-aws-credentials@v6
123 with:
124 role-to-assume: ${{ env.CRT_CI_ROLE }}
125 aws-region: ${{ env.AWS_DEFAULT_REGION }}
126 - name: Build ${{ env.PACKAGE_NAME }}
127 run: |
128 aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
129 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DUSE_CPU_EXTENSIONS=OFF
130
131 windows:
132 runs-on: windows-2025 # latest
133 steps:
134 - uses: aws-actions/configure-aws-credentials@v6
135 with:
136 role-to-assume: ${{ env.CRT_CI_ROLE }}
137 aws-region: ${{ env.AWS_DEFAULT_REGION }}
138 - name: Build ${{ env.PACKAGE_NAME }} + consumers
139 run: |
140 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
141 python builder.pyz build -p ${{ env.PACKAGE_NAME }}
142
143 windows-vc17:
144 runs-on: windows-2025 # latest
145 strategy:
146 matrix:
147 arch: [x86, x64]
148 steps:
149 - uses: aws-actions/configure-aws-credentials@v6
150 with:
151 role-to-assume: ${{ env.CRT_CI_ROLE }}
152 aws-region: ${{ env.AWS_DEFAULT_REGION }}
153 - name: Build ${{ env.PACKAGE_NAME }} + consumers
154 run: |
155 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
156 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --target windows-${{ matrix.arch }} --compiler msvc-17
157
158 windows-vc16:
159 runs-on: windows-2025 # latest
160 strategy:
161 matrix:
162 arch: [x86, x64]
163 steps:
164 - uses: aws-actions/configure-aws-credentials@v6
165 with:
166 role-to-assume: ${{ env.CRT_CI_ROLE }}
167 aws-region: ${{ env.AWS_DEFAULT_REGION }}
168 - name: Build ${{ env.PACKAGE_NAME }} + consumers
169 run: |
170 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
171 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --target windows-${{ matrix.arch }} --compiler msvc-16
172
173 windows-shared-libs:
174 runs-on: windows-2025 # latest
175 steps:
176 - uses: aws-actions/configure-aws-credentials@v6
177 with:
178 role-to-assume: ${{ env.CRT_CI_ROLE }}
179 aws-region: ${{ env.AWS_DEFAULT_REGION }}
180 - name: Build ${{ env.PACKAGE_NAME }} + consumers
181 run: |
182 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
183 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
184
185 windows-no-cpu-extensions:
186 runs-on: windows-2025 # latest
187 steps:
188 - uses: aws-actions/configure-aws-credentials@v6
189 with:
190 role-to-assume: ${{ env.CRT_CI_ROLE }}
191 aws-region: ${{ env.AWS_DEFAULT_REGION }}
192 - name: Build ${{ env.PACKAGE_NAME }} + consumers
193 run: |
194 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
195 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DUSE_CPU_EXTENSIONS=OFF
196
197 windows-app-verifier:
198 runs-on: windows-2025 # latest
199 steps:
200 - uses: aws-actions/configure-aws-credentials@v6
201 with:
202 role-to-assume: ${{ env.CRT_CI_ROLE }}
203 aws-region: ${{ env.AWS_DEFAULT_REGION }}
204 - name: Build ${{ env.PACKAGE_NAME }} + consumers
205 run: |
206 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
207 python builder.pyz build -p ${{ env.PACKAGE_NAME }} run_tests=false --cmake-extra=-DBUILD_TESTING=ON
208 - name: Run and check AppVerifier
209 run: |
210 echo "Starting to run AppVerifier on all tests found by CTest"
211 python .\aws-c-common\scripts\appverifier_ctest.py --build_directory .\aws-c-common\build\aws-c-common
212
213 macos-x64:
214 runs-on: macos-14-large # latest
215 steps:
216 - uses: aws-actions/configure-aws-credentials@v6
217 with:
218 role-to-assume: ${{ env.CRT_CI_ROLE }}
219 aws-region: ${{ env.AWS_DEFAULT_REGION }}
220 - name: Build ${{ env.PACKAGE_NAME }} + consumers
221 run: |
222 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
223 chmod a+x builder
224 ./builder build -p ${{ env.PACKAGE_NAME }}
225
226 macos:
227 runs-on: macos-14 # latest
228 steps:
229 - uses: aws-actions/configure-aws-credentials@v6
230 with:
231 role-to-assume: ${{ env.CRT_CI_ROLE }}
232 aws-region: ${{ env.AWS_DEFAULT_REGION }}
233 - name: Build ${{ env.PACKAGE_NAME }} + consumers
234 run: |
235 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
236 chmod a+x builder
237 ./builder build -p ${{ env.PACKAGE_NAME }}
238
239 macos-no-cpu-extensions:
240 runs-on: macos-14 # latest
241 steps:
242 - uses: aws-actions/configure-aws-credentials@v6
243 with:
244 role-to-assume: ${{ env.CRT_CI_ROLE }}
245 aws-region: ${{ env.AWS_DEFAULT_REGION }}
246 - name: Build ${{ env.PACKAGE_NAME }} + consumers
247 run: |
248 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
249 chmod a+x builder
250 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DUSE_CPU_EXTENSIONS=OFF
251
252 openbsd:
253 runs-on: ubuntu-24.04 # unit tests hang on macos; use ubuntu instead
254 strategy:
255 fail-fast: false
256 matrix:
257 # OpenBSD only supports the two most recent releases
258 version: ['7.8', '7.9']
259 steps:
260 - uses: aws-actions/configure-aws-credentials@v6
261 with:
262 role-to-assume: ${{ env.CRT_CI_ROLE }}
263 aws-region: ${{ env.AWS_DEFAULT_REGION }}
264 - uses: actions/checkout@v6
265 - name: Build ${{ env.PACKAGE_NAME }} + consumers
266 uses: cross-platform-actions/[email protected]
267 with:
268 operating_system: openbsd
269 version: ${{ matrix.version }}
270 shell: bash
271 run: |
272 sudo pkg_add py3-urllib3
273 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz', 'builder')"
274 chmod a+x builder
275 ./builder build -p ${{ env.PACKAGE_NAME }}
276
277 freebsd:
278 runs-on: ubuntu-24.04
279 steps:
280 - uses: aws-actions/configure-aws-credentials@v6
281 with:
282 role-to-assume: ${{ env.CRT_CI_ROLE }}
283 aws-region: ${{ env.AWS_DEFAULT_REGION }}
284 - uses: actions/checkout@v6
285 with:
286 submodules: true
287 - name: Build ${{ env.PACKAGE_NAME }} + consumers
288 uses: cross-platform-actions/[email protected]
289 with:
290 operating_system: freebsd
291 version: '14.1'
292 run: |
293 sudo pkg install -y python3 devel/py-pip net/py-urllib3 cmake
294 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz', 'builder')"
295 chmod a+x builder
296 ./builder build -p ${{ env.PACKAGE_NAME }}
297
298 cross_compile:
299 name: Cross Compile ${{matrix.arch}}
300 runs-on: ubuntu-24.04 # latest
301 strategy:
302 matrix:
303 arch: [linux-armv6, linux-armv7, linux-arm64, android-armv7]
304 steps:
305 - uses: aws-actions/configure-aws-credentials@v6
306 with:
307 role-to-assume: ${{ env.CRT_CI_ROLE }}
308 aws-region: ${{ env.AWS_DEFAULT_REGION }}
309 - name: Build ${{ env.PACKAGE_NAME }}
310 run: |
311 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
312 chmod a+x builder
313 ./builder build -p ${{ env.PACKAGE_NAME }} --target=${{matrix.arch}}
314
315 linux-debug:
316 runs-on: ubuntu-24.04 # latest
317 steps:
318 - uses: aws-actions/configure-aws-credentials@v6
319 with:
320 role-to-assume: ${{ env.CRT_CI_ROLE }}
321 aws-region: ${{ env.AWS_DEFAULT_REGION }}
322 - name: Build ${{ env.PACKAGE_NAME }}
323 run: |
324 aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
325 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --config Debug
326
327 windows-debug:
328 runs-on: windows-2022 # latest
329 steps:
330 - uses: aws-actions/configure-aws-credentials@v6
331 with:
332 role-to-assume: ${{ env.CRT_CI_ROLE }}
333 aws-region: ${{ env.AWS_DEFAULT_REGION }}
334 - name: Build ${{ env.PACKAGE_NAME }} + consumers
335 run: |
336 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
337 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --config Debug
338
339 macos-debug:
340 runs-on: macos-14 # latest
341 steps:
342 - uses: aws-actions/configure-aws-credentials@v6
343 with:
344 role-to-assume: ${{ env.CRT_CI_ROLE }}
345 aws-region: ${{ env.AWS_DEFAULT_REGION }}
346 - name: Build ${{ env.PACKAGE_NAME }} + consumers
347 run: |
348 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
349 chmod a+x builder
350 ./builder build -p ${{ env.PACKAGE_NAME }} --config Debug
351
352 s390x: # big-endian
353 runs-on: ubuntu-24.04
354 steps:
355 - uses: aws-actions/configure-aws-credentials@v6
356 with:
357 role-to-assume: ${{ env.CRT_CI_ROLE }}
358 aws-region: ${{ env.AWS_DEFAULT_REGION }}
359 - uses: actions/checkout@v6
360 - uses: uraimo/run-on-arch-action@v3
361 name: Run commands
362 id: runcmd
363 with:
364 arch: s390x
365 distro: ubuntu22.04
366 install: |
367 apt-get update -q -y
368 apt-get -y install sudo
369 apt-get -y install cmake
370 apt-get -y install make
371 apt-get -y install g++
372 apt-get -y install python3
373 apt-get -y install git
374 run: |
375 lscpu | grep Endian
376 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
377 chmod a+x builder
378 ./builder build -p ${{ env.PACKAGE_NAME }} --variant s390x --cmake-extra=-DENABLE_SANITIZERS=OFF