Skip to content

Commit b15dca0

Browse files
committed
Use pre-built cargo-hack in CI
The authors of cargo-hack provide an Action to use in CI and avoid having to build from source. Currently the MSRV CI job fails because latest cargo-hack requires 1.56 to build while the test is run with 1.46. Simply running cargo-hack only requies 1.26 though. This should also speedup CI runs, since we don't have to build cargo-hack each time.
1 parent d97e78a commit b15dca0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/main.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ jobs:
3737
rust: stable
3838
steps:
3939
- uses: actions/checkout@master
40+
- uses: taiki-e/install-action@cargo-hack
4041
- name: Install Rust (rustup)
4142
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
4243
shell: bash
43-
- name: Install cargo-hack
44-
run: cargo install cargo-hack
4544
- name: Run tests
4645
run: cargo hack test --feature-powerset && cargo hack test --feature-powerset --release
4746

@@ -66,10 +65,9 @@ jobs:
6665
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-illumos", "x86_64-unknown-linux-gnu", "x86_64-unknown-netbsd"]
6766
steps:
6867
- uses: actions/checkout@master
68+
- uses: taiki-e/install-action@cargo-hack
6969
- name: Install Rust
7070
run: rustup update stable && rustup default stable
71-
- name: Install cargo-hack
72-
run: cargo install cargo-hack
7371
- name: Install Target
7472
run: rustup target add ${{ matrix.target }}
7573
- name: Run check
@@ -85,10 +83,9 @@ jobs:
8583
target: ["x86_64-unknown-redox"]
8684
steps:
8785
- uses: actions/checkout@master
86+
- uses: taiki-e/install-action@cargo-hack
8887
- name: Install Rust nightly
8988
run: rustup update nightly && rustup default nightly
90-
- name: Install cargo-hack
91-
run: cargo install cargo-hack
9289
- name: Install Target
9390
run: rustup target add ${{ matrix.target }}
9491
- name: Run check

0 commit comments

Comments
 (0)