Debian Codegraph @

crt/aws-c-io/.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_SOURCE: releases
11 BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
12 PACKAGE_NAME: aws-c-io
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 - fedora-34-x64
33 - opensuse-leap
34 - rhel8-x64
35 - al2-x64
36 steps:
37 - uses: aws-actions/configure-aws-credentials@v4
38 with:
39 role-to-assume: ${{ env.CRT_CI_ROLE }}
40 aws-region: ${{ env.AWS_DEFAULT_REGION }}
41 - name: Build ${{ env.PACKAGE_NAME }}
42 run: |
43 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
44 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }}
45
46 linux-byo-crypto:
47 runs-on: ubuntu-24.04 # latest
48 steps:
49 - uses: aws-actions/configure-aws-credentials@v4
50 with:
51 role-to-assume: ${{ env.CRT_CI_ROLE }}
52 aws-region: ${{ env.AWS_DEFAULT_REGION }}
53 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
54 - name: Build ${{ env.PACKAGE_NAME }} + consumers
55 run: |
56 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
57 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-al2-x64 build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBYO_CRYPTO=ON
58
59 linux-compiler-compat:
60 runs-on: ubuntu-24.04 # latest
61 strategy:
62 fail-fast: false
63 matrix:
64 compiler:
65 - name: clang-6
66 - name: clang-8
67 # crt-builder v0.9.72 has some issues there with asan. Updating crt-builder resolves the issue with clang-9,
68 # but introduces issues with other CI jobs. Disable this CI job to unblock CI.
69 # - name: clang-9
70 - name: clang-10
71 - name: clang-11
72 - name: clang-15
73 - name: clang-17
74 - name: clang-latest
75 - name: gcc-4.8
76 - name: gcc-5
77 - name: gcc-6
78 - name: gcc-7
79 - name: gcc-8
80 - name: gcc-11
81 - name: gcc-13
82 # See Issue: https://github.com/llvm/llvm-project/issues/59007. Although this issue
83 # has been fixed in LLVM, the fix will probably not propagate to older versions of Ubuntu and GCC 13.1.
84 #
85 # Starting with GLIBC version 2.34, the `dn_expand` function, previously found in `libresolv.so`, was moved to `libc.so`. This
86 # function is used internally by the `getaddrinfo()` system call.
87 #
88 # In our setup (As of December 2024), we are using an Ubuntu 18 Docker image on a newer Ubuntu host.
89 # However, due to compatibility issues between newer libasan.so in GCC 13.1
90 # and the older Ubuntu image, the linker does not link with `libresolv.so`.
91 # This results in crashes in `getaddrinfo()` since Ubuntu-18 GLIBC is 2.31.
92 #
93 # This problem does not occur on Ubuntu 22 and newer because GLIBC versions 2.34
94 # and above include `dn_expand` in `libc.so`, eliminating the dependency on
95 # `libresolv.so`.
96 #
97 # We can bypass this problem by linking with "resolv" manually until we bump
98 # our base Linux image to Ubuntu 22.
99 extra-build-flag: --cmake-extra=-DCMAKE_EXE_LINKER_FLAGS="-lresolv"
100 steps:
101 - uses: aws-actions/configure-aws-credentials@v4
102 with:
103 role-to-assume: ${{ env.CRT_CI_ROLE }}
104 aws-region: ${{ env.AWS_DEFAULT_REGION }}
105 - name: Build ${{ matrix.compiler.name }}
106 run: |
107 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
108 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=${{ matrix.compiler.name }} ${{ matrix.compiler.extra-build-flag }}
109
110 linux-debug:
111 runs-on: ubuntu-24.04 # latest
112 steps:
113 - uses: aws-actions/configure-aws-credentials@v4
114 with:
115 role-to-assume: ${{ env.CRT_CI_ROLE }}
116 aws-region: ${{ env.AWS_DEFAULT_REGION }}
117 - name: Build ${{ env.PACKAGE_NAME }}
118 run: |
119 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
120 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --config Debug
121
122 clang-sanitizers:
123 runs-on: ubuntu-24.04 # latest
124 strategy:
125 fail-fast: false
126 matrix:
127 sanitizers: [",thread", ",address,undefined"]
128 steps:
129 - uses: aws-actions/configure-aws-credentials@v4
130 with:
131 role-to-assume: ${{ env.CRT_CI_ROLE }}
132 aws-region: ${{ env.AWS_DEFAULT_REGION }}
133 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
134 - name: Build ${{ env.PACKAGE_NAME }}
135 run: |
136 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
137 ./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 }}"
138
139 linux-shared-libs:
140 runs-on: ubuntu-24.04 # latest
141 steps:
142 - uses: aws-actions/configure-aws-credentials@v4
143 with:
144 role-to-assume: ${{ env.CRT_CI_ROLE }}
145 aws-region: ${{ env.AWS_DEFAULT_REGION }}
146 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
147 - name: Build ${{ env.PACKAGE_NAME }}
148 run: |
149 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
150 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
151
152 # Test downstream repos.
153 # 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.
154 downstream:
155 runs-on: ubuntu-24.04 # latest
156 steps:
157 - uses: aws-actions/configure-aws-credentials@v4
158 with:
159 role-to-assume: ${{ env.CRT_CI_ROLE }}
160 aws-region: ${{ env.AWS_DEFAULT_REGION }}
161 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
162 - name: Build ${{ env.PACKAGE_NAME }}
163 run: |
164 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
165 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build downstream -p ${{ env.PACKAGE_NAME }}
166
167 windows:
168 runs-on: windows-2025 # latest
169 steps:
170 - uses: aws-actions/configure-aws-credentials@v4
171 with:
172 role-to-assume: ${{ env.CRT_CI_ROLE }}
173 aws-region: ${{ env.AWS_DEFAULT_REGION }}
174 - name: Build ${{ env.PACKAGE_NAME }} + consumers
175 run: |
176 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
177 python builder.pyz build -p ${{ env.PACKAGE_NAME }}
178
179 windows-lean:
180 runs-on: windows-2025 # latest
181 env:
182 CFLAGS: "-DWIN32_LEAN_AND_MEAN"
183 steps:
184 - uses: aws-actions/configure-aws-credentials@v4
185 with:
186 role-to-assume: ${{ env.CRT_CI_ROLE }}
187 aws-region: ${{ env.AWS_DEFAULT_REGION }}
188 - name: Build ${{ env.PACKAGE_NAME }} + consumers
189 run: |
190 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
191 python builder.pyz build -p ${{ env.PACKAGE_NAME }}
192
193 windows-debug:
194 runs-on: windows-2025 # latest
195 steps:
196 - uses: aws-actions/configure-aws-credentials@v4
197 with:
198 role-to-assume: ${{ env.CRT_CI_ROLE }}
199 aws-region: ${{ env.AWS_DEFAULT_REGION }}
200 - name: Build ${{ env.PACKAGE_NAME }} + consumers
201 run: |
202 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
203 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --config Debug
204
205 windows-vc17:
206 runs-on: windows-2025 # latest
207 strategy:
208 matrix:
209 arch: [x86, x64]
210 steps:
211 - uses: aws-actions/configure-aws-credentials@v4
212 with:
213 role-to-assume: ${{ env.CRT_CI_ROLE }}
214 aws-region: ${{ env.AWS_DEFAULT_REGION }}
215 - name: Build ${{ env.PACKAGE_NAME }} + consumers
216 run: |
217 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
218 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --target windows-${{ matrix.arch }} --compiler msvc-17
219
220 windows-shared-libs:
221 runs-on: windows-2025 # latest
222 steps:
223 - uses: aws-actions/configure-aws-credentials@v4
224 with:
225 role-to-assume: ${{ env.CRT_CI_ROLE }}
226 aws-region: ${{ env.AWS_DEFAULT_REGION }}
227 - name: Build ${{ env.PACKAGE_NAME }} + consumers
228 run: |
229 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
230 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
231
232 windows-app-verifier:
233 runs-on: windows-2025 # latest
234 steps:
235 - uses: aws-actions/configure-aws-credentials@v4
236 with:
237 role-to-assume: ${{ env.CRT_CI_ROLE }}
238 aws-region: ${{ env.AWS_DEFAULT_REGION }}
239 - name: Build ${{ env.PACKAGE_NAME }} + consumers
240 run: |
241 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
242 python builder.pyz build -p ${{ env.PACKAGE_NAME }} run_tests=false --cmake-extra=-DBUILD_TESTING=ON
243 - name: Run and check AppVerifier
244 run: |
245 python .\aws-c-io\build\deps\aws-c-common\scripts\appverifier_ctest.py --build_directory .\aws-c-io\build\aws-c-io
246
247 macos:
248 runs-on: macos-14 # latest
249 strategy:
250 fail-fast: false
251 matrix:
252 eventloop: ["kqueue", "dispatch_queue"]
253 sanitizers: [",thread", ",address,undefined"]
254 steps:
255 - uses: aws-actions/configure-aws-credentials@v4
256 with:
257 role-to-assume: ${{ env.CRT_CI_ROLE }}
258 aws-region: ${{ env.AWS_DEFAULT_REGION }}
259 - name: Build ${{ env.PACKAGE_NAME }} + consumers
260 run: |
261 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
262 chmod a+x builder
263 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DAWS_USE_APPLE_NETWORK_FRAMEWORK=${{ matrix.eventloop == 'dispatch_queue' && 'ON' || 'OFF' }} --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}"
264
265 macos-x64:
266 runs-on: macos-14-large # latest
267 steps:
268 - uses: aws-actions/configure-aws-credentials@v4
269 with:
270 role-to-assume: ${{ env.CRT_CI_ROLE }}
271 aws-region: ${{ env.AWS_DEFAULT_REGION }}
272 - name: Build ${{ env.PACKAGE_NAME }} + consumers
273 run: |
274 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
275 chmod a+x builder
276 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON
277
278 macos-x64-s2n:
279 runs-on: macos-14-large # latest
280 env:
281 AWS_CRT_USE_NON_FIPS_TLS_13: 1
282 steps:
283 - uses: aws-actions/configure-aws-credentials@v4
284 with:
285 role-to-assume: ${{ env.CRT_CI_ROLE }}
286 aws-region: ${{ env.AWS_DEFAULT_REGION }}
287 - name: Build ${{ env.PACKAGE_NAME }} + consumers
288 run: |
289 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
290 chmod a+x builder
291 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON
292
293 macos-s2n-debug:
294 runs-on: macos-14 # latest
295 env:
296 AWS_CRT_USE_NON_FIPS_TLS_13: 1
297 strategy:
298 fail-fast: false
299 matrix:
300 eventloop: ["kqueue"]
301 sanitizers: [",thread", ",address,undefined"]
302 steps:
303 - uses: aws-actions/configure-aws-credentials@v4
304 with:
305 role-to-assume: ${{ env.CRT_CI_ROLE }}
306 aws-region: ${{ env.AWS_DEFAULT_REGION }}
307 - name: Build ${{ env.PACKAGE_NAME }} + consumers
308 run: |
309 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
310 chmod a+x builder
311 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DAWS_USE_APPLE_NETWORK_FRAMEWORK=OFF --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}" --config Debug
312
313 macos-debug:
314 runs-on: macos-14 # latest
315 strategy:
316 fail-fast: false
317 matrix:
318 eventloop: ["kqueue", "dispatch_queue"]
319 sanitizers: [",thread", ",address,undefined"]
320 steps:
321 - uses: aws-actions/configure-aws-credentials@v4
322 with:
323 role-to-assume: ${{ env.CRT_CI_ROLE }}
324 aws-region: ${{ env.AWS_DEFAULT_REGION }}
325 - name: Build ${{ env.PACKAGE_NAME }} + consumers
326 run: |
327 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
328 chmod a+x builder
329 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DAWS_USE_APPLE_NETWORK_FRAMEWORK=${{ matrix.eventloop == 'dispatch_queue' && 'ON' || 'OFF' }} --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}" --config Debug
330
331 macos-secitem:
332 runs-on: macos-14 # latest
333 strategy:
334 fail-fast: false
335 matrix:
336 sanitizers: [",thread", ",address,undefined"]
337 steps:
338 - uses: aws-actions/configure-aws-credentials@v4
339 with:
340 role-to-assume: ${{ env.CRT_CI_ROLE }}
341 aws-region: ${{ env.AWS_DEFAULT_REGION }}
342 - name: Build ${{ env.PACKAGE_NAME }} + consumers
343 run: |
344 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
345 chmod a+x builder
346 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DAWS_USE_SECITEM=ON --cmake-extra=-DAWS_USE_APPLE_NETWORK_FRAMEWORK=ON --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}"
347
348 freebsd:
349 runs-on: ubuntu-24.04 # latest
350 steps:
351 - uses: aws-actions/configure-aws-credentials@v4
352 with:
353 role-to-assume: ${{ env.CRT_CI_ROLE }}
354 aws-region: ${{ env.AWS_DEFAULT_REGION }}
355 - uses: actions/checkout@v4
356 - name: Build ${{ env.PACKAGE_NAME }} + consumers
357 id: test
358 uses: cross-platform-actions/[email protected]
359 with:
360 operating_system: freebsd
361 architecture: x86-64
362 version: '14.0'
363 cpu_count: 4
364 shell: bash
365 run: |
366 sudo pkg install -y python3 net/py-urllib3
367 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
368 chmod a+x builder
369 ./builder build -p ${{ env.PACKAGE_NAME }}
370
371 openbsd:
372 runs-on: ubuntu-24.04 # latest
373 strategy:
374 fail-fast: false
375 matrix:
376 # OpenBSD only supports the two most recent releases
377 version: ['7.8', '7.9']
378 steps:
379 - uses: aws-actions/configure-aws-credentials@v4
380 with:
381 role-to-assume: ${{ env.CRT_CI_ROLE }}
382 aws-region: ${{ env.AWS_DEFAULT_REGION }}
383 - uses: actions/checkout@v4
384 - name: Build ${{ env.PACKAGE_NAME }} + consumers
385 id: test
386 uses: cross-platform-actions/[email protected]
387 with:
388 operating_system: openbsd
389 architecture: x86-64
390 version: ${{ matrix.version }}
391 cpu_count: 4
392 shell: bash
393 run: |
394 sudo pkg_add py3-urllib3
395 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
396 chmod a+x builder
397 ./builder build -p ${{ env.PACKAGE_NAME }}