ci(rust): improve workflow
This commit is contained in:
@@ -6,33 +6,33 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tarpaulin:
|
tarpaulin:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
shell: bash -eux {0}
|
shell: bash -eux {0}
|
||||||
run: |
|
run: |
|
||||||
rustup --version
|
|
||||||
rustup show
|
|
||||||
rustup toolchain install stable --profile minimal
|
rustup toolchain install stable --profile minimal
|
||||||
rustup default stable
|
rustup default stable
|
||||||
|
|
||||||
|
- name: Install cargo-tarpaulin
|
||||||
|
uses: taiki-e/install-action@v2
|
||||||
|
with:
|
||||||
|
tool: cargo-tarpaulin
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
key: tarpaulin-${{ hashFiles('**/Cargo.lock') }}
|
key: tarpaulin-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: tarpaulin-
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
|
|
||||||
- name: Run cargo-tarpaulin
|
- name: Run cargo-tarpaulin
|
||||||
uses: actions-rs/tarpaulin@v0.1
|
run: cargo tarpaulin --all-features --out Html
|
||||||
with:
|
|
||||||
args: --all-features
|
|
||||||
out-type: Html
|
|
||||||
|
|
||||||
- name: Upload Report
|
- name: Upload Report
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|||||||
+17
-22
@@ -9,13 +9,12 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rustfmt:
|
rustfmt:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
shell: bash -eux {0}
|
shell: bash -eux {0}
|
||||||
run: |
|
run: |
|
||||||
rustup --version
|
rm ~/.cargo/bin/{rustfmt,cargo-fmt}
|
||||||
rustup show
|
|
||||||
rustup toolchain install stable --profile minimal --component rustfmt
|
rustup toolchain install stable --profile minimal --component rustfmt
|
||||||
rustup default stable
|
rustup default stable
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@@ -31,9 +30,9 @@ jobs:
|
|||||||
toolchain:
|
toolchain:
|
||||||
- stable
|
- stable
|
||||||
os:
|
os:
|
||||||
- ubuntu-22.04
|
- ubuntu-latest
|
||||||
- macos-12
|
- macos-latest
|
||||||
- windows-2022
|
- windows-latest
|
||||||
clippyargs:
|
clippyargs:
|
||||||
- -D clippy::pedantic -D warnings
|
- -D clippy::pedantic -D warnings
|
||||||
features:
|
features:
|
||||||
@@ -41,18 +40,18 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
# Check future versions and maybe get some glances on soon to be lints
|
# Check future versions and maybe get some glances on soon to be lints
|
||||||
- toolchain: beta
|
- toolchain: beta
|
||||||
os: ubuntu-22.04
|
os: ubuntu-latest
|
||||||
features: --all-features
|
features: --all-features
|
||||||
clippyargs: -W clippy::pedantic -W clippy::nursery -W clippy::cargo
|
clippyargs: -W clippy::pedantic -W clippy::nursery -W clippy::cargo
|
||||||
- toolchain: nightly
|
- toolchain: nightly
|
||||||
os: ubuntu-22.04
|
os: ubuntu-latest
|
||||||
features: --all-features
|
features: --all-features
|
||||||
clippyargs: -W clippy::pedantic
|
clippyargs: -W clippy::pedantic
|
||||||
|
|
||||||
# Check the minimum supported Rust version (MSRV).
|
# Check the minimum supported Rust version (MSRV).
|
||||||
# Sometimes old rust versions don't yet have the lints (allow unknown) or don't have fixes in lints (false positives -> don't error, just warn).
|
# Sometimes old rust versions don't yet have the lints (allow unknown) or don't have fixes in lints (false positives -> don't error, just warn).
|
||||||
# When a certain distro is a target look up its version: https://repology.org/project/rust/versions
|
# When a certain distro is a target look up its version: https://repology.org/project/rust/versions
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-latest
|
||||||
toolchain: 1.56.1
|
toolchain: 1.56.1
|
||||||
clippyargs: -A unknown-lints
|
clippyargs: -A unknown-lints
|
||||||
features: --all-features
|
features: --all-features
|
||||||
@@ -60,8 +59,6 @@ jobs:
|
|||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
shell: bash -eux {0}
|
shell: bash -eux {0}
|
||||||
run: |
|
run: |
|
||||||
rustup --version
|
|
||||||
rustup show
|
|
||||||
rustup toolchain install ${{ matrix.toolchain }} --profile minimal --component clippy
|
rustup toolchain install ${{ matrix.toolchain }} --profile minimal --component clippy
|
||||||
rustup default ${{ matrix.toolchain }}
|
rustup default ${{ matrix.toolchain }}
|
||||||
|
|
||||||
@@ -100,31 +97,29 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- triple: x86_64-unknown-linux-gnu
|
- triple: x86_64-unknown-linux-gnu
|
||||||
os: ubuntu-22.04
|
os: ubuntu-latest
|
||||||
- triple: aarch64-unknown-linux-gnu
|
- triple: aarch64-unknown-linux-gnu
|
||||||
os: ubuntu-22.04
|
os: ubuntu-latest
|
||||||
- triple: armv7-unknown-linux-gnueabihf
|
- triple: armv7-unknown-linux-gnueabihf
|
||||||
os: ubuntu-22.04
|
os: ubuntu-latest
|
||||||
- triple: arm-unknown-linux-gnueabihf
|
- triple: arm-unknown-linux-gnueabihf
|
||||||
os: ubuntu-22.04
|
os: ubuntu-latest
|
||||||
- triple: riscv64gc-unknown-linux-gnu
|
- triple: riscv64gc-unknown-linux-gnu
|
||||||
os: ubuntu-22.04
|
os: ubuntu-latest
|
||||||
|
|
||||||
- triple: x86_64-apple-darwin
|
- triple: x86_64-apple-darwin
|
||||||
os: macos-12
|
os: macos-latest
|
||||||
- triple: aarch64-apple-darwin
|
- triple: aarch64-apple-darwin
|
||||||
os: macos-12
|
os: macos-latest
|
||||||
|
|
||||||
- triple: x86_64-pc-windows-msvc
|
- triple: x86_64-pc-windows-msvc
|
||||||
os: windows-2022
|
os: windows-latest
|
||||||
- triple: aarch64-pc-windows-msvc
|
- triple: aarch64-pc-windows-msvc
|
||||||
os: windows-2022
|
os: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
shell: bash -eux {0}
|
shell: bash -eux {0}
|
||||||
run: |
|
run: |
|
||||||
rustup --version
|
|
||||||
rustup show
|
|
||||||
rustup toolchain install stable --profile minimal --target ${{ matrix.triple }}
|
rustup toolchain install stable --profile minimal --target ${{ matrix.triple }}
|
||||||
rustup default stable
|
rustup default stable
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user