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:
29
29
shell : bash
30
30
31
31
- name : Build with all features
32
- uses : actions-rs/cargo@v1
33
- with :
34
- command : install
35
- args : >
32
+ run :
33
+ cargo install
36
34
--locked
37
35
--path .
38
36
--target ${{ inputs.target }}
39
37
--all-features
40
38
--root ${{ steps.metadata.outputs.out-dir }}
41
39
--bins
42
- use-cross : true
40
+ shell : ${{ contains(runner.os, 'windows') && 'pwsh' || 'bash' }}
43
41
env :
44
42
RUSTFLAGS : " " # Make sure to unset RUSTFLAGS
45
43
Original file line number Diff line number Diff line change 28
28
29
29
- name : Log into crates.io
30
30
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
35
33
36
34
- run : gh release delete --yes Unreleased || exit 0
37
35
if : >
57
55
${{ steps.download-artifacts.outputs.download-path }}/cross-*/*
58
56
59
57
- 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:
15
15
runs :
16
16
using : composite
17
17
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
22
18
- name : Install Rust toolchain
23
- uses : actions-rs/ toolchain@v1
19
+ uses : dtolnay/rust- toolchain@v1
24
20
with :
25
21
toolchain : ${{ inputs.toolchain }}
26
22
target : ${{ inputs.target }}
27
- default : true
28
23
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
30
28
31
29
- uses : Swatinem/rust-cache@v1.3.0
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 36
36
components : rustfmt
37
37
38
38
- name : Run rustfmt
39
- uses : actions-rs/cargo@v1
40
- with :
41
- command : fmt
42
- args : -- --check
39
+ run : cargo fmt -- --check
43
40
44
41
clippy :
45
42
runs-on : ${{ matrix.os }}
58
55
toolchain : 1.58.1 # MSRV, Minimally Supported Rust Version. Make sure to update README.md
59
56
60
57
- 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
66
59
test :
67
60
runs-on : ${{ matrix.os }}
68
61
strategy :
80
73
name : test-${{matrix.os}}
81
74
82
75
- 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
87
77
timeout-minutes : 10
88
78
check :
89
79
runs-on : ubuntu-latest
94
84
- uses : ./.github/actions/setup-rust
95
85
- run : cargo xtask ci-job check
96
86
id : check
97
- shell : bash
98
87
generate-matrix :
99
88
runs-on : ubuntu-latest
100
89
outputs :
@@ -199,7 +188,6 @@ jobs:
199
188
if : matrix.deploy
200
189
with :
201
190
target : ${{ matrix.target }}
202
- image : ${{ steps.build-docker-image.outputs.image }}
203
191
204
192
- name : Test Zig Image
205
193
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(
756
756
host_version_meta. short_version_string
757
757
) ;
758
758
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
+ }
760
762
return Ok ( VersionMatch :: OlderTarget ) ;
761
763
} 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
+ }
765
769
return Ok ( VersionMatch :: NewerTarget ) ;
766
770
} 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
+ }
768
774
return Ok ( VersionMatch :: Different ) ;
769
775
}
770
776
}
You can’t perform that action at this time.
0 commit comments