Debian Codegraph @

crt/aws-c-mqtt/.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.92
10 BUILDER_SOURCE: releases
11 BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
12 PACKAGE_NAME: aws-c-mqtt
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 matrix:
26 image:
27 - manylinux1-x64
28 - manylinux1-x86
29 - manylinux2014-x64
30 - manylinux2014-x86
31 - al2-x64
32 - fedora-34-x64
33 - opensuse-leap
34 - rhel8-x64
35 steps:
36 - uses: aws-actions/configure-aws-credentials@v4
37 with:
38 role-to-assume: ${{ env.CRT_CI_ROLE }}
39 aws-region: ${{ env.AWS_DEFAULT_REGION }}
40 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
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 }} --cmake-extra=-DASSERT_LOCK_HELD=ON
45
46 linux-compiler-compat:
47 runs-on: ubuntu-24.04 # latest
48 strategy:
49 matrix:
50 compiler:
51 - clang-6
52 - clang-8
53 - clang-9
54 - clang-10
55 - clang-11
56 - clang-15
57 - clang-17
58 - clang-latest
59 - gcc-4.8
60 - gcc-5
61 - gcc-6
62 - gcc-7
63 - gcc-8
64 - gcc-11
65 steps:
66 - uses: aws-actions/configure-aws-credentials@v4
67 with:
68 role-to-assume: ${{ env.CRT_CI_ROLE }}
69 aws-region: ${{ env.AWS_DEFAULT_REGION }}
70 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
71 - name: Build ${{ env.PACKAGE_NAME }}
72 run: |
73 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
74 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --compiler=${{ matrix.compiler }} --cmake-extra=-DASSERT_LOCK_HELD=ON
75
76 clang-sanitizers:
77 runs-on: ubuntu-24.04 # latest
78 strategy:
79 matrix:
80 sanitizers: [",thread", ",address,undefined"]
81 steps:
82 - uses: aws-actions/configure-aws-credentials@v4
83 with:
84 role-to-assume: ${{ env.CRT_CI_ROLE }}
85 aws-region: ${{ env.AWS_DEFAULT_REGION }}
86 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
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 -p ${{ env.PACKAGE_NAME }} --compiler=clang-11 --cmake-extra=-DENABLE_SANITIZERS=ON --cmake-extra=-DASSERT_LOCK_HELD=ON --cmake-extra=-DSANITIZERS="${{ matrix.sanitizers }}"
91
92 linux-shared-libs:
93 runs-on: ubuntu-24.04 # latest
94 steps:
95 - uses: aws-actions/configure-aws-credentials@v4
96 with:
97 role-to-assume: ${{ env.CRT_CI_ROLE }}
98 aws-region: ${{ env.AWS_DEFAULT_REGION }}
99 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
100 - name: Build ${{ env.PACKAGE_NAME }}
101 run: |
102 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
103 ./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
104
105 windows:
106 runs-on: windows-2025 # latest
107 steps:
108 - uses: aws-actions/configure-aws-credentials@v4
109 with:
110 role-to-assume: ${{ env.CRT_CI_ROLE }}
111 aws-region: ${{ env.AWS_DEFAULT_REGION }}
112 - name: Build ${{ env.PACKAGE_NAME }} + consumers
113 run: |
114 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
115 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DASSERT_LOCK_HELD=ON
116
117 windows-vc17:
118 runs-on: windows-2025 # latest
119 strategy:
120 matrix:
121 arch: [x86, x64]
122 steps:
123 - uses: aws-actions/configure-aws-credentials@v4
124 with:
125 role-to-assume: ${{ env.CRT_CI_ROLE }}
126 aws-region: ${{ env.AWS_DEFAULT_REGION }}
127 - name: Build ${{ env.PACKAGE_NAME }} + consumers
128 run: |
129 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
130 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --target windows-${{ matrix.arch }} --compiler msvc-17 --cmake-extra=-DASSERT_LOCK_HELD=ON
131
132 windows-shared-libs:
133 runs-on: windows-2025 # latest
134 steps:
135 - uses: aws-actions/configure-aws-credentials@v4
136 with:
137 role-to-assume: ${{ env.CRT_CI_ROLE }}
138 aws-region: ${{ env.AWS_DEFAULT_REGION }}
139 - name: Build ${{ env.PACKAGE_NAME }} + consumers
140 run: |
141 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
142 python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON --cmake-extra=-DASSERT_LOCK_HELD=ON
143
144 windows-app-verifier:
145 runs-on: windows-2025 # latest
146 steps:
147 - uses: aws-actions/configure-aws-credentials@v4
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 }} run_tests=false --cmake-extra=-DBUILD_TESTING=ON
155 - name: Run and check AppVerifier
156 run: |
157 python .\aws-c-mqtt\build\deps\aws-c-common\scripts\appverifier_ctest.py --build_directory .\aws-c-mqtt\build\aws-c-mqtt
158
159 macos:
160 runs-on: macos-14 # latest
161 strategy:
162 fail-fast: false
163 matrix:
164 eventloop: ["kqueue", "dispatch_queue"]
165 steps:
166 - uses: aws-actions/configure-aws-credentials@v4
167 with:
168 role-to-assume: ${{ env.CRT_CI_ROLE }}
169 aws-region: ${{ env.AWS_DEFAULT_REGION }}
170 - name: Build ${{ env.PACKAGE_NAME }} + consumers
171 run: |
172 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
173 chmod a+x builder
174 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DAWS_USE_APPLE_NETWORK_FRAMEWORK=${{ matrix.eventloop == 'dispatch_queue' && 'ON' || 'OFF' }}
175
176 macos-x64:
177 runs-on: macos-14-large # latest
178 steps:
179 - uses: aws-actions/configure-aws-credentials@v4
180 with:
181 role-to-assume: ${{ env.CRT_CI_ROLE }}
182 aws-region: ${{ env.AWS_DEFAULT_REGION }}
183 - name: Build ${{ env.PACKAGE_NAME }} + consumers
184 run: |
185 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
186 chmod a+x builder
187 ./builder build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DASSERT_LOCK_HELD=ON
188
189 # Test downstream repos.
190 # 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.
191 downstream:
192 runs-on: ubuntu-24.04 # latest
193 steps:
194 - uses: aws-actions/configure-aws-credentials@v4
195 with:
196 role-to-assume: ${{ env.CRT_CI_ROLE }}
197 aws-region: ${{ env.AWS_DEFAULT_REGION }}
198 # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
199 - name: Build ${{ env.PACKAGE_NAME }}
200 run: |
201 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
202 ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build downstream -p ${{ env.PACKAGE_NAME }}