Skip to content

Commit 82ca3f7

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 9fd57e3 commit 82ca3f7

File tree

1 file changed

+20
-26
lines changed

1 file changed

+20
-26
lines changed

.github/workflows/CICD.yml

Lines changed: 20 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,15 @@ jobs:
122110
cargo -V
123111
rustc -V
124112
113+
- name: Cross build
114+
if: ${{ matrix.job.use-cross == true }}
115+
run: |
116+
cargo install cross
117+
cross build --locked --release --target=${{ matrix.job.target }}
118+
125119
- 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 }}
120+
if: ${{ matrix.job.use-cross == false }}
121+
run: cargo build --locked --release --target=${{ matrix.job.target }}
131122

132123
- name: Strip debug information from executable
133124
id: strip
@@ -174,12 +165,15 @@ jobs:
174165
unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--bin ${PROJECT_NAME}" ;; esac;
175166
echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}
176167
168+
- name: Run cross tests
169+
if: ${{ matrix.job.use-cross == true }}
170+
run: |
171+
cargo install cross
172+
cross test --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
173+
177174
- 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}}
175+
if: ${{ matrix.job.use-cross == false }}
176+
run: cargo test --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
183177

184178
- name: Generate completions
185179
id: completions

0 commit comments

Comments
 (0)