Merge pull request #3981 from Kobzol/ci-merge-queue
Switch CI to merge queues
This commit is contained in:
commit
340d2f7847
39
src/tools/miri/.github/workflows/ci.yml
vendored
39
src/tools/miri/.github/workflows/ci.yml
vendored
@ -1,11 +1,7 @@
|
|||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
merge_group:
|
||||||
# Run in PRs and for bors, but not on master.
|
|
||||||
branches:
|
|
||||||
- 'auto'
|
|
||||||
- 'try'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
@ -62,27 +58,24 @@ jobs:
|
|||||||
- name: rustdoc
|
- name: rustdoc
|
||||||
run: RUSTDOCFLAGS="-Dwarnings" ./miri doc --document-private-items
|
run: RUSTDOCFLAGS="-Dwarnings" ./miri doc --document-private-items
|
||||||
|
|
||||||
# These jobs doesn't actually test anything, but they're only used to tell
|
conclusion:
|
||||||
# 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
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [build, style]
|
needs: [build, style]
|
||||||
if: github.event.pusher.name == 'bors' && success()
|
# We need to ensure this job does *not* get skipped if its dependencies fail,
|
||||||
steps:
|
# because a skipped job is considered a success by GitHub. So we have to
|
||||||
- name: mark the job as a success
|
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
|
||||||
run: exit 0
|
# 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: ${{ !cancelled() }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build, style]
|
|
||||||
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
|
|
||||||
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) }}'
|
||||||
|
|
||||||
cron-fail-notify:
|
cron-fail-notify:
|
||||||
name: cronjob failure notification
|
name: cronjob failure notification
|
||||||
|
Loading…
Reference in New Issue
Block a user