Skip to content

Commit

Permalink
ci(unit-tests): fix and unify msrv and add matrix to free/netbsd
Browse files Browse the repository at this point in the history
Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
  • Loading branch information
gierens authored and cafkafk committed Jan 24, 2025
1 parent 21d6024 commit 8e4cab0
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ concurrency:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: --deny warnings
msrv: 1.78
jobs:
security_audit:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -59,11 +60,11 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [1.70.0, stable, beta, nightly]
rust: [msrv, stable, beta, nightly]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: rustup toolchain install ${{ matrix.rust }} --profile minimal
- run: rustup toolchain install ${{ matrix.rust == 'msrv' && env.msrv || matrix.rust }} --profile minimal
- uses: Swatinem/rust-cache@v2
- name: Install cargo-hack
uses: nick-fields/retry@v3
Expand All @@ -82,6 +83,10 @@ jobs:
needs: conventional
runs-on: ubuntu-22.04
timeout-minutes: 20
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
matrix:
rust: [msrv, stable, beta, nightly]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -93,7 +98,7 @@ jobs:
usesh: true
prepare: |
pkg install -y curl git
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.74 -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain ${{ matrix.rust == 'msrv' && env.msrv || matrix.rust }} --profile minimal -y
. ~/.cargo/env
cargo install cargo-hack
git config --global --add safe.directory /home/runner/work/eza/eza
Expand All @@ -109,6 +114,10 @@ jobs:
needs: conventional
runs-on: ubuntu-22.04
timeout-minutes: 20
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
matrix:
rust: [msrv, stable, beta, nightly]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -122,12 +131,14 @@ jobs:
PATH="/root/.cargo/bin:/usr/pkg/sbin:/usr/pkg/bin:$PATH"
PKG_PATH="https://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/10.1/All/"
export PATH PKG_PATH
/usr/sbin/pkg_add pkgin
pkgin -y install rust git
/usr/sbin/pkg_add curl git
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain ${{ matrix.rust == 'msrv' && env.msrv || matrix.rust }} --profile minimal -y
. ~/.cargo/env
cargo install cargo-hack
git config --global --add safe.directory /home/runner/work/eza/eza
run: |
set -e
. ~/.cargo/env
export CARGO_TERM_COLOR="always"
export RUSTFLAGS="--deny warnings"
cargo fmt --check
Expand Down

0 comments on commit 8e4cab0

Please sign in to comment.