mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
Switch CI from bors to merge queue
This commit is contained in:
parent
42f41439b2
commit
92cf8134bc
65
.github/workflows/main.yml
vendored
65
.github/workflows/main.yml
vendored
@ -1,10 +1,6 @@
|
||||
name: CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- auto-cargo
|
||||
- try
|
||||
- automation/bors/try
|
||||
merge_group:
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
@ -17,46 +13,39 @@ permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ (github.ref == 'refs/heads/try' && github.sha) || github.ref }}"
|
||||
group: "${{ github.workflow }}-${{ github.ref }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
success:
|
||||
conclusion:
|
||||
needs:
|
||||
- build_std
|
||||
- clippy
|
||||
- msrv
|
||||
- docs
|
||||
- lockfile
|
||||
- resolver
|
||||
- rustfmt
|
||||
- test
|
||||
- test_gitoxide
|
||||
permissions:
|
||||
contents: none
|
||||
name: bors build finished
|
||||
needs:
|
||||
- build_std
|
||||
- clippy
|
||||
- msrv
|
||||
- docs
|
||||
- lockfile
|
||||
- resolver
|
||||
- rustfmt
|
||||
- test
|
||||
- test_gitoxide
|
||||
# We need to ensure this job does *not* get skipped if its dependencies fail,
|
||||
# because a skipped job is considered a success by GitHub. So we have to
|
||||
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
|
||||
# when the workflow is canceled manually.
|
||||
#
|
||||
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
|
||||
if: ${{ !cancelled() }}
|
||||
runs-on: ubuntu-latest
|
||||
if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/auto-cargo' || github.ref == 'refs/heads/try') && github.repository == 'rust-lang/cargo'"
|
||||
steps:
|
||||
- run: echo ok
|
||||
failure:
|
||||
permissions:
|
||||
contents: none
|
||||
name: bors build finished
|
||||
needs:
|
||||
- build_std
|
||||
- clippy
|
||||
- msrv
|
||||
- docs
|
||||
- lockfile
|
||||
- resolver
|
||||
- rustfmt
|
||||
- test
|
||||
- test_gitoxide
|
||||
runs-on: ubuntu-latest
|
||||
if: "!success() && github.event_name == 'push' && (github.ref == 'refs/heads/auto-cargo' || github.ref == 'refs/heads/try') && github.repository == 'rust-lang/cargo'"
|
||||
steps:
|
||||
- run: exit 1
|
||||
# Manually check the status of all dependencies. `if: failure()` does not work.
|
||||
- name: Conclusion
|
||||
run: |
|
||||
# Print the dependent jobs to see them in the CI log
|
||||
jq -C <<< '${{ toJson(needs) }}'
|
||||
# Check if all jobs that we depend on (in the needs array) were successful.
|
||||
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
|
||||
|
||||
# Check Code style quickly by running `rustfmt` over all code
|
||||
rustfmt:
|
||||
|
Loading…
x
Reference in New Issue
Block a user