Skip to content

Commit 47e7cd4

Browse files
authored
Use install-action to install cargo-hack & cross (#2560)
1 parent 8bc9f1e commit 47e7cd4

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/ci.yml

+14-7
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ jobs:
5656
- uses: actions/checkout@v2
5757
- name: Install Rust
5858
run: rustup update nightly && rustup default nightly
59-
- run: cargo install cross
59+
- name: Install cross
60+
uses: taiki-e/install-action@cross
6061
- run: cross test --target ${{ matrix.target }} --workspace --all-features
6162
- run: cross test --target ${{ matrix.target }} --workspace --all-features --release
6263
# TODO: https://github.com/rust-lang/futures-rs/issues/2451
@@ -77,7 +78,8 @@ jobs:
7778
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
7879
# cargo does not support for --features/--no-default-features with workspace, so use cargo-hack instead.
7980
# Refs: cargo#3620, cargo#4106, cargo#4463, cargo#4753, cargo#5015, cargo#5364, cargo#6195
80-
- run: cargo +stable install cargo-hack
81+
- name: Install cargo-hack
82+
uses: taiki-e/install-action@cargo-hack
8183
# remove dev-dependencies to avoid https://github.com/rust-lang/cargo/issues/4866
8284
- run: cargo hack --remove-dev-deps --workspace
8385
# Check no-default-features
@@ -106,7 +108,8 @@ jobs:
106108
- uses: actions/checkout@v2
107109
- name: Install Rust
108110
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
109-
- run: cargo +stable install cargo-hack
111+
- name: Install cargo-hack
112+
uses: taiki-e/install-action@cargo-hack
110113
# remove dev-dependencies to avoid https://github.com/rust-lang/cargo/issues/4866
111114
- run: cargo hack --remove-dev-deps --workspace
112115
# Check default features
@@ -136,7 +139,8 @@ jobs:
136139
- uses: actions/checkout@v2
137140
- name: Install Rust
138141
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
139-
- run: cargo install cargo-hack
142+
- name: Install cargo-hack
143+
uses: taiki-e/install-action@cargo-hack
140144
- run: cargo hack build --workspace --no-dev-deps
141145
- run: cargo build --tests --features default,thread-pool,io-compat --manifest-path futures/Cargo.toml
142146

@@ -147,7 +151,8 @@ jobs:
147151
- uses: actions/checkout@v2
148152
- name: Install Rust
149153
run: rustup update nightly && rustup default nightly
150-
- run: cargo install cargo-hack
154+
- name: Install cargo-hack
155+
uses: taiki-e/install-action@cargo-hack
151156
# remove dev-dependencies to avoid https://github.com/rust-lang/cargo/issues/4866
152157
- run: cargo hack --remove-dev-deps --workspace
153158
- run: cargo update -Z minimal-versions
@@ -169,7 +174,8 @@ jobs:
169174
- name: Install Rust
170175
run: rustup update nightly && rustup default nightly
171176
- run: rustup target add ${{ matrix.target }}
172-
- run: cargo install cargo-hack
177+
- name: Install cargo-hack
178+
uses: taiki-e/install-action@cargo-hack
173179
# remove dev-dependencies to avoid https://github.com/rust-lang/cargo/issues/4866
174180
- run: cargo hack --remove-dev-deps --workspace
175181
- run: |
@@ -209,7 +215,8 @@ jobs:
209215
- uses: actions/checkout@v2
210216
- name: Install Rust
211217
run: rustup update nightly && rustup default nightly
212-
- run: cargo install cargo-hack
218+
- name: Install cargo-hack
219+
uses: taiki-e/install-action@cargo-hack
213220
# Check each specified feature works properly
214221
# * `--feature-powerset` - run for the feature powerset of the package
215222
# * `--depth 2` - limit the max number of simultaneous feature flags of `--feature-powerset`

0 commit comments

Comments
 (0)