1111 pull_request :
1212
1313jobs :
14+ stable :
15+ name : " Test MSRV and Stable Features"
16+ strategy :
17+ matrix :
18+ rust :
19+ - nightly
20+ - 1.59
21+ - 1.57
22+ runs-on : ubuntu-latest
23+ steps :
24+ - uses : actions/checkout@v3
25+ - uses : actions-rs/toolchain@v1
26+ with :
27+ profile : minimal
28+ toolchain : ${{ matrix.rust }}
29+ override : true
30+ - name : Run cargo build for stable
31+ if : matrix.rust != 1.57
32+ uses : actions-rs/cargo@v1
33+ with :
34+ command : build
35+ args : --no-default-features --features instructions
36+ - name : Run cargo build for stable without instructions
37+ uses : actions-rs/cargo@v1
38+ with :
39+ command : build
40+ args : --no-default-features
41+ - name : Run cargo doc for stable
42+ if : matrix.rust != 1.57
43+ uses : actions-rs/cargo@v1
44+ with :
45+ command : doc
46+ args : --no-default-features --features instructions
47+ - name : Run cargo doc for stable without instructions
48+ uses : actions-rs/cargo@v1
49+ with :
50+ command : doc
51+ args : --no-default-features
52+ - name : Run cargo test for stable
53+ if : matrix.rust != 1.57
54+ uses : actions-rs/cargo@v1
55+ with :
56+ command : test
57+ args : --no-default-features --features instructions
58+ - name : Run cargo test for stable without instructions
59+ uses : actions-rs/cargo@v1
60+ with :
61+ command : test
62+ args : --no-default-features
63+
1464 test :
1565 name : " Test"
1666
@@ -27,23 +77,13 @@ jobs:
2777 timeout-minutes : 15
2878
2979 steps :
30- - name : " Checkout Repository"
31- uses : actions/checkout@v1
32-
33- - name : Install Rustup
34- run : |
35- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
36- echo "$HOME/.cargo/bin" >> $GITHUB_PATH
37- if : runner.os == 'macOS'
38-
39- - name : Set Rustup profile to minimal
40- run : rustup set profile minimal
41-
42- - name : Install musl target on Linux
43- run : |
44- rustup target add x86_64-unknown-linux-musl
45- sudo apt-get install musl-tools musl-dev
46- if : runner.os == 'Linux'
80+ - uses : actions/checkout@v3
81+ - uses : actions-rs/toolchain@v1
82+ with :
83+ profile : minimal
84+ toolchain : nightly
85+ override : true
86+ target : x86_64-unknown-linux-musl
4787
4888 - name : " Print Rust Version"
4989 run : |
@@ -60,56 +100,23 @@ jobs:
60100 with :
61101 command : doc
62102
63- - name : " Run cargo doc for stable"
64- uses : actions-rs/cargo@v1
65- with :
66- command : doc
67- args : --no-default-features --features instructions
68- if : runner.os != 'Windows'
69-
70- - name : " Run cargo doc without default features"
71- uses : actions-rs/cargo@v1
72- with :
73- command : doc
74- args : --no-default-features
75-
76- - name : " Run cargo build for stable without instructions"
77- uses : actions-rs/cargo@v1
78- with :
79- command : build
80- args : --no-default-features
81-
82- - name : " Run cargo build for stable"
103+ - name : " Run cargo build on musl"
83104 uses : actions-rs/cargo@v1
84105 with :
85106 command : build
86- args : --no-default-features --features instructions
87- if : runner.os != 'Windows'
88-
89- - name : " Run cargo build for stable on musl"
90- uses : actions-rs/cargo@v1
91- with :
92- command : build
93- args : --target x86_64-unknown-linux-musl --no-default-features --features instructions
107+ args : --target x86_64-unknown-linux-musl
94108 if : runner.os == 'Linux'
95109
96110 - name : " Run cargo test"
97111 uses : actions-rs/cargo@v1
98112 with :
99113 command : test
100114
101- - name : " Run cargo test for stable "
115+ - name : " Run cargo test on musl "
102116 uses : actions-rs/cargo@v1
103117 with :
104118 command : test
105- args : --no-default-features --features instructions
106- if : runner.os != 'Windows'
107-
108- - name : " Run cargo test for stable on musl"
109- uses : actions-rs/cargo@v1
110- with :
111- command : test
112- args : --target x86_64-unknown-linux-musl --no-default-features --features instructions
119+ args : --target x86_64-unknown-linux-musl
113120 if : runner.os == 'Linux'
114121
115122 - name : " Install Rustup Targets"
@@ -138,11 +145,11 @@ jobs:
138145
139146 steps :
140147 - name : " Checkout Repository"
141- uses : actions/checkout@v1
148+ uses : actions/checkout@v3
142149
143150 - name : Cache binaries
144151 id : cache-bin
145- uses : actions/cache@v1
152+ uses : actions/cache@v3
146153 with :
147154 path : binaries
148155 key : ${{ runner.OS }}-binaries
@@ -151,7 +158,12 @@ jobs:
151158 shell : bash
152159
153160 - name : " Install Rustup Components"
154- run : rustup component add rust-src llvm-tools-preview
161+ uses : actions-rs/toolchain@v1
162+ with :
163+ toolchain : nightly
164+ override : true
165+ profile : minimal
166+ components : rust-src, llvm-tools-preview
155167 - name : " Install cargo-xbuild"
156168 run : cargo install cargo-xbuild --debug --root binaries
157169 - name : " Install bootimage"
@@ -189,18 +201,30 @@ jobs:
189201 runs-on : ubuntu-latest
190202 timeout-minutes : 2
191203 steps :
192- - uses : actions/checkout@v1
193- - run : rustup toolchain install nightly --profile minimal --component rustfmt
194- - run : cargo +nightly fmt -- --check
204+ - uses : actions/checkout@v3
205+ - uses : actions-rs/toolchain@v1
206+ with :
207+ toolchain : nightly
208+ override : true
209+ profile : minimal
210+ components : rustfmt
211+ - uses : actions-rs/cargo@v1
212+ with :
213+ command : fmt
214+ args : --all -- --check
195215
196216 clippy :
197217 name : " Clippy"
198218 runs-on : ubuntu-latest
199219 timeout-minutes : 10
200220 steps :
201- - uses : actions/checkout@v1
202- - run : rustup toolchain install nightly --profile minimal --component clippy
203- - name : " Run `cargo clippy`"
204- uses : actions-rs/cargo@v1
221+ - uses : actions/checkout@v3
222+ - uses : actions-rs/toolchain@v1
223+ with :
224+ toolchain : nightly
225+ override : true
226+ profile : minimal
227+ components : clippy
228+ - uses : actions-rs/cargo@v1
205229 with :
206230 command : clippy
0 commit comments