CI: remove use of actions-rs/cargo

actions-rs is currently inactive and has an issue like actions-rs/cargo#216
This commit is contained in:
Miles Liu 2022-11-02 10:30:50 +08:00
parent 5e7a870af6
commit f4c6d55b9d
No known key found for this signature in database
GPG Key ID: 4DB9B32F9B24A7A9
1 changed files with 18 additions and 26 deletions

View File

@ -28,17 +28,11 @@ jobs:
profile: minimal # minimal component installation (ie, no documentation) profile: minimal # minimal component installation (ie, no documentation)
components: clippy, rustfmt components: clippy, rustfmt
- name: Ensure `cargo fmt` has been run - name: Ensure `cargo fmt` has been run
uses: actions-rs/cargo@v1 run: cargo fmt --check
with:
command: fmt
args: -- --check
- name: Ensure MSRV is set in `clippy.toml` - name: Ensure MSRV is set in `clippy.toml`
run: grep "^msrv = \"${{ env.MIN_SUPPORTED_RUST_VERSION }}\"\$" clippy.toml run: grep "^msrv = \"${{ env.MIN_SUPPORTED_RUST_VERSION }}\"\$" clippy.toml
- name: Run clippy - name: Run clippy
uses: actions-rs/cargo@v1 run: cargo clippy --locked --all-targets --all-features
with:
command: clippy
args: --locked --all-targets --all-features
min_version: min_version:
name: Minimum supported rust version name: Minimum supported rust version
@ -55,15 +49,9 @@ jobs:
components: clippy components: clippy
profile: minimal profile: minimal
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix) - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
uses: actions-rs/cargo@v1 run: cargo clippy --locked --all-targets --all-features
with:
command: clippy
args: --locked --all-targets --all-features
- name: Run tests - name: Run tests
uses: actions-rs/cargo@v1 run: cargo test --locked
with:
command: test
args: --locked
build: build:
name: ${{ matrix.job.os }} (${{ matrix.job.target }}) name: ${{ matrix.job.os }} (${{ matrix.job.target }})
@ -122,12 +110,20 @@ jobs:
cargo -V cargo -V
rustc -V rustc -V
- name: Set cargo cmd
run: |
echo "CARGO_CMD=cargo" >> $GITHUB_ENV
echo "CARGO_CMD=cargo" >> $Env:GITHUB_ENV
- name: Install cross
if: ${{ matrix.job.use-cross == true }}
run: |
cargo install cross
echo "CARGO_CMD=cross" >> $GITHUB_ENV
echo "CARGO_CMD=cross" >> $Env:GITHUB_ENV
- name: Build - name: Build
uses: actions-rs/cargo@v1 run: ${{ env.CARGO_CMD }} build --locked --release --target=${{ matrix.job.target }}
with:
use-cross: ${{ matrix.job.use-cross }}
command: build
args: --locked --release --target=${{ matrix.job.target }}
- name: Strip debug information from executable - name: Strip debug information from executable
id: strip id: strip
@ -175,11 +171,7 @@ jobs:
echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_OUTPUT echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_OUTPUT
- name: Run tests - name: Run tests
uses: actions-rs/cargo@v1 run: ${{ env.CARGO_CMD }} test --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
with:
use-cross: ${{ matrix.job.use-cross }}
command: test
args: --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
- name: Generate completions - name: Generate completions
id: completions id: completions