chore(ci): try installing toolchains separately again to see if it fi… #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
workflow_dispatch: | |
env: | |
CI: 1 | |
jobs: | |
clippy: | |
name: Clippy validation${{ matrix.all-features && ' with all features' || '' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
all-features: [ false, true ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Install Rust with clippy | |
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | |
with: | |
toolchain: stable | |
components: clippy | |
cache: false | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | |
with: | |
prefix-key: v1-rust | |
key: all-features-${{ matrix.all-features }} | |
cache-on-failure: true | |
- name: Run clippy | |
uses: clechasseur/rs-clippy-check@a2a93bdcf05de7909aabd62eca762179ad3dbe50 # v3.0.5 | |
with: | |
args: --workspace --all-targets ${{ matrix.all-features && '--all-features' || '' }} -- -D warnings | |
fmt: | |
name: Rustfmt check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Install Rust nightly with rustfmt | |
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | |
with: | |
toolchain: nightly | |
components: rustfmt | |
cache: false | |
- name: Run Rustfmt | |
uses: clechasseur/rs-fmt-check@1a4ebb722c8e8a04f0d2e363c91744f81c968c42 # v2.0.5 | |
with: | |
args: --all | |
msrv-check: | |
name: MSRV check for Rust ${{ matrix.toolchain }} on ${{ matrix.os }}${{ matrix.all-features && ' with all features' || '' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: [ 1.70.0 ] | |
os: [ ubuntu, macos, windows ] | |
all-features: [ false, true ] | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Install Rust nightly | |
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | |
with: | |
toolchain: nightly | |
cache: false | |
matcher: false | |
rustflags: '' | |
override: false | |
- name: Install Rust ${{ matrix.toolchain }} | |
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
cache: false | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | |
with: | |
prefix-key: v9-rust | |
key: all-features-${{ matrix.all-features }}-msrv-pins-files-${{ hashFiles('**/msrv-pins.toml') }} | |
cache-on-failure: true | |
- name: Install required tools | |
uses: taiki-e/install-action@005f9c234df66b748f0b5f22b26ef83172082762 # v2.44.20 | |
with: | |
tool: just,cargo-hack,cargo-minimal-versions,cargo-msrv,cargo-msrv-prep | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run checks using cargo-minimal-versions | |
run: just all_features=${{ matrix.all-features }} check-minimal | |
build: | |
name: Build for Rust ${{ matrix.toolchain }}${{ matrix.experimental && ' (experimental)' || '' }} on ${{ matrix.os }}${{ matrix.ignore-lock && ' without Cargo.lock' || '' }}${{ matrix.all-features && ' with all features' || '' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: [ 1.75.0, stable, beta, nightly ] | |
os: [ ubuntu, macos, windows ] | |
ignore-lock: [ false, true ] | |
all-features: [ false, true ] | |
include: | |
- experimental: false | |
- toolchain: beta | |
experimental: true | |
- toolchain: nightly | |
experimental: true | |
exclude: | |
- toolchain: 1.75.0 | |
ignore-lock: true | |
runs-on: ${{ matrix.os }}-latest | |
continue-on-error: ${{ matrix.experimental }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Remove Cargo.lock | |
if: ${{ matrix.ignore-lock }} | |
run: rm Cargo.lock | |
- name: Install Rust ${{ matrix.toolchain }} | |
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
cache: false | |
- name: Rust Cache | |
if: ${{ !matrix.experimental }} | |
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | |
with: | |
prefix-key: v2-rust | |
key: ignore-lock-${{ matrix.ignore-lock }}-all-features-${{ matrix.all-features }} | |
cache-on-failure: true | |
- name: Install just | |
uses: taiki-e/install-action@005f9c234df66b748f0b5f22b26ef83172082762 # v2.44.20 | |
with: | |
tool: just | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run checks | |
run: just all_features=${{ matrix.all-features }} check | |
- name: Run tests | |
run: just all_features=${{ matrix.all-features }} test | |
tarpaulin: | |
name: Code coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Install Rust | |
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | |
with: | |
toolchain: 1.75.0 | |
cache: false | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | |
with: | |
prefix-key: v2-rust | |
cache-targets: false | |
cache-on-failure: true | |
- name: Install cargo-tarpaulin | |
uses: taiki-e/install-action@005f9c234df66b748f0b5f22b26ef83172082762 # v2.44.20 | |
with: | |
tool: cargo-tarpaulin | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run cargo-tarpaulin | |
uses: clechasseur/rs-cargo@34eb9ee3e4186e5c7820a54393fbf081f78bc102 # v2.0.5 | |
with: | |
command: tarpaulin | |
- name: Upload code coverage results to codecov.io | |
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
with: | |
name: code-coverage-report | |
path: | | |
cobertura.xml | |
tarpaulin-report.html | |
doc: | |
name: Rustdoc check for Rust ${{ matrix.toolchain }}${{ matrix.experimental && ' (experimental)' || '' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: [ stable, nightly ] | |
include: | |
- experimental: false | |
- toolchain: nightly | |
experimental: true | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Install Rust ${{ matrix.toolchain }} | |
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
cache: false | |
- name: Rust Cache | |
if: ${{ !matrix.experimental }} | |
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | |
with: | |
prefix-key: v2-rust | |
cache-targets: false | |
cache-on-failure: true | |
- name: Install just | |
uses: taiki-e/install-action@005f9c234df66b748f0b5f22b26ef83172082762 # v2.44.20 | |
with: | |
tool: just | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate doc using rustdoc | |
run: just doc | |
publish-dry-run: | |
name: Publish dry-run | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Install Rust | |
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | |
with: | |
toolchain: stable | |
cache: false | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | |
with: | |
prefix-key: v2-rust | |
cache-targets: false | |
cache-on-failure: true | |
- name: Perform publish dry-run | |
uses: clechasseur/rs-cargo@34eb9ee3e4186e5c7820a54393fbf081f78bc102 # v2.0.5 | |
with: | |
command: publish | |
args: --dry-run |