Bump anyhow from 1.0.91 to 1.0.92 #353
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, pull_request ] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
include: | |
- { name: "Rust 1.80", rust: "1.80", os: ubuntu-latest, cargo_args: "" } | |
- { name: "Rust stable", rust: stable, os: ubuntu-latest, cargo_args: "" } | |
- { name: "Rust nightly", rust: nightly, os: ubuntu-latest, cargo_args: "" } | |
- { name: "Rust nightly, windows", rust: nightly, os: windows-latest, cargo_args: "" } | |
- { name: "Rust nightly, macos", rust: nightly, os: macos-latest, cargo_args: "" } | |
- { name: "Rust nightly, release", rust: nightly, os: ubuntu-latest, cargo_args: "--release" } | |
- { name: "Rust nightly, nofeatures", rust: nightly, os: ubuntu-latest, cargo_args: "--no-default-features" } | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
target/ | |
key: cargo-${{ matrix.os }}-${{ matrix.rust }}-${{ matrix.cargo_args }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ matrix.os }}-${{ matrix.rust }}-${{ matrix.cargo_args }}- | |
cargo-${{ matrix.os }}-${{ matrix.rust }}- | |
cargo-${{ matrix.os }}- | |
- name: Build | |
run: cargo build ${{ matrix.cargo_args }} | |
env: | |
RUSTFLAGS: -Dwarnings | |
- name: Install share files | |
run: cd share && sudo make install | |
if: ${{ !startsWith(matrix.os, 'windows') }} | |
- name: Test | |
run: cargo test ${{ matrix.cargo_args }} | |
- name: Format check | |
run: cargo fmt --check | |
- name: Run omnilinter on its own repository (all checks) | |
run: cargo --quiet run ${{ matrix.cargo_args }} -- --color always --format=by-rule --config .omnilinter.conf . | |
- name: Run omnilinter on its own repository (fatal checks) | |
run: cargo --quiet run ${{ matrix.cargo_args }} -- --color always --format=by-rule --config .omnilinter.conf --error-exitcode 1 --tags fatal . | |
coverage: | |
needs: test | |
runs-on: ubuntu-latest | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
name: Coverage | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: llvm-tools-preview | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
target/ | |
key: cargo-coverage-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
cargo-coverage- | |
- name: Test | |
run: cargo test --features coverage | |
env: | |
RUSTFLAGS: "-Cinstrument-coverage" | |
RUSTDOCFLAGS: "-Cinstrument-coverage" | |
LLVM_PROFILE_FILE: "${{ github.workspace }}/default_%m_%p.profraw" | |
- name: Collect coverage | |
run: | | |
curl -sL https://github.com/mozilla/grcov/releases/download/v0.8.19/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar -xjf- | |
./grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --keep-only 'src/*' --ignore '**/tests.rs' -o coverage.lcov | |
- name: Submit coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
files: ./coverage.lcov | |
token: ${{ secrets.CODECOV_TOKEN }} |