chore: add rust-toolchain.toml #2761
Workflow file for this run
This file contains hidden or 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, dev] | |
pull_request: | |
name: 64 bit CI | |
jobs: | |
test-64bit: | |
name: Run tests (64 bit) | |
runs-on: ${{ matrix.os }} | |
#container: | |
# image: ubuntu:20.10 | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, macos-latest] | |
rust: | |
- stable | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4.2.2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
- uses: Swatinem/rust-cache@v2.7.5 | |
- uses: taiki-e/install-action@cargo-hack | |
- run: sudo apt-get update -y | |
if: matrix.os == 'ubuntu-24.04' | |
- name: update toolchain | |
run: rustup toolchain install | |
- name: cargo check (powerset) | |
run: cargo hack check --feature-powerset --no-dev-deps | |
- name: cargo check examples (powerset) | |
run: cargo hack check --examples --feature-powerset | |
- name: run tests (powerset) | |
run: | | |
cargo hack test --all-targets --feature-powerset | |
- name: run doc tests (powerset) | |
run: | | |
cargo hack test --doc --feature-powerset | |
fmt: | |
name: rust fmt | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt | |
- run: | | |
/bin/bash -c "find src -type f | grep -v auto_bindings | grep -v lib | xargs rustfmt --check" | |
clippy: | |
name: clippy!! | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy | |
- uses: Swatinem/rust-cache@v2.7.5 | |
- uses: taiki-e/install-action@cargo-hack | |
- name: update toolchain | |
run: rustup toolchain install | |
- name: clippy (all targets, feature powerset) | |
run: cargo hack clippy --all-targets --feature-powerset -- -D warnings | |
msrv: | |
name: Verify MSRV | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
rust: | |
- 1.75.0 | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
- uses: taiki-e/install-action@cargo-hack | |
- name: cargo check msrv | |
run: cargo hack check --feature-powerset | |
doc: | |
name: Build docs | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: cargo doc | |
run: cargo doc --all-features |