File tree Expand file tree Collapse file tree 6 files changed +57
-40
lines changed
cargo-install-upload-artifacts Expand file tree Collapse file tree 6 files changed +57
-40
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,15 @@ runs:
2929 shell : bash
3030
3131 - name : Build with all features
32- uses : actions-rs/cargo@v1
33- with :
34- command : install
35- args : >
32+ run :
33+ cargo install
3634 --locked
3735 --path .
3836 --target ${{ inputs.target }}
3937 --all-features
4038 --root ${{ steps.metadata.outputs.out-dir }}
4139 --bins
42- use-cross : true
40+ shell : ${{ contains(runner.os, 'windows') && 'pwsh' || 'bash' }}
4341 env :
4442 RUSTFLAGS : " " # Make sure to unset RUSTFLAGS
4543
Original file line number Diff line number Diff line change 2828
2929 - name : Log into crates.io
3030 if : github.event_name != 'pull_request'
31- uses : actions-rs/cargo@v1
32- with :
33- command : login
34- args : -- ${{ inputs.cargo-registry-token }}
31+ run : cargo login -- ${{ inputs.cargo-registry-token }}
32+ shell : bash
3533
3634 - run : gh release delete --yes Unreleased || exit 0
3735 if : >
5755 ${{ steps.download-artifacts.outputs.download-path }}/cross-*/*
5856
5957 - name : Publish crate
60- uses : actions-rs/cargo@v1
61- with :
62- command : publish
63- args : ${{ !startsWith(github.ref, 'refs/tags/v') && '--dry-run' || '' }}
58+ run : cargo publish ${{ !startsWith(github.ref, 'refs/tags/v') && '--dry-run' || '' }}
59+ shell : bash
Original file line number Diff line number Diff line change @@ -15,17 +15,15 @@ inputs:
1515runs :
1616 using : composite
1717 steps :
18- # Work around for sporadic issues with rustup self-update on windows
19- - run : rustup set auto-self-update disable
20- if : contains(runner.os, 'windows')
21- shell : bash
2218 - name : Install Rust toolchain
23- uses : actions-rs/ toolchain@v1
19+ uses : dtolnay/rust- toolchain@v1
2420 with :
2521 toolchain : ${{ inputs.toolchain }}
2622 target : ${{ inputs.target }}
27- default : true
2823 components : ${{ inputs.components }}
29- profile : minimal
24+
25+ - name : Install rust matcher
26+ run : echo "::add-matcher::.github/actions/setup-rust/rust.json"
27+ shell : bash
3028
3129 -
uses :
Swatinem/[email protected]
Original file line number Diff line number Diff line change 1+ {
2+ "problemMatcher" : [
3+ {
4+ "owner" : " rust" ,
5+ "pattern" : [
6+ {
7+ "regexp" : " ^(warning|warn|error)(\\ [(.*)\\ ])?: (.*)$" ,
8+ "severity" : 1 ,
9+ "message" : 4 ,
10+ "code" : 3
11+ },
12+ {
13+ "regexp" : " ^([\\ s->=]*(.*):(\\ d*):(\\ d*)|.*)$" ,
14+ "file" : 2 ,
15+ "line" : 3 ,
16+ "column" : 4
17+ }
18+ ]
19+ },
20+ {
21+ "owner" : " cross-rs" ,
22+ "pattern" : [
23+ {
24+ "regexp" : " ^\\ [cross\\ ] (warning|error): (.*)$" ,
25+ "severity" : 1 ,
26+ "message" : 2
27+ }
28+ ]
29+ }
30+ ]
31+ }
Original file line number Diff line number Diff line change 3636 components : rustfmt
3737
3838 - name : Run rustfmt
39- uses : actions-rs/cargo@v1
40- with :
41- command : fmt
42- args : -- --check
39+ run : cargo fmt -- --check
4340
4441 clippy :
4542 runs-on : ${{ matrix.os }}
5855 toolchain : 1.58.1 # MSRV, Minimally Supported Rust Version. Make sure to update README.md
5956
6057 - name : Run clippy
61- uses : actions-rs/cargo@v1
62- with :
63- command : clippy
64- args : --locked --all-targets --all-features --workspace -- -D warnings
65-
58+ run : cargo clippy --locked --all-targets --all-features --workspace -- -D warnings
6659 test :
6760 runs-on : ${{ matrix.os }}
6861 strategy :
8073 name : test-${{matrix.os}}
8174
8275 - name : Run unit tests
83- uses : actions-rs/cargo@v1
84- with :
85- command : test
86- args : --locked --all-targets --workspace --all-features
76+ run : cargo test --locked --all-targets --workspace --all-features
8777 timeout-minutes : 10
8878 check :
8979 runs-on : ubuntu-latest
9484 - uses : ./.github/actions/setup-rust
9585 - run : cargo xtask ci-job check
9686 id : check
97- shell : bash
9887 generate-matrix :
9988 runs-on : ubuntu-latest
10089 outputs :
@@ -199,7 +188,6 @@ jobs:
199188 if : matrix.deploy
200189 with :
201190 target : ${{ matrix.target }}
202- image : ${{ steps.build-docker-image.outputs.image }}
203191
204192 - name : Test Zig Image
205193 if : steps.prepare-meta.outputs.has-image && steps.prepare-meta.outputs.test-variant == 'zig'
Original file line number Diff line number Diff line change @@ -756,15 +756,21 @@ pub(crate) fn warn_host_version_mismatch(
756756 host_version_meta. short_version_string
757757 ) ;
758758 if versions. is_lt ( ) || ( versions. is_eq ( ) && dates. is_lt ( ) ) {
759- msg_info. warn ( format_args ! ( "using older {rustc_warning}.\n > Update with `rustup update --force-non-host {toolchain}`" ) ) ?;
759+ if cfg ! ( not( test) ) {
760+ msg_info. warn ( format_args ! ( "using older {rustc_warning}.\n > Update with `rustup update --force-non-host {toolchain}`" ) ) ?;
761+ }
760762 return Ok ( VersionMatch :: OlderTarget ) ;
761763 } else if versions. is_gt ( ) || ( versions. is_eq ( ) && dates. is_gt ( ) ) {
762- msg_info. warn ( format_args ! (
763- "using newer {rustc_warning}.\n > Update with `rustup update`"
764- ) ) ?;
764+ if cfg ! ( not( test) ) {
765+ msg_info. warn ( format_args ! (
766+ "using newer {rustc_warning}.\n > Update with `rustup update`"
767+ ) ) ?;
768+ }
765769 return Ok ( VersionMatch :: NewerTarget ) ;
766770 } else {
767- msg_info. warn ( format_args ! ( "using {rustc_warning}." ) ) ?;
771+ if cfg ! ( not( test) ) {
772+ msg_info. warn ( format_args ! ( "using {rustc_warning}." ) ) ?;
773+ }
768774 return Ok ( VersionMatch :: Different ) ;
769775 }
770776 }
You can’t perform that action at this time.
0 commit comments