9
9
jobs :
10
10
rustfmt :
11
11
name : Rustfmt
12
- runs-on : ubuntu-18 .04
12
+ runs-on : ubuntu-22 .04
13
13
14
14
steps :
15
15
- name : Checkout
16
- uses : actions/checkout@v2
16
+ uses : actions/checkout@v3
17
17
18
- - name : Setup 1.42.0-x86_64-unknown-linux-gnu
19
- uses : actions-rs/ toolchain@v1
18
+ - name : Set up Rust
19
+ uses : dtolnay/rust- toolchain@master
20
20
with :
21
21
toolchain : 1.42.0-x86_64-unknown-linux-gnu
22
- override : true
23
- profile : minimal
24
22
components : rustfmt
25
23
26
24
- name : ' `cargo fmt -- --check`'
27
- uses : actions-rs/cargo@v1
28
- with :
29
- command : fmt
30
- args : -- --check
25
+ run : cargo fmt -- --check
31
26
32
27
- name : ' `cargo fmt --manifest-path ./xtask/Cargo.toml -- --check`'
33
- uses : actions-rs/cargo@v1
34
- with :
35
- command : fmt
36
- args : --manifest-path ./xtask/Cargo.toml -- --check
28
+ run : cargo fmt --manifest-path ./xtask/Cargo.toml -- --check
37
29
38
30
build :
39
31
strategy :
40
32
fail-fast : false
41
33
matrix :
42
34
toolchain :
43
- # `x86_64-pc-windows-gnu` is tier 1 **for now**.
44
35
- 1.42.0-x86_64-pc-windows-msvc
45
- - 1.42.0-x86_64-pc-windows-gnu
46
36
- 1.42.0-x86_64-apple-darwin
47
37
- 1.42.0-x86_64-unknown-linux-gnu
48
38
include :
49
39
- toolchain : 1.42.0-x86_64-pc-windows-msvc
50
- os : windows-latest
51
- - toolchain : 1.42.0-x86_64-pc-windows-gnu
52
- os : windows-latest
40
+ os : windows-2022
53
41
- toolchain : 1.42.0-x86_64-apple-darwin
54
- os : macOS-latest
42
+ os : macos-11
55
43
- toolchain : 1.42.0-x86_64-unknown-linux-gnu
56
- os : ubuntu-18 .04
44
+ os : ubuntu-22 .04
57
45
58
46
name : ${{ matrix.toolchain }}
59
47
runs-on : ${{ matrix.os }}
@@ -64,47 +52,36 @@ jobs:
64
52
if : matrix.os == 'windows-latest'
65
53
66
54
- name : Checkout
67
- uses : actions/checkout@v2
55
+ uses : actions/checkout@v3
68
56
69
57
- name : Setup ${{ matrix.toolchain }}
70
- uses : actions-rs/ toolchain@v1
58
+ uses : dtolnay/rust- toolchain@master
71
59
with :
72
60
toolchain : ${{ matrix.toolchain }}
73
- override : true
74
- profile : minimal
75
61
components : clippy
76
62
63
+ - name : ' `rustup override set ${{ matrix.toolchain }}`'
64
+ run : rustup override set ${{ matrix.toolchain }}
65
+
77
66
- name : Setup Python 3.8
78
- uses : actions/setup-python@v1
67
+ uses : actions/setup-python@v4
79
68
with :
80
69
python-version : ' 3.8'
81
70
71
+ - name : Rust Cache
72
+ uses : Swatinem/rust-cache@v2
73
+
82
74
- name : ' `cargo clippy --all-targets --profile test -- -D warnings`'
83
- uses : actions-rs/cargo@v1
84
- with :
85
- command : clippy
86
- args : --all-targets --profile test -- -D warnings
75
+ run : cargo clippy --all-targets --profile test -- -D warnings
87
76
88
77
- name : ' `cargo clippy --manifest-path ./xtask/Cargo.toml -- -D warnings`'
89
- uses : actions-rs/cargo@v1
90
- with :
91
- command : clippy
92
- args : --manifest-path ./xtask/Cargo.toml -- -D warnings
78
+ run : cargo clippy --manifest-path ./xtask/Cargo.toml -- -D warnings
93
79
94
80
- name : ' `cargo test --all-targets --no-fail-fast`'
95
- uses : actions-rs/cargo@v1
96
- with :
97
- command : test
98
- args : --all-targets --no-fail-fast
81
+ run : cargo test --all-targets --no-fail-fast
99
82
100
83
- name : ' `cargo run --release`'
101
- uses : actions-rs/cargo@v1
102
- with :
103
- command : run
104
- args : --release
84
+ run : cargo run --release
105
85
106
86
- name : ' `cargo xtask test-examples`'
107
- uses : actions-rs/cargo@v1
108
- with :
109
- command : xtask
110
- args : test-examples
87
+ run : cargo xtask test-examples
0 commit comments