Skip to content

Commit

Permalink
Automatically creates PR when no_atomic_cas.rs needs to be updated
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Feb 6, 2022
1 parent 4841888 commit a9795a9
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,40 @@ jobs:
--features unstable --ignore-unknown-features
# When this job failed, run ci/no_atomic_cas.sh and commit result changes.
# TODO(taiki-e): Ideally, this should be automated using a bot that creates
# PR when failed, but there is no bandwidth to implement it
# right now...
codegen:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v2
- name: Install Rust
run: rustup update nightly && rustup default nightly
- run: ci/no_atomic_cas.sh
- run: git diff --exit-code
- run: git add -N . && git diff --exit-code
if: github.event_name != 'schedule'
- id: diff
run: |
git config user.name "Taiki Endo"
git config user.email "[email protected]"
git add -N .
if ! git diff --exit-code; then
git add .
git commit -m "Update no_atomic_cas.rs"
echo "::set-output name=success::false"
fi
if: github.event_name == 'schedule'
- uses: peter-evans/create-pull-request@v3
with:
title: Update no_atomic_cas.rs
body: |
Auto-generated by [create-pull-request][1]
[Please close and immediately reopen this pull request to run CI.][2]
[1]: https://github.com/peter-evans/create-pull-request
[2]: https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs
branch: update-no-atomic-cas-rs
if: github.event_name == 'schedule' && steps.diff.outputs.success == 'false'

miri:
name: cargo miri test
Expand Down

0 comments on commit a9795a9

Please sign in to comment.