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

Remove bors CI config #225

Merged
merged 2 commits into from
Jan 24, 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
43 changes: 16 additions & 27 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Rust

on:
push:
branches: [
master,
auto, # used for bors
try # used for bors
]
branches:
- master
- stable
pull_request:
branches: [ master ]
branches:
- master
- stable

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -39,26 +39,15 @@ jobs:
run: cargo doc --verbose --no-deps
- name: Check big endian
run: cargo check --target powerpc64-unknown-linux-gnu --verbose --all

# 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
runs-on: ubuntu-latest
needs: [build]
if: github.event.pusher.name == 'bors' && success()
steps:
- name: mark the job as a success
run: exit 0

end-failure:
name: bors build finished
success:
needs:
- build
runs-on: ubuntu-latest
needs: [build]
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
# dependencies fails.
if: always() # make sure this is never "skipped"
steps:
- name: mark the job as a failure
run: exit 1
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: check if any dependency failed
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'