@@ -13,71 +13,49 @@ jobs:
13
13
fail-fast : false
14
14
matrix :
15
15
os : [ubuntu-latest, windows-latest, macos-latest]
16
- rust : [nightly, beta, stable, 1.39.0 ]
16
+ rust : [nightly, beta, stable]
17
17
steps :
18
18
- uses : actions/checkout@v2
19
-
20
- - name : Install latest ${{ matrix.rust }}
21
- uses : actions-rs/toolchain@v1
22
- with :
23
- toolchain : ${{ matrix.rust }}
24
- profile : minimal
25
- override : true
26
-
27
- - name : Run basic cargo check
28
- uses : actions-rs/cargo@v1
29
- with :
30
- command : check
31
- args : --all --bins --all-features
32
-
33
- - name : Run cargo check
34
- if : startsWith(matrix.rust, '1.39.0') == false
35
- uses : actions-rs/cargo@v1
36
- with :
37
- command : check
38
- args : --all --benches --bins --examples --tests --all-features
39
-
19
+ - name : Install Rust
20
+ # --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
21
+ run : rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
22
+ - run : cargo build --all --all-features --all-targets
40
23
- name : Run cargo check (without dev-dependencies to catch missing feature flags)
41
24
if : startsWith(matrix.rust, 'nightly')
42
- uses : actions-rs/cargo@v1
43
- with :
44
- command : check
45
- args : -Z features=dev_dep
46
-
47
- - name : Run cargo test
48
- if : startsWith(matrix.rust, '1.39.0') == false
49
- uses : actions-rs/cargo@v1
50
- with :
51
- command : test
25
+ run : cargo check -Z features=dev_dep
26
+ - run : cargo test
52
27
53
28
# Copied from: https://github.com/rust-lang/stacker/pull/19/files
54
29
windows_gnu :
55
30
runs-on : windows-latest
56
31
strategy :
57
32
matrix :
58
- rust_toolchain : [nightly]
59
- rust_target :
33
+ rust : [nightly]
34
+ target :
60
35
- x86_64-pc-windows-gnu
61
36
steps :
62
37
- uses : actions/checkout@v1
63
- - name : Install Rust nightly
64
- uses : actions-rs/toolchain@v1
65
- with :
66
- toolchain : ${{ matrix.rust_toolchain }}
67
- target : ${{ matrix.rust_target }}
68
- default : true
38
+ - name : Install Rust
39
+ # --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
40
+ run : rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
41
+ - run : rustup target add ${{ matrix.target }}
69
42
# https://github.com/rust-lang/rust/issues/49078
70
43
- name : Fix windows-gnu rust-mingw
71
44
run : |
72
45
for i in crt2.o dllcrt2.o libmingwex.a libmsvcrt.a ; do
73
46
cp -f "/C/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/x86_64-w64-mingw32/lib/$i" "`rustc --print sysroot`/lib/rustlib/x86_64-pc-windows-gnu/lib"
74
47
done
75
48
shell : bash
76
- - uses : actions-rs/cargo@v1
77
- with :
78
- command : build
79
- args : --target ${{ matrix.rust_target }} --all --benches --bins --examples --tests --all-features
80
- - uses : actions-rs/cargo@v1
81
- with :
82
- command : test
83
- args : --target ${{ matrix.rust_target }}
49
+ - run : cargo build --target ${{ matrix.target }} --all --all-features --all-targets
50
+ - run : cargo test --target ${{ matrix.target }}
51
+
52
+ msrv :
53
+ runs-on : ubuntu-latest
54
+ strategy :
55
+ matrix :
56
+ rust : [1.46.0]
57
+ steps :
58
+ - uses : actions/checkout@v2
59
+ - name : Install Rust
60
+ run : rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
61
+ - run : cargo build
0 commit comments