Debian Codegraph @

crt/aws-checksums/.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.76
10 BUILDER_SOURCE: releases
11 BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
12 PACKAGE_NAME: aws-checksums
13 LINUX_BASE_IMAGE: ubuntu-22-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 - al2-x64
33 - fedora-34-x64
34 - opensuse-leap
35 - rhel8-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 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
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 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }}
46
47 linux-compiler-compat-old-compilers:
48 runs-on: ubuntu-24.04 # latest
49 strategy:
50 matrix:
51 compiler:
52 - clang-3
53 - clang-6
54 - clang-8
55 - clang-9
56 - clang-10
57 - clang-11
58 - clang-12
59 - gcc-4.8
60 - gcc-5
61 - gcc-6
62 - gcc-7
63 - gcc-8
64 steps:
65 - uses: aws-actions/configure-aws-credentials@v4
66 with:
67 role-to-assume: ${{ env.CRT_CI_ROLE }}
68 aws-region: ${{ env.AWS_DEFAULT_REGION }}
69 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
70 - name: Build ${{ env.PACKAGE_NAME }}
71 run: |
72 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
73 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-ubuntu-18-x64 build -p ${{ env.PACKAGE_NAME }} --compiler=${{ matrix.compiler }}
74
75 linux-compiler-compat:
76 runs-on: ubuntu-24.04 # latest
77 strategy:
78 matrix:
79 compiler:
80 - clang-13
81 - clang-14
82 - clang-15
83 - clang-16
84 - clang-17
85 - clang-18
86 - gcc-11
87 - gcc-12
88 - gcc-13
89 steps:
90 - uses: aws-actions/configure-aws-credentials@v4
91 with:
92 role-to-assume: ${{ env.CRT_CI_ROLE }}
93 aws-region: ${{ env.AWS_DEFAULT_REGION }}
94 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
95 - name: Build ${{ env.PACKAGE_NAME }}
96 run: |
97 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
98 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=${{ matrix.compiler }}
99
100 clang-sanitizers:
101 runs-on: ubuntu-24.04 # latest
102 strategy:
103 matrix:
104 sanitizers: [",thread", ",address,undefined"]
105 steps:
106 - uses: aws-actions/configure-aws-credentials@v4
107 with:
108 role-to-assume: ${{ env.CRT_CI_ROLE }}
109 aws-region: ${{ env.AWS_DEFAULT_REGION }}
110 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
111 - name: Build ${{ env.PACKAGE_NAME }}
112 run: |
113 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
114 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=clang-16 --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}"
115
116 linux-shared-libs:
117 runs-on: ubuntu-24.04 # latest
118 steps:
119 - uses: aws-actions/configure-aws-credentials@v4
120 with:
121 role-to-assume: ${{ env.CRT_CI_ROLE }}
122 aws-region: ${{ env.AWS_DEFAULT_REGION }}
123 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
124 - name: Build ${{ env.PACKAGE_NAME }}
125 run: |
126 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
127 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
128
129 linux-no-cpu-extensions:
130 runs-on: ubuntu-24.04 # latest
131 steps:
132 - uses: aws-actions/configure-aws-credentials@v4
133 with:
134 role-to-assume: ${{ env.CRT_CI_ROLE }}
135 aws-region: ${{ env.AWS_DEFAULT_REGION }}
136 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
137 - name: Build ${{ env.PACKAGE_NAME }}
138 run: |
139 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
140 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DUSE_CPU_EXTENSIONS=OFF
141
142 windows:
143 runs-on: windows-2025 # latest
144 steps:
145 - name: Build ${{ env.PACKAGE_NAME }} + consumers
146 run: |
147 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
148 python builder.pyz build -p ${{ env.PACKAGE_NAME }}
149
150 windows-vc17:
151 runs-on: windows-2025 # windows-2019 is last env with Visual Studio 2015 (v14.0)
152 strategy:
153 matrix:
154 arch: [x86, x64]
155 steps:
156 - uses: aws-actions/configure-aws-credentials@v4
157 with:
158 role-to-assume: ${{ env.CRT_CI_ROLE }}
159 aws-region: ${{ env.AWS_DEFAULT_REGION }}
160 - name: Build ${{ env.PACKAGE_NAME }} + consumers
161 run: |
162 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
163 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --target windows-${{ matrix.arch }} --compiler msvc-17
164
165 windows-shared-libs:
166 runs-on: windows-2025 # latest
167 steps:
168 - uses: aws-actions/configure-aws-credentials@v4
169 with:
170 role-to-assume: ${{ env.CRT_CI_ROLE }}
171 aws-region: ${{ env.AWS_DEFAULT_REGION }}
172 - name: Build ${{ env.PACKAGE_NAME }} + consumers
173 run: |
174 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
175 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
176
177 windows-no-cpu-extensions:
178 runs-on: windows-2025 # latest
179 steps:
180 - uses: aws-actions/configure-aws-credentials@v4
181 with:
182 role-to-assume: ${{ env.CRT_CI_ROLE }}
183 aws-region: ${{ env.AWS_DEFAULT_REGION }}
184 - name: Build ${{ env.PACKAGE_NAME }} + consumers
185 run: |
186 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
187 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DUSE_CPU_EXTENSIONS=OFF
188
189 windows-app-verifier:
190 runs-on: windows-2025 # latest
191 steps:
192 - uses: aws-actions/configure-aws-credentials@v4
193 with:
194 role-to-assume: ${{ env.CRT_CI_ROLE }}
195 aws-region: ${{ env.AWS_DEFAULT_REGION }}
196 - name: Build ${{ env.PACKAGE_NAME }} + consumers
197 run: |
198 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
199 python builder.pyz build -p ${{ env.PACKAGE_NAME }} run_tests=false --cmake-extra=-DBUILD_TESTING=ON
200 - name: Run and check AppVerifier
201 run: |
202 python .\aws-checksums\build\deps\aws-c-common\scripts\appverifier_ctest.py --build_directory .\aws-checksums\build\aws-checksums
203
204 macos:
205 runs-on: macos-14 # latest
206 steps:
207 - uses: aws-actions/configure-aws-credentials@v4
208 with:
209 role-to-assume: ${{ env.CRT_CI_ROLE }}
210 aws-region: ${{ env.AWS_DEFAULT_REGION }}
211 - name: Build ${{ env.PACKAGE_NAME }} + consumers
212 run: |
213 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
214 chmod a+x builder
215 ./builder build -p ${{ env.PACKAGE_NAME }}
216
217 osx-m1:
218
219 runs-on: macos-14-xlarge # latest arm build
220 strategy:
221 matrix:
222 arch: [ macos-armv8 ]
223 steps:
224 - uses: aws-actions/configure-aws-credentials@v4
225 with:
226 role-to-assume: ${{ env.CRT_CI_ROLE }}
227 aws-region: ${{ env.AWS_DEFAULT_REGION }}
228 - name: Build ${{ env.PACKAGE_NAME }} + consumers
229 run: |
230 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
231 chmod a+x builder
232 ./builder build -p ${{ env.PACKAGE_NAME }} --target=${{matrix.arch}}
233
234 macos-x64:
235 runs-on: macos-14-large # latest
236 steps:
237 - uses: aws-actions/configure-aws-credentials@v4
238 with:
239 role-to-assume: ${{ env.CRT_CI_ROLE }}
240 aws-region: ${{ env.AWS_DEFAULT_REGION }}
241 - name: Build ${{ env.PACKAGE_NAME }} + consumers
242 run: |
243 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
244 chmod a+x builder
245 ./builder build -p ${{ env.PACKAGE_NAME }}
246
247 macos-no-cpu-extensions:
248 runs-on: macos-14 # latest
249 steps:
250 - uses: aws-actions/configure-aws-credentials@v4
251 with:
252 role-to-assume: ${{ env.CRT_CI_ROLE }}
253 aws-region: ${{ env.AWS_DEFAULT_REGION }}
254 - name: Build ${{ env.PACKAGE_NAME }} + consumers
255 run: |
256 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
257 chmod a+x builder
258 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DUSE_CPU_EXTENSIONS=OFF
259
260 cross_compile:
261 name: Cross Compile ${{matrix.arch}}
262 runs-on: ubuntu-24.04 # latest
263 strategy:
264 matrix:
265 arch: [linux-armv6, linux-armv7, linux-arm64, android-armv7]
266
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 }}
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 }} --target=${{matrix.arch}}
277
278 # Test downstream repos.
279 # 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.
280 downstream:
281 runs-on: ubuntu-24.04 # latest
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 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
288 - name: Build ${{ env.PACKAGE_NAME }}
289 run: |
290 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
291 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build downstream -p ${{ env.PACKAGE_NAME }}
292
293 freebsd:
294 runs-on: ubuntu-24.04 # latest
295 steps:
296 - uses: aws-actions/configure-aws-credentials@v4
297 with:
298 role-to-assume: ${{ env.CRT_CI_ROLE }}
299 aws-region: ${{ env.AWS_DEFAULT_REGION }}
300 - uses: actions/checkout@v4
301 - name: Build ${{ env.PACKAGE_NAME }} + consumers
302 id: test
303 uses: cross-platform-actions/[email protected]
304 with:
305 #note: sanitizer seems to be broken on s390x (fails trying to allocate several tbs of mem) and package manager works slightly differently that on regular ubuntu
306 operating_system: freebsd
307 architecture: x86-64
308 version: '14.1'
309 cpu_count: 4
310 shell: bash
311 run: |
312 sudo pkg install -y python3 net/py-urllib3
313 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
314 chmod a+x builder
315 ./builder build -p ${{ env.PACKAGE_NAME }}
316
317 s390x: #big-endian
318 runs-on: ubuntu-24.04
319 steps:
320 - uses: aws-actions/configure-aws-credentials@v4
321 with:
322 role-to-assume: ${{ env.CRT_CI_ROLE }}
323 aws-region: ${{ env.AWS_DEFAULT_REGION }}
324 - uses: actions/checkout@v4
325 - uses: uraimo/run-on-arch-action@v3
326 name: Run commands
327 id: runcmd
328 with:
329 arch: s390x
330 distro: ubuntu22.04
331 install: |
332 apt-get update -q -y
333 apt-get -y install sudo
334 apt-get -y install cmake
335 apt-get -y install make
336 apt-get -y install g++
337 apt-get -y install python3
338 apt-get -y install git
339 run: |
340 lscpu | grep Endian
341 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
342 chmod a+x builder
343 ./builder build -p ${{ env.PACKAGE_NAME }} --variant s390x --cmake-extra=-DENABLE_SANITIZERS=OFF
344
345 openbsd:
346 runs-on: ubuntu-24.04 # latest
347 strategy:
348 fail-fast: false
349 matrix:
350 # OpenBSD only supports the two most recent releases
351 version: ['7.4', '7.5']
352 steps:
353 - uses: aws-actions/configure-aws-credentials@v4
354 with:
355 role-to-assume: ${{ env.CRT_CI_ROLE }}
356 aws-region: ${{ env.AWS_DEFAULT_REGION }}
357 # Cannot use builder to checkout as OpenBSD doesn't ship git in the base install
358 - uses: actions/checkout@v4
359 with:
360 submodules: true
361 - name: Build ${{ env.PACKAGE_NAME }} + consumers
362 uses: cross-platform-actions/[email protected]
363 with:
364 operating_system: openbsd
365 architecture: x86-64
366 version: ${{ matrix.version }}
367 cpu_count: 4
368 shell: bash
369 environment_variables: AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION AWS_REGION
370 run: |
371 sudo pkg_add awscli py3-pip py3-urllib3
372 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz', 'builder')"
373 chmod a+x builder
374 ./builder build -p ${{ env.PACKAGE_NAME }}