ci: Replace actions-rs actions

This commit is contained in:
Arne Beer 2024-01-11 23:05:06 +01:00
parent 73652d70fb
commit 2bfd42f04b
No known key found for this signature in database
GPG key ID: CC9408F679023B65
4 changed files with 23 additions and 37 deletions

View file

@ -40,12 +40,10 @@ jobs:
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
components: llvm-tools-preview
target: ${{ matrix.target }}
targets: ${{ matrix.target }}
- uses: actions/cache@v3
with:

View file

@ -56,12 +56,10 @@ jobs:
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
components: rustfmt, clippy
target: ${{ matrix.target }}
components: llvm-tools-preview
targets: ${{ matrix.target }}
- uses: actions/cache@v3
with:
@ -77,13 +75,7 @@ jobs:
${{ runner.os }}-cargo-${{ matrix.target }}-
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run : cargo fmt --all -- --check
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --tests --workspace -- -D warnings
run: cargo clippy --tests --workspace -- -D warnings

View file

@ -83,18 +83,17 @@ jobs:
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
components: llvm-tools-preview
targets: ${{ matrix.target }}
- name: cargo build
uses: actions-rs/cargo@v1
uses: houseabsolute/actions-rust-cross@v0
with:
command: build
args: --release --locked --target=${{ matrix.target }}
use-cross: ${{ matrix.cross }}
args: --release --locked ${{ matrix.cargo_flags }}
target: ${{ matrix.target }}
- name: Compress client
uses: svenstaro/upx-action@v2

View file

@ -70,12 +70,10 @@ jobs:
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
components: llvm-tools-preview
target: ${{ matrix.target }}
targets: ${{ matrix.target }}
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
@ -95,21 +93,20 @@ jobs:
${{ runner.os }}-cargo-${{ matrix.target }}-
- name: cargo build
uses: actions-rs/cargo@v1
uses: houseabsolute/actions-rust-cross@v0
with:
command: build
args: --target=${{ matrix.target }}
use-cross: ${{ matrix.cross }}
target: ${{ matrix.target }}
- name: cargo test
uses: actions-rs/cargo@v1
if: ${{ !matrix.cross }}
env:
NEXTEST_PROFILE: ci # defined in .config/nextest.toml
uses: houseabsolute/actions-rust-cross@v0
with:
command: nextest
args: run --workspace --target=${{ matrix.target }}
use-cross: ${{ matrix.cross }}
args: "run --workspace"
target: ${{ matrix.target }}
env:
NEXTEST_PROFILE: ci # defined in .config/nextest.toml
if: ${{ !matrix.cross }}
# The test result artifacts are used by the test-report.yaml workflow.
- name: upload test results