Update codecov/codecov-action action to v5 #123
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
name: CI | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 | |
- name: Lint (clippy) | |
run: cargo clippy --all-features --all-targets | |
- name: Lint (rustfmt) | |
run: cargo xfmt --check | |
- name: Run rustdoc | |
env: | |
RUSTC_BOOTSTRAP: 1 # for feature(doc_cfg) | |
RUSTDOCFLAGS: -Dwarnings --cfg doc_cfg | |
run: cargo doc --all-features --workspace | |
- name: Check for differences | |
run: git diff --exit-code | |
build: | |
name: Build and test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
rust-version: ["1.64", stable] | |
fail-fast: false | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-version }} | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 | |
- uses: taiki-e/install-action@cargo-hack | |
- uses: taiki-e/install-action@nextest | |
- name: Build | |
run: ./scripts/commands.sh build | |
- name: Test | |
run: ./scripts/commands.sh nextest | |
- name: Run doctests | |
if: matrix.rust-version == 'stable' | |
run: ./scripts/commands.sh doctest | |
miri: | |
name: Miri | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust-version: [nightly] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-version }} | |
components: miri | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 | |
- uses: taiki-e/install-action@nextest | |
- name: Run miri | |
run: ./scripts/commands.sh miri | |
no-std: | |
name: Build no_std for ${{ matrix.target }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# thumbv7m-none-eabi supports atomic CAS. | |
# thumbv6m-none-eabi supports atomic, but not atomic CAS. | |
target: | |
- thumbv7m-none-eabi | |
- thumbv6m-none-eabi | |
rust-version: [stable] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-version }} | |
targets: ${{ matrix.target }} | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 | |
- uses: taiki-e/install-action@cargo-hack | |
- run: ./scripts/commands.sh build-no-std --target ${{ matrix.target }} |