ci(rust): improve workflow
This commit is contained in:
+35
-28
@@ -11,45 +11,44 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
name: Test ${{ matrix.os }} ${{ matrix.toolchain }}
|
name: Test ${{ matrix.os }} ${{ matrix.toolchain }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
continue-on-error: ${{ matrix.experimental }}
|
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- macos-latest
|
||||||
|
toolchain:
|
||||||
|
- stable
|
||||||
|
clippyargs:
|
||||||
|
- -D clippy::pedantic -D warnings
|
||||||
|
features:
|
||||||
|
- --all-features
|
||||||
include:
|
include:
|
||||||
# Check stable on the main platforms and ensure there is not even a single warning
|
# Check future versions and maybe get some glances on soon to be lints
|
||||||
- os: ubuntu-latest
|
|
||||||
toolchain: stable
|
|
||||||
clippyargs: -D clippy::pedantic -D warnings
|
|
||||||
experimental: false
|
|
||||||
- os: macOS-latest
|
|
||||||
toolchain: stable
|
|
||||||
clippyargs: -D clippy::pedantic -D warnings
|
|
||||||
experimental: false
|
|
||||||
|
|
||||||
# Check beta/nightly (potentially buggy) and maybe get some glances on soon to be lints
|
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
toolchain: beta
|
toolchain: beta
|
||||||
clippyargs: -W clippy::pedantic
|
clippyargs: -W clippy::pedantic -W clippy::nursery -W clippy::cargo
|
||||||
experimental: true
|
features: --all-features
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
clippyargs: -W clippy::pedantic
|
clippyargs: -W clippy::pedantic
|
||||||
experimental: true
|
features: --all-features
|
||||||
|
|
||||||
# Check if it is still running on older Rust versions.
|
# Check if it is still running on older Rust versions.
|
||||||
# Sometimes they dont have lint bugfixes which results in false positives -> Dont error, just warn.
|
# Sometimes they dont have lint bugfixes which results in false positives -> Dont error, just warn.
|
||||||
# Also some specified lints are not yet existing in the older rust version -> allow unknown lints.
|
# Also some specified lints are not yet existing in the older rust version -> allow unknown lints.
|
||||||
|
# https://packages.debian.org/search?keywords=rustc
|
||||||
|
# https://pkgs.alpinelinux.org/packages?name=rust
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
toolchain: 1.48.0 # Debian 11 Bullseye
|
toolchain: 1.48.0 # Debian 11 Bullseye
|
||||||
clippyargs: -A unknown-lints -A clippy::unknown-clippy-lints
|
clippyargs: -A unknown-lints -A clippy::unknown-clippy-lints
|
||||||
experimental: false
|
features: --all-features
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
toolchain: 1.52.0 # Alpine 3.14
|
toolchain: 1.52.1 # Alpine 3.14
|
||||||
clippyargs: -A unknown-lints
|
clippyargs: -A unknown-lints
|
||||||
experimental: false
|
features: --all-features
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@@ -58,17 +57,25 @@ jobs:
|
|||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: ${{ matrix.toolchain }}
|
toolchain: ${{ matrix.toolchain }}
|
||||||
|
|
||||||
- name: Run clippy
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Check clippy
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --verbose --all-targets --all-features -- ${{ matrix.clippyargs }}
|
args: --verbose --all-targets ${{ matrix.features }} -- ${{ matrix.clippyargs }}
|
||||||
|
|
||||||
|
- name: Check docs
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: doc
|
||||||
|
args: --verbose --no-deps ${{ matrix.features }}
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --verbose --all-features
|
args: --verbose ${{ matrix.features }}
|
||||||
|
|
||||||
github-release:
|
github-release:
|
||||||
name: Release ${{ matrix.triple }}
|
name: Release ${{ matrix.triple }}
|
||||||
@@ -87,13 +94,11 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
triple: aarch64-unknown-linux-gnu
|
triple: aarch64-unknown-linux-gnu
|
||||||
|
|
||||||
- os: macOS-latest
|
- os: macos-latest
|
||||||
triple: x86_64-apple-darwin
|
triple: x86_64-apple-darwin
|
||||||
- os: macOS-latest
|
- os: macos-latest
|
||||||
triple: aarch64-apple-darwin
|
triple: aarch64-apple-darwin
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@@ -102,10 +107,12 @@ jobs:
|
|||||||
target: ${{ matrix.triple }}
|
target: ${{ matrix.triple }}
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
env:
|
env:
|
||||||
# TODO: Remove this once it's the default
|
# TODO: Remove this once macos-11 is macos-latest
|
||||||
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
|
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ jobs:
|
|||||||
name: Rustfmt
|
name: Rustfmt
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@@ -19,6 +17,8 @@ jobs:
|
|||||||
profile: minimal
|
profile: minimal
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Check format
|
- name: Check format
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user