-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from jfrimmel/test-with-beta-compiler
Periodically test repository with beta compiler
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# It can happen, that new compiler versions introduce new behavior to the Rust | ||
# standard library, which might impact this tool (see rust-lang/rust#133574 for | ||
# an example of such an issue). Therefore this job builds the code with the | ||
# current beta compiler to detect potential issues before they reach the stable | ||
# compiler/standard library. The jobs runs periodically. | ||
name: Check against Rust Beta versions | ||
on: | ||
schedule: | ||
- cron: '0 9 * * SUN' # run at every Sunday morning | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: rustup update beta && rustup default beta | ||
- name: Compile the code with the beta compiler | ||
id: build-beta | ||
run: | | ||
set -uex | ||
if ! cargo test > error.log 2>&1; then | ||
printf 'Hello, I have detected, that this repository does not work with the current beta compiler.\n\nIt looks like, there were changes introduced, that broke this repository. The error was:\n```console\n%s\n```\nPlease take actions to fix this before the behavior reaches stable.' "$(< error.log)" | gh issue create --title 'The compilation fails with current beta compiler' --body-file - | ||
fi | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_REPO: ${{ github.repository }} |