diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 54db36a063e..7e4f262261c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,7 +19,7 @@ jobs: # This is ci/actions-templates/windows-builds-template.yaml # Do not edit this file in .github/workflows - build-windows-pr: # skip-master skip-stable + build-windows-pr: # job-name skip-master skip-stable runs-on: windows-latest if: ${{ github.event.pull_request }} # skip-master skip-stable env: @@ -151,7 +151,7 @@ jobs: # This is ci/actions-templates/windows-builds-template.yaml # Do not edit this file in .github/workflows - build-windows-master: # skip-pr skip-stable + build-windows-master: # job-name skip-pr skip-stable runs-on: windows-latest if: ${{ (github.event.push && github.ref_name == 'master') || github.event.schedule }} # skip-pr skip-stable env: @@ -288,7 +288,7 @@ jobs: # This is ci/actions-templates/windows-builds-template.yaml # Do not edit this file in .github/workflows - build-windows-stable: # skip-master skip-pr + build-windows-stable: # job-name skip-master skip-pr runs-on: windows-latest if: ${{ github.event.push && github.ref_name == 'stable' }} # skip-pr skip-master env: @@ -430,7 +430,7 @@ jobs: # This is ci/actions-templates/linux-builds-template.yaml # Do not edit this file in .github/workflows - build-linux-pr: # skip-master skip-stable + build-linux-pr: # job-name skip-master skip-stable runs-on: ubuntu-latest if: ${{ github.event.pull_request }} # skip-master skip-stable strategy: @@ -574,7 +574,7 @@ jobs: # This is ci/actions-templates/linux-builds-template.yaml # Do not edit this file in .github/workflows - build-linux-master: # skip-pr skip-stable + build-linux-master: # job-name skip-pr skip-stable runs-on: ubuntu-latest if: ${{ (github.event.push && github.ref_name == 'master') || github.event.schedule }} # skip-pr skip-stable strategy: @@ -723,7 +723,7 @@ jobs: # This is ci/actions-templates/linux-builds-template.yaml # Do not edit this file in .github/workflows - build-linux-stable: # skip-master skip-pr + build-linux-stable: # job-name skip-master skip-pr runs-on: ubuntu-latest if: ${{ github.event.push && github.ref_name == 'stable' }} # skip-pr skip-master strategy: @@ -898,7 +898,7 @@ jobs: # This is ci/actions-templates/macos-builds-template.yaml # Do not edit this file in .github/workflows - build-macos: + build-macos: # job-name runs-on: macos-latest strategy: matrix: @@ -1021,7 +1021,7 @@ jobs: # This is ci/actions-templates/freebsd-builds-template.yaml # Do not edit this file in .github/workflows - build-freebsd: + build-freebsd: # job-name runs-on: ubuntu-latest steps: - name: Clone repo @@ -1031,6 +1031,7 @@ jobs: with: release: 13.2 usesh: true + sync: sshfs copyback: false prepare: | pkg install -y git gmake bash sudo @@ -1045,7 +1046,7 @@ jobs: # This is ci/actions-templates/centos-fmt-clippy.yaml # Do not edit this file in .github/workflows - check: + check: # job-name runs-on: ubuntu-latest strategy: fail-fast: false @@ -1131,7 +1132,7 @@ jobs: # Unlike our main workflows, this doesn't self-test the rustup install scripts, # nor run on the rust docker images. This permits a smaller workflow without the # templating and so on. - build-all-features: + build-all-features: # job-name runs-on: ubuntu-latest if: ${{ github.event.pull_request }} strategy: @@ -1170,7 +1171,7 @@ jobs: # # Builds docs for both stable and master branches. # stable is placed in the root of the gh-pages branch, while master is placed at /devel - doc: + doc: # job-name name: Documentation runs-on: ubuntu-latest if: ${{ github.event.pull_request }} @@ -1191,3 +1192,30 @@ jobs: run: | cd doc/dev-guide mdbook build + + # This is ci/actions-templates/conclusion-template.yaml + # Do not edit this file in .github/workflows + conclusion: + # https://github.com/PyO3/pyo3/blob/42601f3af94242b017402b763a495798a92da8f8/.github/workflows/ci.yml#L452-L472 + if: always() + runs-on: ubuntu-latest + steps: + - name: Result + run: | + jq -C <<< "${needs}" + # Check if all needs were successful or skipped. + "$(jq -r 'all(.result as $result | (["success", "skipped"] | contains([$result])))' <<< "${needs}")" + env: + needs: ${{ toJson(needs) }} + needs: + - build-windows-pr + - build-windows-master + - build-windows-stable + - build-linux-pr + - build-linux-master + - build-linux-stable + - build-macos + - build-freebsd + - check + - build-all-features + - doc diff --git a/ci/actions-templates/all-features-template.yaml b/ci/actions-templates/all-features-template.yaml index 67693ba5d3a..7e7bab0c212 100644 --- a/ci/actions-templates/all-features-template.yaml +++ b/ci/actions-templates/all-features-template.yaml @@ -7,7 +7,7 @@ jobs: # skip-all # Unlike our main workflows, this doesn't self-test the rustup install scripts, # nor run on the rust docker images. This permits a smaller workflow without the # templating and so on. - build-all-features: + build-all-features: # job-name runs-on: ubuntu-latest if: ${{ github.event.pull_request }} strategy: diff --git a/ci/actions-templates/centos-fmt-clippy-template.yaml b/ci/actions-templates/centos-fmt-clippy-template.yaml index f46136ae2da..c06496380e4 100644 --- a/ci/actions-templates/centos-fmt-clippy-template.yaml +++ b/ci/actions-templates/centos-fmt-clippy-template.yaml @@ -2,7 +2,7 @@ jobs: # skip-all # This is ci/actions-templates/centos-fmt-clippy.yaml # Do not edit this file in .github/workflows - check: + check: # job-name runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/ci/actions-templates/conclusion-template.yaml b/ci/actions-templates/conclusion-template.yaml new file mode 100644 index 00000000000..451398a0936 --- /dev/null +++ b/ci/actions-templates/conclusion-template.yaml @@ -0,0 +1,17 @@ +jobs: # skip-all + + # This is ci/actions-templates/conclusion-template.yaml + # Do not edit this file in .github/workflows + conclusion: + # https://github.com/PyO3/pyo3/blob/42601f3af94242b017402b763a495798a92da8f8/.github/workflows/ci.yml#L452-L472 + if: always() + runs-on: ubuntu-latest + steps: + - name: Result + run: | + jq -C <<< "${needs}" + # Check if all needs were successful or skipped. + "$(jq -r 'all(.result as $result | (["success", "skipped"] | contains([$result])))' <<< "${needs}")" + env: + needs: ${{ toJson(needs) }} + needs: diff --git a/ci/actions-templates/freebsd-builds-template.yaml b/ci/actions-templates/freebsd-builds-template.yaml index 178fc8d29be..fe2dd63e7e1 100644 --- a/ci/actions-templates/freebsd-builds-template.yaml +++ b/ci/actions-templates/freebsd-builds-template.yaml @@ -2,7 +2,7 @@ jobs: # skip-all # This is ci/actions-templates/freebsd-builds-template.yaml # Do not edit this file in .github/workflows - build-freebsd: + build-freebsd: # job-name runs-on: ubuntu-latest steps: - name: Clone repo diff --git a/ci/actions-templates/gen-workflows.sh b/ci/actions-templates/gen-workflows.sh index f385f4989e9..3b938a4de69 100755 --- a/ci/actions-templates/gen-workflows.sh +++ b/ci/actions-templates/gen-workflows.sh @@ -42,3 +42,7 @@ gen_job freebsd-builds all gen_job centos-fmt-clippy all gen_job all-features all gen_job test-docs all + +gen_job conclusion all + +cat "$OUTPATH" | perl -nE 'say " - $1" if (m/^\s*([\w-_]+)\s*:.*job-name.*$/)' >> "$OUTPATH" diff --git a/ci/actions-templates/linux-builds-template.yaml b/ci/actions-templates/linux-builds-template.yaml index 08f0e649f1c..910124828d3 100644 --- a/ci/actions-templates/linux-builds-template.yaml +++ b/ci/actions-templates/linux-builds-template.yaml @@ -2,9 +2,9 @@ jobs: # skip-master skip-pr skip-stable # This is ci/actions-templates/linux-builds-template.yaml # Do not edit this file in .github/workflows - build-linux-pr: # skip-master skip-stable - build-linux-master: # skip-pr skip-stable - build-linux-stable: # skip-master skip-pr + build-linux-pr: # job-name skip-master skip-stable + build-linux-master: # job-name skip-pr skip-stable + build-linux-stable: # job-name skip-master skip-pr runs-on: ubuntu-latest if: ${{ github.event.pull_request }} # skip-master skip-stable if: ${{ (github.event.push && github.ref_name == 'master') || github.event.schedule }} # skip-pr skip-stable diff --git a/ci/actions-templates/macos-builds-template.yaml b/ci/actions-templates/macos-builds-template.yaml index e3f0b4ae762..efbb39fb91d 100644 --- a/ci/actions-templates/macos-builds-template.yaml +++ b/ci/actions-templates/macos-builds-template.yaml @@ -2,7 +2,7 @@ jobs: # skip-all # This is ci/actions-templates/macos-builds-template.yaml # Do not edit this file in .github/workflows - build-macos: + build-macos: # job-name runs-on: macos-latest strategy: matrix: diff --git a/ci/actions-templates/test-docs-template.yaml b/ci/actions-templates/test-docs-template.yaml index a85a7ef7a81..46b0def2f4e 100644 --- a/ci/actions-templates/test-docs-template.yaml +++ b/ci/actions-templates/test-docs-template.yaml @@ -5,7 +5,7 @@ jobs: # skip-all # # Builds docs for both stable and master branches. # stable is placed in the root of the gh-pages branch, while master is placed at /devel - doc: + doc: # job-name name: Documentation runs-on: ubuntu-latest if: ${{ github.event.pull_request }} diff --git a/ci/actions-templates/windows-builds-template.yaml b/ci/actions-templates/windows-builds-template.yaml index 31103f93630..3641ff37fc5 100644 --- a/ci/actions-templates/windows-builds-template.yaml +++ b/ci/actions-templates/windows-builds-template.yaml @@ -2,9 +2,9 @@ jobs: # skip-master skip-pr skip-stable # This is ci/actions-templates/windows-builds-template.yaml # Do not edit this file in .github/workflows - build-windows-pr: # skip-master skip-stable - build-windows-master: # skip-pr skip-stable - build-windows-stable: # skip-master skip-pr + build-windows-pr: # job-name skip-master skip-stable + build-windows-master: # job-name skip-pr skip-stable + build-windows-stable: # job-name skip-master skip-pr runs-on: windows-latest if: ${{ github.event.pull_request }} # skip-master skip-stable if: ${{ (github.event.push && github.ref_name == 'master') || github.event.schedule }} # skip-pr skip-stable