Skip to content

Commit

Permalink
CI: remove use of actions-rs/cargo
Browse files Browse the repository at this point in the history
actions-rs is currently inactive and has an issue like actions-rs/cargo#216
  • Loading branch information
miles170 committed Nov 2, 2022
1 parent 9fd57e3 commit 342e953
Showing 1 changed file with 20 additions and 26 deletions.
46 changes: 20 additions & 26 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,11 @@ jobs:
profile: minimal # minimal component installation (ie, no documentation)
components: clippy, rustfmt
- name: Ensure `cargo fmt` has been run
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
run: cargo fmt --check
- name: Ensure MSRV is set in `clippy.toml`
run: grep "^msrv = \"${{ env.MIN_SUPPORTED_RUST_VERSION }}\"\$" clippy.toml
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --locked --all-targets --all-features
run: cargo clippy --locked --all-targets --all-features

min_version:
name: Minimum supported rust version
Expand All @@ -55,15 +49,9 @@ jobs:
components: clippy
profile: minimal
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
uses: actions-rs/cargo@v1
with:
command: clippy
args: --locked --all-targets --all-features
run: cargo clippy --locked --all-targets --all-features
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --locked
run: cargo test --locked

build:
name: ${{ matrix.job.os }} (${{ matrix.job.target }})
Expand Down Expand Up @@ -123,11 +111,14 @@ jobs:
rustc -V
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.job.use-cross }}
command: build
args: --locked --release --target=${{ matrix.job.target }}
if: ${{ matrix.job.use-cross }}
run: |
cargo install cross
cross build --locked --release --target=${{ matrix.job.target }}
- name: Build
if: ${{ matrix.job.use-cross }} == false
run: cargo build --locked --release --target=${{ matrix.job.target }}

- name: Strip debug information from executable
id: strip
Expand Down Expand Up @@ -175,11 +166,14 @@ jobs:
echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}
- name: Run tests
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.job.use-cross }}
command: test
args: --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
if: ${{ matrix.job.use-cross }}
run: |
cargo install cross
cross test --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
- name: Run tests
if: ${{ matrix.job.use-cross }} == false
run: cargo test --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}

- name: Generate completions
id: completions
Expand Down

0 comments on commit 342e953

Please sign in to comment.