@@ -36,20 +36,18 @@ jobs:
36
36
rust : stable
37
37
steps :
38
38
- uses : actions/checkout@v3
39
- - name : Install Rust (rustup)
40
- run : rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
41
- shell : bash
42
- - name : Install cargo-hack
43
- uses : taiki-e/install-action@cargo-hack
39
+ - uses : dtolnay/rust-toolchain@master
40
+ with :
41
+ toolchain : ${{ matrix.rust }}
42
+ - uses : taiki-e/install-action@cargo-hack
44
43
- name : Run tests
45
44
run : cargo hack test --feature-powerset && cargo hack test --feature-powerset --release
46
45
Rustfmt :
47
46
name : Rustfmt
48
47
runs-on : ubuntu-latest
49
48
steps :
50
49
- uses : actions/checkout@v3
51
- - name : Install Rust
52
- run : rustup update stable && rustup default stable && rustup component add rustfmt
50
+ - uses : dtolnay/rust-toolchain@stable
53
51
- name : Check formatting
54
52
run : cargo fmt --all -- --check
55
53
Check :
@@ -61,12 +59,10 @@ jobs:
61
59
target : ["aarch64-apple-ios", "aarch64-linux-android", "x86_64-apple-darwin", "x86_64-fuchsia", "x86_64-pc-windows-msvc", "x86_64-pc-solaris", "x86_64-unknown-freebsd", "x86_64-unknown-illumos", "x86_64-unknown-linux-gnu", "x86_64-unknown-netbsd", "x86_64-unknown-redox"]
62
60
steps :
63
61
- uses : actions/checkout@v3
64
- - name : Install Rust
65
- run : rustup update stable && rustup default stable
66
- - name : Install Target
67
- run : rustup target add ${{ matrix.target }}
68
- - name : Install cargo-hack
69
- uses : taiki-e/install-action@cargo-hack
62
+ - uses : dtolnay/rust-toolchain@nightly # NOTE: need nightly for `doc_cfg` feature.
63
+ with :
64
+ targets : ${{ matrix.target }}
65
+ - uses : taiki-e/install-action@cargo-hack
70
66
- name : Run check
71
67
run : cargo hack check --feature-powerset --all-targets --examples --bins --tests --target ${{ matrix.target }}
72
68
- name : Check docs for docs.rs
76
72
runs-on : ubuntu-latest
77
73
steps :
78
74
- uses : actions/checkout@v3
79
- - name : Install Rust
80
- run : rustup update stable && rustup default stable && rustup component add clippy
75
+ - uses : dtolnay/rust-toolchain@stable
81
76
- name : Run Clippy
82
77
run : cargo clippy --all-targets --all-features -- -D warnings
0 commit comments