mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 21:13:37 +00:00
Switch CI from bors to merge queues
This commit is contained in:
parent
c58427ff94
commit
373ff60d38
1 changed files with 17 additions and 20 deletions
37
.github/workflows/ci.yaml
vendored
37
.github/workflows/ci.yaml
vendored
|
@ -1,14 +1,10 @@
|
||||||
# Please make sure that the `needs` fields for both `end-success` and `end-failure`
|
# Please make sure that the `needs` field for the `conclusion` job
|
||||||
# are updated when adding new jobs!
|
# are updated when adding new jobs!
|
||||||
|
|
||||||
name: CI
|
name: CI
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
merge_group:
|
||||||
branches:
|
|
||||||
- auto
|
|
||||||
- try
|
|
||||||
- automation/bors/try
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
|
@ -237,20 +233,21 @@ jobs:
|
||||||
- name: check for typos
|
- name: check for typos
|
||||||
run: typos
|
run: typos
|
||||||
|
|
||||||
end-success:
|
conclusion:
|
||||||
name: bors build finished
|
|
||||||
if: github.event.pusher.name == 'bors' && success()
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [rust, rust-cross, typescript, typo-check]
|
needs: [rust, rust-cross, typescript, typo-check]
|
||||||
steps:
|
# We need to ensure this job does *not* get skipped if its dependencies fail,
|
||||||
- name: Mark the job as successful
|
# because a skipped job is considered a success by GitHub. So we have to
|
||||||
run: exit 0
|
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
|
||||||
|
# when the workflow is canceled manually.
|
||||||
end-failure:
|
#
|
||||||
name: bors build finished
|
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
|
||||||
if: github.event.pusher.name == 'bors' && !success()
|
if: ${{ !cancelled() }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [rust, rust-cross, typescript, typo-check]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Mark the job as a failure
|
# Manually check the status of all dependencies. `if: failure()` does not work.
|
||||||
run: exit 1
|
- 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) }}'
|
||||||
|
|
Loading…
Reference in a new issue