|
9 | 9 |
|
10 | 10 | trigger-downstream-ci: |
11 | 11 | runs-on: ubuntu-latest |
| 12 | + timeout-minutes: 50 |
| 13 | + strategy: |
| 14 | + # One failing downstream must not stop the checks for the others |
| 15 | + # (replaces the old per-step `if: ${{ !cancelled() }}`). |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + include: |
| 19 | + - name: boringssl |
| 20 | + repo: open-quantum-safe/boringssl |
| 21 | + trigger: repository_dispatch |
| 22 | + - name: openssh |
| 23 | + repo: open-quantum-safe/openssh |
| 24 | + trigger: workflow_dispatch |
| 25 | + workflow: ubuntu.yaml |
| 26 | + ref: OQS-v9 |
| 27 | + - name: liboqs-cpp |
| 28 | + repo: open-quantum-safe/liboqs-cpp |
| 29 | + trigger: repository_dispatch |
| 30 | + - name: liboqs-go |
| 31 | + repo: open-quantum-safe/liboqs-go |
| 32 | + trigger: repository_dispatch |
| 33 | + - name: liboqs-python |
| 34 | + repo: open-quantum-safe/liboqs-python |
| 35 | + trigger: repository_dispatch |
| 36 | + - name: liboqs-java |
| 37 | + repo: open-quantum-safe/liboqs-java |
| 38 | + trigger: repository_dispatch |
| 39 | + - name: liboqs-rust |
| 40 | + repo: open-quantum-safe/liboqs-rust |
| 41 | + trigger: repository_dispatch |
| 42 | + # oqs-provider no longer uses CircleCI, and none of its CI |
| 43 | + # workflows currently expose a repository_dispatch or |
| 44 | + # workflow_dispatch trigger (only release.yml listens, for |
| 45 | + # "liboqs-release"). Re-enable this entry once such a trigger |
| 46 | + # is added to oqs-provider: |
| 47 | + # - name: oqs-provider |
| 48 | + # repo: open-quantum-safe/oqs-provider |
| 49 | + # trigger: repository_dispatch |
| 50 | + name: ${{ matrix.name }} |
12 | 51 | steps: |
13 | | - - name: Trigger OQS-BoringSSL CI |
14 | | - if: ${{ !cancelled() }} # run all steps independent of failures |
15 | | - run: | |
16 | | - response_code=$(curl --silent --show-error \ |
17 | | - --output response_body \ |
18 | | - --write-out "%{response_code}" \ |
19 | | - --request POST \ |
20 | | - --header "Accept: application/vnd.github+json" \ |
21 | | - --header "Authorization: Bearer ${{ secrets.OQSBOT_GITHUB_ACTIONS }}" \ |
22 | | - --header "X-GitHub-Api-Version: 2022-11-28" \ |
23 | | - --data '{"event_type":"liboqs-upstream-trigger"}' \ |
24 | | - https://api.github.com/repos/open-quantum-safe/boringssl/dispatches) |
25 | | - cat response_body |
26 | | - test "$response_code" = "204" |
27 | | - - name: Trigger OQS-OpenSSH CI |
28 | | - if: ${{ !cancelled() }} # run all steps independent of failures |
29 | | - run: | |
30 | | - response_code=$(curl --silent --show-error \ |
31 | | - --output response_body \ |
32 | | - --write-out "%{response_code}" \ |
33 | | - --request POST \ |
34 | | - --header "Accept: application/vnd.github+json" \ |
35 | | - --header "Authorization: Bearer ${{ secrets.OQSBOT_GITHUB_ACTIONS }}" \ |
36 | | - --header "X-GitHub-Api-Version: 2022-11-28" \ |
37 | | - --data '{"ref":"OQS-v9"}' \ |
38 | | - https://api.github.com/repos/open-quantum-safe/openssh/actions/workflows/ubuntu.yaml/dispatches) |
39 | | - cat response_body |
40 | | - test "$response_code" = "204" |
41 | | - - name: Trigger oqs-provider CI |
42 | | - if: ${{ !cancelled() }} # run all steps independent of failures |
43 | | - run: | |
44 | | - response_code=$(curl --silent --show-error \ |
45 | | - --output response_body \ |
46 | | - --write-out "%{response_code}" \ |
47 | | - --user ${{ secrets.BUILD_TRIGGER_TOKEN }}: \ |
48 | | - --request POST \ |
49 | | - --header "Content-Type: application/json" \ |
50 | | - --data '{ "branch": "main" }' \ |
51 | | - https://circleci.com/api/v2/project/gh/open-quantum-safe/oqs-provider/pipeline) |
52 | | - cat response_body |
53 | | - test "$response_code" = "201" |
54 | | - pipeline_state=$(jq -r '.state' response_body) |
55 | | - test "$pipeline_state" != "errored" |
56 | | - - name: Trigger liboqs-cpp CI |
57 | | - if: ${{ !cancelled() }} # run all steps independent of failures |
58 | | - run: | |
59 | | - response_code=$(curl --silent --show-error \ |
60 | | - --output response_body \ |
61 | | - --write-out "%{response_code}" \ |
62 | | - --request POST \ |
63 | | - --header "Accept: application/vnd.github+json" \ |
64 | | - --header "Authorization: Bearer ${{ secrets.OQSBOT_GITHUB_ACTIONS }}" \ |
65 | | - --header "X-GitHub-Api-Version: 2022-11-28" \ |
66 | | - --data '{"event_type":"liboqs-upstream-trigger"}' \ |
67 | | - https://api.github.com/repos/open-quantum-safe/liboqs-cpp/dispatches) |
68 | | - cat response_body |
69 | | - test "$response_code" = "204" |
70 | | - - name: Trigger liboqs-go CI |
71 | | - if: ${{ !cancelled() }} # run all steps independent of failures |
72 | | - run: | |
73 | | - response_code=$(curl --silent --show-error \ |
74 | | - --output response_body \ |
75 | | - --write-out "%{response_code}" \ |
76 | | - --request POST \ |
77 | | - --header "Accept: application/vnd.github+json" \ |
78 | | - --header "Authorization: Bearer ${{ secrets.OQSBOT_GITHUB_ACTIONS }}" \ |
79 | | - --header "X-GitHub-Api-Version: 2022-11-28" \ |
80 | | - --data '{"event_type":"liboqs-upstream-trigger"}' \ |
81 | | - https://api.github.com/repos/open-quantum-safe/liboqs-go/dispatches) |
82 | | - cat response_body |
83 | | - test "$response_code" = "204" |
84 | | - - name: Trigger liboqs-python CI |
85 | | - if: ${{ !cancelled() }} # run all steps independent of failures |
86 | | - run: | |
87 | | - response_code=$(curl --silent --show-error \ |
88 | | - --output response_body \ |
89 | | - --write-out "%{response_code}" \ |
90 | | - --request POST \ |
91 | | - --header "Accept: application/vnd.github+json" \ |
92 | | - --header "Authorization: Bearer ${{ secrets.OQSBOT_GITHUB_ACTIONS }}" \ |
93 | | - --header "X-GitHub-Api-Version: 2022-11-28" \ |
94 | | - --data '{"event_type":"liboqs-upstream-trigger"}' \ |
95 | | - https://api.github.com/repos/open-quantum-safe/liboqs-python/dispatches) |
96 | | - cat response_body |
97 | | - test "$response_code" = "204" |
98 | | - - name: Trigger liboqs-java CI |
99 | | - if: ${{ !cancelled() }} # run all steps independent of failures |
100 | | - run: | |
101 | | - response_code=$(curl --silent --show-error \ |
102 | | - --output response_body \ |
103 | | - --write-out "%{response_code}" \ |
104 | | - --request POST \ |
105 | | - --header "Accept: application/vnd.github+json" \ |
106 | | - --header "Authorization: Bearer ${{ secrets.OQSBOT_GITHUB_ACTIONS }}" \ |
107 | | - --header "X-GitHub-Api-Version: 2022-11-28" \ |
108 | | - --data '{"event_type":"liboqs-upstream-trigger"}' \ |
109 | | - https://api.github.com/repos/open-quantum-safe/liboqs-java/dispatches) |
110 | | - cat response_body |
111 | | - test "$response_code" = "204" |
112 | | - - name: Trigger liboqs-rust CI |
113 | | - if: ${{ !cancelled() }} # run all steps independent of failures |
114 | | - run: | |
115 | | - response_code=$(curl --silent --show-error \ |
116 | | - --output response_body \ |
117 | | - --write-out "%{response_code}" \ |
118 | | - --request POST \ |
119 | | - --header "Accept: application/vnd.github+json" \ |
120 | | - --header "Authorization: Bearer ${{ secrets.OQSBOT_GITHUB_ACTIONS }}" \ |
121 | | - --header "X-GitHub-Api-Version: 2022-11-28" \ |
122 | | - --data '{"event_type":"liboqs-upstream-trigger"}' \ |
123 | | - https://api.github.com/repos/open-quantum-safe/liboqs-rust/dispatches) |
124 | | - cat response_body |
125 | | - test "$response_code" = "204" |
| 52 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.2 |
| 53 | + - name: Trigger ${{ matrix.name }} CI and wait for its result |
| 54 | + env: |
| 55 | + OQSBOT_GITHUB_ACTIONS: ${{ secrets.OQSBOT_GITHUB_ACTIONS }} |
| 56 | + run: | |
| 57 | + python3 scripts/trigger_downstream_ci.py \ |
| 58 | + --repo "${{ matrix.repo }}" \ |
| 59 | + --trigger-type "${{ matrix.trigger }}" \ |
| 60 | + --event-type "liboqs-upstream-trigger" \ |
| 61 | + --workflow "${{ matrix.workflow || '' }}" \ |
| 62 | + --ref "${{ matrix.ref || 'main' }}" \ |
| 63 | + --timeout 2700 |
0 commit comments