|
6 | 6 | DEVELOPER: 1
|
7 | 7 |
|
8 | 8 | jobs:
|
9 |
| - ci-config: |
10 |
| - name: config |
11 |
| - runs-on: ubuntu-latest |
12 |
| - outputs: |
13 |
| - enabled: ${{ steps.check-ref.outputs.enabled }}${{ steps.skip-if-redundant.outputs.enabled }} |
14 |
| - steps: |
15 |
| - - name: try to clone ci-config branch |
16 |
| - run: | |
17 |
| - git -c protocol.version=2 clone \ |
18 |
| - --no-tags \ |
19 |
| - --single-branch \ |
20 |
| - -b ci-config \ |
21 |
| - --depth 1 \ |
22 |
| - --no-checkout \ |
23 |
| - --filter=blob:none \ |
24 |
| - https://github.com/${{ github.repository }} \ |
25 |
| - config-repo && |
26 |
| - cd config-repo && |
27 |
| - git checkout HEAD -- ci/config || : ignore |
28 |
| - - id: check-ref |
29 |
| - name: check whether CI is enabled for ref |
30 |
| - run: | |
31 |
| - enabled=yes |
32 |
| - if test -x config-repo/ci/config/allow-ref && |
33 |
| - ! config-repo/ci/config/allow-ref '${{ github.ref }}' |
34 |
| - then |
35 |
| - enabled=no |
36 |
| - fi |
37 |
| - echo "::set-output name=enabled::$enabled" |
38 |
| - - name: skip if the commit or tree was already tested |
39 |
| - id: skip-if-redundant |
40 |
| - uses: actions/github-script@v3 |
41 |
| - if: steps.check-ref.outputs.enabled == 'yes' |
42 |
| - with: |
43 |
| - github-token: ${{secrets.GITHUB_TOKEN}} |
44 |
| - script: | |
45 |
| - try { |
46 |
| - // Figure out workflow ID, commit and tree |
47 |
| - const { data: run } = await github.actions.getWorkflowRun({ |
48 |
| - owner: context.repo.owner, |
49 |
| - repo: context.repo.repo, |
50 |
| - run_id: context.runId, |
51 |
| - }); |
52 |
| - const workflow_id = run.workflow_id; |
53 |
| - const head_sha = run.head_sha; |
54 |
| - const tree_id = run.head_commit.tree_id; |
55 |
| -
|
56 |
| - // See whether there is a successful run for that commit or tree |
57 |
| - const { data: runs } = await github.actions.listWorkflowRuns({ |
58 |
| - owner: context.repo.owner, |
59 |
| - repo: context.repo.repo, |
60 |
| - per_page: 500, |
61 |
| - status: 'success', |
62 |
| - workflow_id, |
63 |
| - }); |
64 |
| - for (const run of runs.workflow_runs) { |
65 |
| - if (head_sha === run.head_sha) { |
66 |
| - core.warning(`Successful run for the commit ${head_sha}: ${run.html_url}`); |
67 |
| - core.setOutput('enabled', ' but skip'); |
68 |
| - break; |
69 |
| - } |
70 |
| - if (run.head_commit && tree_id === run.head_commit.tree_id) { |
71 |
| - core.warning(`Successful run for the tree ${tree_id}: ${run.html_url}`); |
72 |
| - core.setOutput('enabled', ' but skip'); |
73 |
| - break; |
74 |
| - } |
75 |
| - } |
76 |
| - } catch (e) { |
77 |
| - core.warning(e); |
78 |
| - } |
79 |
| -
|
80 | 9 | windows-build:
|
81 | 10 | name: win build
|
82 |
| - needs: ci-config |
83 |
| - if: needs.ci-config.outputs.enabled == 'yes' |
84 | 11 | runs-on: windows-latest
|
85 | 12 | steps:
|
86 | 13 | - uses: actions/checkout@v2
|
|
131 | 58 | path: ${{env.FAILED_TEST_ARTIFACTS}}
|
132 | 59 | vs-build:
|
133 | 60 | name: win+VS build
|
134 |
| - needs: ci-config |
135 |
| - if: needs.ci-config.outputs.enabled == 'yes' |
136 | 61 | env:
|
137 | 62 | NO_PERL: 1
|
138 | 63 | GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'"
|
@@ -214,135 +139,3 @@ jobs:
|
214 | 139 | with:
|
215 | 140 | name: failed-tests-windows
|
216 | 141 | path: ${{env.FAILED_TEST_ARTIFACTS}}
|
217 |
| - regular: |
218 |
| - name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) |
219 |
| - needs: ci-config |
220 |
| - if: needs.ci-config.outputs.enabled == 'yes' |
221 |
| - strategy: |
222 |
| - fail-fast: false |
223 |
| - matrix: |
224 |
| - vector: |
225 |
| - - jobname: linux-clang |
226 |
| - cc: clang |
227 |
| - pool: ubuntu-latest |
228 |
| - - jobname: linux-sha256 |
229 |
| - cc: clang |
230 |
| - os: ubuntu |
231 |
| - pool: ubuntu-latest |
232 |
| - - jobname: linux-gcc |
233 |
| - cc: gcc |
234 |
| - cc_package: gcc-8 |
235 |
| - pool: ubuntu-latest |
236 |
| - - jobname: linux-TEST-vars |
237 |
| - cc: gcc |
238 |
| - os: ubuntu |
239 |
| - cc_package: gcc-8 |
240 |
| - pool: ubuntu-latest |
241 |
| - - jobname: osx-clang |
242 |
| - cc: clang |
243 |
| - pool: macos-latest |
244 |
| - - jobname: osx-gcc |
245 |
| - cc: gcc |
246 |
| - cc_package: gcc-9 |
247 |
| - pool: macos-latest |
248 |
| - - jobname: linux-gcc-default |
249 |
| - cc: gcc |
250 |
| - pool: ubuntu-latest |
251 |
| - - jobname: linux-leaks |
252 |
| - cc: gcc |
253 |
| - pool: ubuntu-latest |
254 |
| - env: |
255 |
| - CC: ${{matrix.vector.cc}} |
256 |
| - CC_PACKAGE: ${{matrix.vector.cc_package}} |
257 |
| - jobname: ${{matrix.vector.jobname}} |
258 |
| - runs_on_pool: ${{matrix.vector.pool}} |
259 |
| - runs-on: ${{matrix.vector.pool}} |
260 |
| - steps: |
261 |
| - - uses: actions/checkout@v2 |
262 |
| - - run: ci/install-dependencies.sh |
263 |
| - - run: ci/run-build-and-tests.sh |
264 |
| - - name: print test failures |
265 |
| - if: failure() && env.FAILED_TEST_ARTIFACTS != '' |
266 |
| - shell: bash |
267 |
| - run: ci/print-test-failures.sh |
268 |
| - - name: Upload failed tests' directories |
269 |
| - if: failure() && env.FAILED_TEST_ARTIFACTS != '' |
270 |
| - uses: actions/upload-artifact@v2 |
271 |
| - with: |
272 |
| - name: failed-tests-${{matrix.vector.jobname}} |
273 |
| - path: ${{env.FAILED_TEST_ARTIFACTS}} |
274 |
| - dockerized: |
275 |
| - name: ${{matrix.vector.jobname}} (${{matrix.vector.image}}) |
276 |
| - needs: ci-config |
277 |
| - if: needs.ci-config.outputs.enabled == 'yes' |
278 |
| - strategy: |
279 |
| - fail-fast: false |
280 |
| - matrix: |
281 |
| - vector: |
282 |
| - - jobname: linux-musl |
283 |
| - image: alpine |
284 |
| - - jobname: linux32 |
285 |
| - os: ubuntu32 |
286 |
| - image: daald/ubuntu32:xenial |
287 |
| - - jobname: pedantic |
288 |
| - image: fedora |
289 |
| - env: |
290 |
| - jobname: ${{matrix.vector.jobname}} |
291 |
| - runs-on: ubuntu-latest |
292 |
| - container: ${{matrix.vector.image}} |
293 |
| - steps: |
294 |
| - - uses: actions/checkout@v1 |
295 |
| - - run: ci/install-docker-dependencies.sh |
296 |
| - - run: ci/run-build-and-tests.sh |
297 |
| - - name: print test failures |
298 |
| - if: failure() && env.FAILED_TEST_ARTIFACTS != '' |
299 |
| - shell: bash |
300 |
| - run: ci/print-test-failures.sh |
301 |
| - - name: Upload failed tests' directories |
302 |
| - if: failure() && env.FAILED_TEST_ARTIFACTS != '' |
303 |
| - uses: actions/upload-artifact@v1 |
304 |
| - with: |
305 |
| - name: failed-tests-${{matrix.vector.jobname}} |
306 |
| - path: ${{env.FAILED_TEST_ARTIFACTS}} |
307 |
| - static-analysis: |
308 |
| - needs: ci-config |
309 |
| - if: needs.ci-config.outputs.enabled == 'yes' |
310 |
| - env: |
311 |
| - jobname: StaticAnalysis |
312 |
| - runs-on: ubuntu-18.04 |
313 |
| - steps: |
314 |
| - - uses: actions/checkout@v2 |
315 |
| - - run: ci/install-dependencies.sh |
316 |
| - - run: ci/run-static-analysis.sh |
317 |
| - - run: ci/check-directional-formatting.bash |
318 |
| - sparse: |
319 |
| - needs: ci-config |
320 |
| - if: needs.ci-config.outputs.enabled == 'yes' |
321 |
| - env: |
322 |
| - jobname: sparse |
323 |
| - runs-on: ubuntu-20.04 |
324 |
| - steps: |
325 |
| - - name: Download a current `sparse` package |
326 |
| - # Ubuntu's `sparse` version is too old for us |
327 |
| - uses: git-for-windows/get-azure-pipelines-artifact@v0 |
328 |
| - with: |
329 |
| - repository: git/git |
330 |
| - definitionId: 10 |
331 |
| - artifact: sparse-20.04 |
332 |
| - - name: Install the current `sparse` package |
333 |
| - run: sudo dpkg -i sparse-20.04/sparse_*.deb |
334 |
| - - uses: actions/checkout@v2 |
335 |
| - - name: Install other dependencies |
336 |
| - run: ci/install-dependencies.sh |
337 |
| - - run: make sparse |
338 |
| - documentation: |
339 |
| - name: documentation |
340 |
| - needs: ci-config |
341 |
| - if: needs.ci-config.outputs.enabled == 'yes' |
342 |
| - env: |
343 |
| - jobname: Documentation |
344 |
| - runs-on: ubuntu-latest |
345 |
| - steps: |
346 |
| - - uses: actions/checkout@v2 |
347 |
| - - run: ci/install-dependencies.sh |
348 |
| - - run: ci/test-documentation.sh |
0 commit comments