Debian Codegraph @

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

raw symbols SCIP
1 name: CI
2
3 on:
4 push:
5 branches-ignore:
6 - 'main'
7
8 # cancel in-progress builds after a new commit
9 concurrency:
10 group: ${{ github.workflow }}-${{ github.ref }}
11 cancel-in-progress: true
12
13 env:
14 BUILDER_VERSION: v0.9.96
15 BUILDER_SOURCE: releases
16 BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
17 PACKAGE_NAME: aws-c-s3
18 LINUX_BASE_IMAGE: ubuntu-18-x64
19 RUN: ${{ github.run_id }}-${{ github.run_number }}
20 CRT_CI_ROLE: ${{ secrets.CRT_CI_ROLE_ARN }}
21 AWS_DEFAULT_REGION: us-east-1
22 CTEST_PARALLEL_LEVEL: 2
23
24 permissions:
25 id-token: write # This is required for requesting the JWT
26
27 jobs:
28 linux-compat:
29 runs-on: ubuntu-24.04 # latest
30 strategy:
31 fail-fast: false
32 matrix:
33 image:
34 - manylinux1-x64
35 - manylinux1-x86
36 - manylinux2014-x64
37 - manylinux2014-x86
38 - al2-x64
39 steps:
40 - uses: aws-actions/configure-aws-credentials@v6
41 with:
42 role-to-assume: ${{ env.CRT_CI_ROLE }}
43 aws-region: ${{ env.AWS_DEFAULT_REGION }}
44 - name: Checkout Sources
45 uses: actions/checkout@v6
46 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
47 - name: Build ${{ env.PACKAGE_NAME }}
48 run: |
49 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
50 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }}
51
52 linux-compiler-compat:
53 runs-on: ubuntu-24.04 # latest
54 strategy:
55 fail-fast: false
56 matrix:
57 compiler:
58 - name: clang-6
59 - name: clang-8
60 - name: clang-9
61 - name: clang-10
62 - name: clang-11
63 - name: clang-15
64 - name: clang-17
65 - name: clang-latest
66 - name: gcc-4.8
67 - name: gcc-5
68 - name: gcc-6
69 - name: gcc-7
70 - name: gcc-8
71 - name: gcc-11
72 - name: gcc-13
73 # See Issue: https://github.com/llvm/llvm-project/issues/59007. Although this issue
74 # has been fixed in LLVM, the fix will probably not propagate to older versions of Ubuntu and GCC 13.1.
75 #
76 # Starting with GLIBC version 2.34, the `dn_expand` function, previously found in `libresolv.so`, was moved to `libc.so`. This
77 # function is used internally by the `getaddrinfo()` system call.
78 #
79 # In our setup (As of December 2024), we are using an Ubuntu 18 Docker image on a newer Ubuntu host.
80 # However, due to compatibility issues between newer libasan.so in GCC 13.1
81 # and the older Ubuntu image, the linker does not link with `libresolv.so`.
82 # This results in crashes in `getaddrinfo()` since Ubuntu-18 GLIBC is 2.31.
83 #
84 # This problem does not occur on Ubuntu 22 and newer because GLIBC versions 2.34
85 # and above include `dn_expand` in `libc.so`, eliminating the dependency on
86 # `libresolv.so`.
87 #
88 # We can bypass this problem by linking with "resolv" manually until we bump
89 # our base Linux image to Ubuntu 22.
90 extra-build-flag: --cmake-extra=-DCMAKE_EXE_LINKER_FLAGS="-lresolv"
91 steps:
92 - uses: aws-actions/configure-aws-credentials@v6
93 with:
94 role-to-assume: ${{ env.CRT_CI_ROLE }}
95 aws-region: ${{ env.AWS_DEFAULT_REGION }}
96 - name: Build ${{ env.PACKAGE_NAME }}
97 run: |
98 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
99 ./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 }} --cmake-extra=-DASSERT_LOCK_HELD=ON --cmake-extra=-DAWS_ENABLE_S3_ENDPOINT_RESOLVER=ON
100
101 clang-sanitizers:
102 runs-on: ubuntu-24.04 # latest
103 strategy:
104 fail-fast: false
105 matrix:
106 sanitizers: [",thread", ",address,undefined"]
107 steps:
108 - uses: aws-actions/configure-aws-credentials@v6
109 with:
110 role-to-assume: ${{ env.CRT_CI_ROLE }}
111 aws-region: ${{ env.AWS_DEFAULT_REGION }}
112 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
113 - name: Build ${{ env.PACKAGE_NAME }}
114 run: |
115 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
116 ./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 }}" --cmake-extra=-DASSERT_LOCK_HELD=ON
117
118 linux-shared-libs:
119 runs-on: ubuntu-24.04 # latest
120 steps:
121 - uses: aws-actions/configure-aws-credentials@v6
122 with:
123 role-to-assume: ${{ env.CRT_CI_ROLE }}
124 aws-region: ${{ env.AWS_DEFAULT_REGION }}
125 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
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=-DBUILD_SHARED_LIBS=ON --cmake-extra=-DASSERT_LOCK_HELD=ON
130
131 byo-crypto:
132 runs-on: ubuntu-24.04 # 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 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
139 - name: Build ${{ env.PACKAGE_NAME }}
140 run: |
141 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
142 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBYO_CRYPTO=ON --cmake-extra=-DASSERT_LOCK_HELD=ON
143
144 windows:
145 runs-on: windows-2025 # latest
146 steps:
147 - uses: aws-actions/configure-aws-credentials@v6
148 with:
149 role-to-assume: ${{ env.CRT_CI_ROLE }}
150 aws-region: ${{ env.AWS_DEFAULT_REGION }}
151 - name: Build ${{ env.PACKAGE_NAME }} + consumers
152 run: |
153 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
154 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DASSERT_LOCK_HELD=ON
155
156 windows-vc17:
157 runs-on: windows-2025 # latest
158 strategy:
159 fail-fast: false
160 matrix:
161 arch: [x86, x64]
162 steps:
163 - uses: aws-actions/configure-aws-credentials@v6
164 with:
165 role-to-assume: ${{ env.CRT_CI_ROLE }}
166 aws-region: ${{ env.AWS_DEFAULT_REGION }}
167 - name: Build ${{ env.PACKAGE_NAME }} + consumers
168 run: |
169 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
170 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --target windows-${{ matrix.arch }} --cmake-extra=-DASSERT_LOCK_HELD=ON --compiler msvc-17
171
172 windows-shared-libs:
173 runs-on: windows-2025 # latest
174 steps:
175 - uses: aws-actions/configure-aws-credentials@v6
176 with:
177 role-to-assume: ${{ env.CRT_CI_ROLE }}
178 aws-region: ${{ env.AWS_DEFAULT_REGION }}
179 - name: Build ${{ env.PACKAGE_NAME }} + consumers
180 run: |
181 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
182 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON --cmake-extra=-DASSERT_LOCK_HELD=ON
183
184 windows-app-verifier:
185 runs-on: windows-2025 # latest
186 steps:
187 - uses: aws-actions/configure-aws-credentials@v6
188 with:
189 role-to-assume: ${{ env.CRT_CI_ROLE }}
190 aws-region: ${{ env.AWS_DEFAULT_REGION }}
191 - name: Build ${{ env.PACKAGE_NAME }} + consumers
192 run: |
193 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
194 python builder.pyz build -p ${{ env.PACKAGE_NAME }} run_tests=false --cmake-extra=-DBUILD_TESTING=ON
195 - name: Run and check AppVerifier
196 run: |
197 python .\aws-c-s3\build\deps\aws-c-common\scripts\appverifier_ctest.py --build_directory .\aws-c-s3\build\aws-c-s3
198
199 macos:
200 runs-on: macos-14 # latest
201 steps:
202 - uses: aws-actions/configure-aws-credentials@v6
203 with:
204 role-to-assume: ${{ env.CRT_CI_ROLE }}
205 aws-region: ${{ env.AWS_DEFAULT_REGION }}
206 - name: Checkout Sources
207 uses: actions/checkout@v6
208 - name: Build ${{ env.PACKAGE_NAME }} + consumers
209 run: |
210 python3 -m venv .venv
211 source .venv/bin/activate
212 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
213 chmod a+x builder
214 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DASSERT_LOCK_HELD=ON
215
216 macos-x64:
217 runs-on: macos-14-large # latest
218 steps:
219 - uses: aws-actions/configure-aws-credentials@v6
220 with:
221 role-to-assume: ${{ env.CRT_CI_ROLE }}
222 aws-region: ${{ env.AWS_DEFAULT_REGION }}
223 - name: Checkout Sources
224 uses: actions/checkout@v6
225 - name: Build ${{ env.PACKAGE_NAME }} + consumers
226 run: |
227 python3 -m venv .venv
228 source .venv/bin/activate
229 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
230 chmod a+x builder
231 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DASSERT_LOCK_HELD=ON --cmake-extra=-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON
232
233 macos-s2n:
234 runs-on: macos-14 # latest
235 env:
236 AWS_CRT_USE_NON_FIPS_TLS_13: 1
237 steps:
238 - uses: aws-actions/configure-aws-credentials@v6
239 with:
240 role-to-assume: ${{ env.CRT_CI_ROLE }}
241 aws-region: ${{ env.AWS_DEFAULT_REGION }}
242 - name: Checkout Sources
243 uses: actions/checkout@v6
244 - name: Build ${{ env.PACKAGE_NAME }} + consumers
245 run: |
246 python3 -m venv .venv
247 source .venv/bin/activate
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=-DASSERT_LOCK_HELD=ON
251
252 macos-x64-s2n:
253 runs-on: macos-14-large # latest
254 env:
255 AWS_CRT_USE_NON_FIPS_TLS_13: 1
256 steps:
257 - uses: aws-actions/configure-aws-credentials@v6
258 with:
259 role-to-assume: ${{ env.CRT_CI_ROLE }}
260 aws-region: ${{ env.AWS_DEFAULT_REGION }}
261 - name: Checkout Sources
262 uses: actions/checkout@v6
263 - name: Build ${{ env.PACKAGE_NAME }} + consumers
264 run: |
265 python3 -m venv .venv
266 source .venv/bin/activate
267 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
268 chmod a+x builder
269 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DASSERT_LOCK_HELD=ON --cmake-extra=-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON
270
271 # Test downstream repos.
272 # 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.
273 downstream:
274 runs-on: ubuntu-24.04 # latest
275 steps:
276 - uses: aws-actions/configure-aws-credentials@v6
277 with:
278 role-to-assume: ${{ env.CRT_CI_ROLE }}
279 aws-region: ${{ env.AWS_DEFAULT_REGION }}
280 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
281 - name: Build ${{ env.PACKAGE_NAME }}
282 run: |
283 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
284 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build downstream -p ${{ env.PACKAGE_NAME }}
285
286 linux-debug:
287 runs-on: ubuntu-24.04 # latest
288 steps:
289 - uses: aws-actions/configure-aws-credentials@v6
290 with:
291 role-to-assume: ${{ env.CRT_CI_ROLE }}
292 aws-region: ${{ env.AWS_DEFAULT_REGION }}
293 - name: Build ${{ env.PACKAGE_NAME }}
294 run: |
295 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
296 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DASSERT_LOCK_HELD=ON --config Debug