Skip to content

Commit f4c6d55

Browse files
committed
CI: remove use of actions-rs/cargo
actions-rs is currently inactive and has an issue like actions-rs/cargo#216
1 parent 5e7a870 commit f4c6d55

File tree

1 file changed

+18
-26
lines changed

1 file changed

+18
-26
lines changed

.github/workflows/CICD.yml

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,11 @@ jobs:
2828
profile: minimal # minimal component installation (ie, no documentation)
2929
components: clippy, rustfmt
3030
- name: Ensure `cargo fmt` has been run
31-
uses: actions-rs/cargo@v1
32-
with:
33-
command: fmt
34-
args: -- --check
31+
run: cargo fmt --check
3532
- name: Ensure MSRV is set in `clippy.toml`
3633
run: grep "^msrv = \"${{ env.MIN_SUPPORTED_RUST_VERSION }}\"\$" clippy.toml
3734
- name: Run clippy
38-
uses: actions-rs/cargo@v1
39-
with:
40-
command: clippy
41-
args: --locked --all-targets --all-features
35+
run: cargo clippy --locked --all-targets --all-features
4236

4337
min_version:
4438
name: Minimum supported rust version
@@ -55,15 +49,9 @@ jobs:
5549
components: clippy
5650
profile: minimal
5751
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
58-
uses: actions-rs/cargo@v1
59-
with:
60-
command: clippy
61-
args: --locked --all-targets --all-features
52+
run: cargo clippy --locked --all-targets --all-features
6253
- name: Run tests
63-
uses: actions-rs/cargo@v1
64-
with:
65-
command: test
66-
args: --locked
54+
run: cargo test --locked
6755

6856
build:
6957
name: ${{ matrix.job.os }} (${{ matrix.job.target }})
@@ -122,12 +110,20 @@ jobs:
122110
cargo -V
123111
rustc -V
124112
113+
- name: Set cargo cmd
114+
run: |
115+
echo "CARGO_CMD=cargo" >> $GITHUB_ENV
116+
echo "CARGO_CMD=cargo" >> $Env:GITHUB_ENV
117+
118+
- name: Install cross
119+
if: ${{ matrix.job.use-cross == true }}
120+
run: |
121+
cargo install cross
122+
echo "CARGO_CMD=cross" >> $GITHUB_ENV
123+
echo "CARGO_CMD=cross" >> $Env:GITHUB_ENV
124+
125125
- name: Build
126-
uses: actions-rs/cargo@v1
127-
with:
128-
use-cross: ${{ matrix.job.use-cross }}
129-
command: build
130-
args: --locked --release --target=${{ matrix.job.target }}
126+
run: ${{ env.CARGO_CMD }} build --locked --release --target=${{ matrix.job.target }}
131127

132128
- name: Strip debug information from executable
133129
id: strip
@@ -175,11 +171,7 @@ jobs:
175171
echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_OUTPUT
176172
177173
- name: Run tests
178-
uses: actions-rs/cargo@v1
179-
with:
180-
use-cross: ${{ matrix.job.use-cross }}
181-
command: test
182-
args: --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
174+
run: ${{ env.CARGO_CMD }} test --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
183175

184176
- name: Generate completions
185177
id: completions

0 commit comments

Comments
 (0)