ci(actions): improve rust workflow
This commit is contained in:
+19
-31
@@ -5,25 +5,36 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clippy:
|
test:
|
||||||
name: Clippy ${{ matrix.os }}
|
name: Test ${{ matrix.os }} ${{ matrix.toolchain }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
include:
|
||||||
- ubuntu-latest
|
- os: ubuntu-latest
|
||||||
- macOS-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:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
components: clippy
|
||||||
override: true
|
override: true
|
||||||
profile: minimal
|
profile: minimal
|
||||||
components: clippy
|
toolchain: ${{ matrix.toolchain }}
|
||||||
|
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
@@ -31,29 +42,6 @@ jobs:
|
|||||||
command: clippy
|
command: clippy
|
||||||
args: --verbose --all-targets --all-features -- -D clippy::all -D clippy::pedantic
|
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
|
- name: Run tests
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
@@ -87,10 +75,10 @@ jobs:
|
|||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
|
||||||
override: true
|
override: true
|
||||||
profile: minimal
|
profile: minimal
|
||||||
target: ${{ matrix.triple }}
|
target: ${{ matrix.triple }}
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
- name: Build release
|
- name: Build release
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user