@@ -10,88 +10,54 @@ jobs:
10
10
runs-on : ubuntu-latest
11
11
steps :
12
12
- name : checkout
13
- uses : actions/checkout@v2
13
+ uses : actions/checkout@v4
14
+ - name : msrv
15
+ run : |
16
+ msrv=$(cargo metadata --no-deps --format-version 1 |
17
+ jq --raw-output '.packages[] | select(.name=="ndarray-histogram") | .rust_version')
18
+ echo "MSRV=$msrv" >> $GITHUB_ENV
14
19
- name : toolchain
15
- uses : actions-rs/ toolchain@v1
20
+ uses : dtolnay/rust- toolchain@master
16
21
with :
17
- toolchain : 1.70.0
18
- profile : minimal
22
+ toolchain : ${{ env.MSRV }}
19
23
components : rustfmt, rust-docs, clippy
20
- override : true
21
24
- name : test
22
- uses : actions-rs/cargo@v1
23
- with :
24
- command : test
25
+ run : cargo test
25
26
- name : test-rayon
26
- uses : actions-rs/cargo@v1
27
- with :
28
- command : test
29
- args : --features rayon
27
+ run : cargo test --features rayon
30
28
- name : clippy
31
- uses : actions-rs/cargo@v1
32
- with :
33
- command : clippy
34
- args : --all
29
+ run : cargo clippy --all
35
30
- name : doc
36
- uses : actions-rs/cargo@v1
37
- with :
38
- command : doc
31
+ run : cargo doc
39
32
- name : doc-rayon
40
- uses : actions-rs/cargo@v1
41
- with :
42
- command : doc
43
- args : --features rayon
33
+ run : cargo doc --features rayon
44
34
- name : fmt
45
- uses : actions-rs/cargo@v1
46
- with :
47
- command : fmt
48
- args : --all --check
35
+ run : cargo fmt --all --check
49
36
nightly :
50
37
runs-on : ubuntu-latest
51
38
steps :
52
39
- name : checkout
53
- uses : actions/checkout@v2
40
+ uses : actions/checkout@v4
54
41
- name : toolchain
55
- uses : actions-rs/ toolchain@v1
42
+ uses : dtolnay/rust- toolchain@master
56
43
with :
57
44
toolchain : nightly
58
- profile : minimal
59
45
components : rustfmt, rust-docs, clippy, miri
60
- override : true
61
46
- name : test
62
- uses : actions-rs/cargo@v1
63
- with :
64
- command : test
47
+ run : cargo test
65
48
- name : test-rayon
66
- uses : actions-rs/cargo@v1
67
- with :
68
- command : test
69
- args : --features rayon
49
+ run : cargo test --features rayon
70
50
- name : clippy
71
- uses : actions-rs/cargo@v1
72
- with :
73
- command : clippy
74
- args : --all
51
+ run : cargo clippy --all
75
52
- name : doc
76
- uses : actions-rs/cargo@v1
77
- with :
78
- command : doc
53
+ run : cargo doc
79
54
env :
80
55
RUSTDOCFLAGS : " --cfg docsrs"
81
56
- name : doc-rayon
82
- uses : actions-rs/cargo@v1
83
- with :
84
- command : doc
85
- args : --features rayon
57
+ run : cargo doc --features rayon
86
58
env :
87
59
RUSTDOCFLAGS : " --cfg docsrs"
88
60
- name : fmt
89
- uses : actions-rs/cargo@v1
90
- with :
91
- command : fmt
92
- args : --all --check
61
+ run : cargo fmt --all --check
93
62
- name : miri
94
- uses : actions-rs/cargo@v1
95
- with :
96
- command : miri
97
- args : test
63
+ run : cargo miri test
0 commit comments