forked from rust-bitcoin/rust-bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge rust-bitcoin#2489: ci: pin nightly compiler, add CI cronjob to …
…update it. ee113aa ci: add daily job to update nightly rustc (Andrew Poelstra) f82567f ci: rename a couple .yml files to indicate that they're scheduled (Andrew Poelstra) 85ead84 ci: pin nightly in current CI (Andrew Poelstra) c97f2cc ci: require a nightly compiler rather than using +nightly (Andrew Poelstra) e386cbf ci: delete *test.sh files (Andrew Poelstra) Pull request description: We should be pinning our nightly compiler in CI so that * running CI on old release branches will continue to work (not quite -- we'd want to do the same thing for Cargo.lock, but ok, one PR at a time) * when CI breaks due to nightly updates (usually new Clippy lints), we can address that in a dedicated "update nightly" PR rather than having every other PR suddenly break on us Co-authored with ChatGPT which found several typos and suggested most of the error-handling logic. ACKs for top commit: tcharding: ACK ee113aa Kixunil: ACK ee113aa Tree-SHA512: f198349291a7654f4e6f03998d02c1f7d2c7f999e0b5a89a915beb3e7c741148c2c65367b107c54c34d6669e6f0972699401ef85e76e76e5900c1fb5c844db4f
- Loading branch information
Showing
12 changed files
with
68 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nightly-2024-02-18 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Update Nightly rustc | ||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # runs daily at 00:00 | ||
workflow_dispatch: # allows manual triggering | ||
jobs: | ||
format: | ||
name: Update nightly rustc | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Update rust.yml to use latest nightly | ||
run: | | ||
set -x | ||
# Not every night has a nightly, so extract the date from whatever | ||
# version of the compiler dtolnay/rust-toolchain gives us. | ||
NIGHTLY_DATE=$(rustc +nightly --verbose --version | sed -ne 's/^commit-date: //p') | ||
# Update the nightly version in the reference file. | ||
echo "nightly-${NIGHTLY_DATE}" > .github/nightly-version | ||
echo "nightly_date=${NIGHTLY_DATE}" >> $GITHUB_ENV | ||
# Some days there is no new nightly. In this case don't make an empty PR. | ||
if ! git diff --exit-code > /dev/null; then | ||
echo "Updated nightly. Opening PR." | ||
echo "changes_made=true" >> $GITHUB_ENV | ||
else | ||
echo "Attempted to update nightly but the latest-nightly date did not change. Not opening any PR." | ||
echo "changes_made=false" >> $GITHUB_ENV | ||
fi | ||
- name: Create Pull Request | ||
if: env.changes_made == 'true' | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
author: Update Nightly Rustc Bot <[email protected]> | ||
title: Automated daily update to rustc (to nightly-${{ env.nightly_date }}) | ||
body: | | ||
Automated update to Github CI workflow `rust.yml` by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action | ||
commit-message: Automated update to Github CI to rustc nightly-${{ env.nightly_date }} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.