From 0cafdbb6e4dfcbd061e7b8607b1de23c23b79a32 Mon Sep 17 00:00:00 2001 From: EdJoPaTo Date: Thu, 13 May 2021 10:17:02 +0200 Subject: [PATCH] ci(actions): improve rust workflow --- .github/workflows/rust.yml | 50 +++++++++++++++----------------------- 1 file changed, 19 insertions(+), 31 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 64931e6..4187cb9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -5,25 +5,36 @@ on: pull_request: jobs: - clippy: - name: Clippy ${{ matrix.os }} + test: + name: Test ${{ matrix.os }} ${{ matrix.toolchain }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: - - ubuntu-latest - - macOS-latest + include: + - os: ubuntu-latest + toolchain: stable + - os: macOS-latest + toolchain: stable + + - os: ubuntu-latest + toolchain: nightly + # - os: ubuntu-latest + # toolchain: 1.41.1 # Debian 10 Buster + - os: ubuntu-latest + toolchain: 1.47.0 # Alpine 3.13 + - os: ubuntu-latest + toolchain: 1.48.0 # Debian 11 Bullseye steps: - uses: actions/checkout@v2 - name: Setup Rust uses: actions-rs/toolchain@v1 with: - toolchain: stable + components: clippy override: true profile: minimal - components: clippy + toolchain: ${{ matrix.toolchain }} - name: Run clippy uses: actions-rs/cargo@v1 @@ -31,29 +42,6 @@ jobs: command: clippy args: --verbose --all-targets --all-features -- -D clippy::all -D clippy::pedantic - test: - name: Test ${{ matrix.os }} ${{ matrix.toolchain }} - runs-on: ${{ matrix.os }} - needs: clippy - strategy: - fail-fast: false - matrix: - os: - - ubuntu-latest - - macOS-latest - toolchain: - - stable - - nightly - steps: - - uses: actions/checkout@v2 - - - name: Setup Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.toolchain }} - profile: minimal - override: true - - name: Run tests uses: actions-rs/cargo@v1 with: @@ -87,10 +75,10 @@ jobs: - name: Setup Rust uses: actions-rs/toolchain@v1 with: - toolchain: stable override: true profile: minimal target: ${{ matrix.triple }} + toolchain: stable - name: Build release uses: actions-rs/cargo@v1