ci(actions): improve rust workflow

This commit is contained in:
EdJoPaTo
2021-05-13 10:17:02 +02:00
parent b268c7c3eb
commit 0cafdbb6e4
+19 -31
View File
@@ -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