Fix unsafe_op_in_unsafe_fn
lint
#825
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: build | |
on: | |
push: | |
branches: ["main", "v[0-9]+.[0-9]+"] | |
pull_request: | |
branches: ["main", "v[0-9]+.[0-9]+"] | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build_and_test: | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: ["stable", "1.77", "beta", "nightly"] | |
features: ["--features \"\"", "--all-features", "--no-default-features"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt update && sudo apt install -y cmake clang-15 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo build ${{ matrix.features }} | |
- run: cargo test ${{ matrix.features }} | |
build_and_test_windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: "stable" | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo build | |
- run: cargo test | |
build_and_test_macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
runner: ["macos-13", "macos-latest"] | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: "stable" | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo build | |
- run: cargo test | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt update && sudo apt install -y cmake clang-15 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: rustup component add rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo fmt --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt update && sudo apt install -y cmake clang-15 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: rustup component add clippy | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo clippy --all-features -- -D warnings | |
semver: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check semver | |
uses: obi1kenobi/cargo-semver-checks-action@v2 | |
minimal-versions: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt update && sudo apt install -y cmake clang-15 | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo install cargo-hack cargo-minimal-versions --locked | |
- run: cargo minimal-versions check --workspace --all-features --direct | |
codecov: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt update && sudo apt install -y cmake clang-15 | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo +nightly install cargo-llvm-cov --locked | |
- run: cargo +nightly llvm-cov --all-features --doctests --lcov --output-path lcov.info | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |