Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from using Bors to merge queue in CI #575

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 10 additions & 27 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: Rust

on:
push:
branches-ignore:
- trying.tmp
- staging.tmp
pull_request:
merge_group:

jobs:
miri:
Expand Down Expand Up @@ -90,28 +87,14 @@ jobs:
TARGET: x86_64-unknown-linux-gnu
run: sh ci/run.sh

# These jobs doesn't actually test anything, but they're only used to tell
# bors the build completed, as there is no practical way to detect when a
# workflow is successful listening to webhooks only.
#
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!

end-success:
name: bors build finished
if: github.event.pusher.name == 'bors' && success()
runs-on: ubuntu-latest
needs: [miri, rustfmt_clippy, test, msrv]

steps:
- name: Mark the job as successful
run: exit 0

end-failure:
name: bors build finished
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
conclusion:
needs: [test, msrv]
# !cancelled() executes the job regardless of whether the previous jobs passed, failed or get skipped.
if: ${{ !cancelled() }}
Kobzol marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
needs: [miri, rustfmt_clippy, test, msrv]

steps:
- name: Mark the job as a failure
run: exit 1
- name: Conclusion
run: |
jq -C <<< '${{ toJson(needs) }}'
# Check if all needs were successful.
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
Loading