-
Notifications
You must be signed in to change notification settings - Fork 26.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e19007d
commit e492d13
Showing
7 changed files
with
114 additions
and
26 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,42 @@ | ||
name: 'Turbo Rust Setup' | ||
description: 'Sets up the Rust toolchain for CI' | ||
inputs: | ||
targets: | ||
description: 'Comma-separated list of target triples to install for this toolchain' | ||
required: false | ||
components: | ||
description: 'Comma-separated list of components to be additionally installed' | ||
required: false | ||
skip-install: | ||
description: 'Sets environment variables without installing the rust toolchain' | ||
required: false | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: 'Get toolchain version from file' | ||
id: file | ||
shell: bash | ||
run: echo "toolchain=$(cat ./rust-toolchain)" >> $GITHUB_OUTPUT | ||
|
||
- name: 'Set rust default environment' | ||
shell: bash | ||
run: | | ||
echo "RUST_TOOLCHAIN=${{ steps.file.outputs.toolchain }}" >> $GITHUB_ENV | ||
echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV | ||
echo "CARGO_TERM_COLOR=always" >> $GITHUB_ENV | ||
echo "RUST_BACKTRACE=short" >> $GITHUB_ENV | ||
# Enable faster sparse index | ||
echo "CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse" >> $GITHUB_ENV | ||
- name: 'Setup Rust toolchain' | ||
uses: dtolnay/rust-toolchain@master | ||
if: ${{ !inputs.skip-install }} | ||
with: | ||
toolchain: ${{ steps.file.outputs.toolchain }} | ||
targets: ${{ inputs.targets }} | ||
components: ${{ inputs.components }} | ||
|
||
- name: 'Add cargo problem matchers' | ||
shell: bash | ||
run: echo "::add-matcher::${{ github.action_path }}/matchers.json" |
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,44 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "cargo-common", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(warning|warn|error)(?:\\[(\\S*)\\])?: (.*)$", | ||
"severity": 1, | ||
"code": 2, | ||
"message": 3 | ||
}, | ||
{ | ||
"regexp": "^(?:[\\s->=]*(.*):(\\d*):(\\d*)|.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "cargo-test", | ||
"pattern": [ | ||
{ | ||
"regexp": "^.*panicked\\s+at\\s+'(.*)',\\s+(.*):(\\d+):(\\d+)$", | ||
"message": 1, | ||
"file": 2, | ||
"line": 3, | ||
"column": 4 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "rustfmt", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(Diff in (\\S+)) at line (\\d+):", | ||
"message": 1, | ||
"file": 2, | ||
"line": 3 | ||
} | ||
] | ||
} | ||
] | ||
} |
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 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 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