Skip to content

Commit 51233c8

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 51233c8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/main.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
4242
shell: bash
4343
- name: Install cargo-hack
44-
run: cargo install cargo-hack
44+
uses: taiki-e/install-action@cargo-hack
4545
- name: Run tests
4646
run: cargo hack test --feature-powerset && cargo hack test --feature-powerset --release
4747

@@ -68,10 +68,10 @@ jobs:
6868
- uses: actions/checkout@master
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 }}
73+
- name: Install cargo-hack
74+
uses: taiki-e/install-action@cargo-hack
7575
- name: Run check
7676
run: cargo hack check --feature-powerset --all-targets --examples --bins --tests --target ${{ matrix.target }}
7777

@@ -87,9 +87,9 @@ jobs:
8787
- uses: actions/checkout@master
8888
- name: Install Rust nightly
8989
run: rustup update nightly && rustup default nightly
90-
- name: Install cargo-hack
91-
run: cargo install cargo-hack
9290
- name: Install Target
9391
run: rustup target add ${{ matrix.target }}
92+
- name: Install cargo-hack
93+
uses: taiki-e/install-action@cargo-hack
9494
- name: Run check
9595
run: cargo hack check --feature-powerset --all-targets --examples --bins --tests --target ${{ matrix.target }}

0 commit comments

Comments
 (0)