Skip to content

Commit a28be8b

Browse files
committed
Update workflow.
1 parent 817fab0 commit a28be8b

File tree

1 file changed

+23
-57
lines changed

1 file changed

+23
-57
lines changed

.github/workflows/build.yml

+23-57
Original file line numberDiff line numberDiff line change
@@ -10,88 +10,54 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- 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
1419
- name: toolchain
15-
uses: actions-rs/toolchain@v1
20+
uses: dtolnay/rust-toolchain@master
1621
with:
17-
toolchain: 1.70.0
18-
profile: minimal
22+
toolchain: ${{ env.MSRV }}
1923
components: rustfmt, rust-docs, clippy
20-
override: true
2124
- name: test
22-
uses: actions-rs/cargo@v1
23-
with:
24-
command: test
25+
run: cargo test
2526
- name: test-rayon
26-
uses: actions-rs/cargo@v1
27-
with:
28-
command: test
29-
args: --features rayon
27+
run: cargo test --features rayon
3028
- name: clippy
31-
uses: actions-rs/cargo@v1
32-
with:
33-
command: clippy
34-
args: --all
29+
run: cargo clippy --all
3530
- name: doc
36-
uses: actions-rs/cargo@v1
37-
with:
38-
command: doc
31+
run: cargo doc
3932
- name: doc-rayon
40-
uses: actions-rs/cargo@v1
41-
with:
42-
command: doc
43-
args: --features rayon
33+
run: cargo doc --features rayon
4434
- name: fmt
45-
uses: actions-rs/cargo@v1
46-
with:
47-
command: fmt
48-
args: --all --check
35+
run: cargo fmt --all --check
4936
nightly:
5037
runs-on: ubuntu-latest
5138
steps:
5239
- name: checkout
53-
uses: actions/checkout@v2
40+
uses: actions/checkout@v4
5441
- name: toolchain
55-
uses: actions-rs/toolchain@v1
42+
uses: dtolnay/rust-toolchain@master
5643
with:
5744
toolchain: nightly
58-
profile: minimal
5945
components: rustfmt, rust-docs, clippy, miri
60-
override: true
6146
- name: test
62-
uses: actions-rs/cargo@v1
63-
with:
64-
command: test
47+
run: cargo test
6548
- name: test-rayon
66-
uses: actions-rs/cargo@v1
67-
with:
68-
command: test
69-
args: --features rayon
49+
run: cargo test --features rayon
7050
- name: clippy
71-
uses: actions-rs/cargo@v1
72-
with:
73-
command: clippy
74-
args: --all
51+
run: cargo clippy --all
7552
- name: doc
76-
uses: actions-rs/cargo@v1
77-
with:
78-
command: doc
53+
run: cargo doc
7954
env:
8055
RUSTDOCFLAGS: "--cfg docsrs"
8156
- name: doc-rayon
82-
uses: actions-rs/cargo@v1
83-
with:
84-
command: doc
85-
args: --features rayon
57+
run: cargo doc --features rayon
8658
env:
8759
RUSTDOCFLAGS: "--cfg docsrs"
8860
- name: fmt
89-
uses: actions-rs/cargo@v1
90-
with:
91-
command: fmt
92-
args: --all --check
61+
run: cargo fmt --all --check
9362
- name: miri
94-
uses: actions-rs/cargo@v1
95-
with:
96-
command: miri
97-
args: test
63+
run: cargo miri test

0 commit comments

Comments
 (0)