fix: Add a working cuda
feature
#68
Workflow file for this run
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: Rust | |
on: | |
merge_group: | |
push: | |
branches: [dev, main] | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
branches: [dev, main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: [ubuntu-latest] | |
strategy: | |
fail-fast: false | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: lurk-lab/ci-workflows | |
- uses: ./.github/actions/ci-env | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: taiki-e/install-action@nextest | |
- uses: Swatinem/rust-cache@v2 | |
# make sure benches don't bit-rot | |
- name: build benches & examples | |
run: cargo build --benches --examples --release | |
- name: cargo test | |
run: | | |
cargo nextest run --release --profile ci | |
- name: Doctests | |
run: | | |
cargo test --doc | |
# Rustfmt, clippy, and doctests | |
lints: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: lurk-lab/ci-workflows | |
- uses: ./.github/actions/ci-env | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check Rustfmt Code Style | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Check clippy warnings | |
run: | | |
if $(cargo --list|grep -q xclippy); then | |
cargo xclippy -Dwarnings | |
else | |
cargo clippy -Dwarnings | |
fi | |
- name: Doctests | |
run: cargo test --doc --workspace | |
# Check MSRV in `Cargo.toml` is valid | |
msrv: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: lurk-lab/ci-workflows | |
- uses: ./.github/actions/ci-env | |
- uses: actions/checkout@v4 | |
- name: Install rustup | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install cargo-msrv | |
run: cargo install cargo-msrv | |
- name: Check Rust MSRV | |
run: cargo msrv verify | |
# Check documentation links aren't broken | |
link-checker: | |
uses: lurk-lab/ci-workflows/.github/workflows/links-check.yml@main | |
with: | |
fail-fast: true | |
# Lint dependencies for licensing and auditing issues as per https://github.com/lurk-lab/bellpepper/blob/main/deny.toml | |
licenses-audits: | |
uses: lurk-lab/ci-workflows/.github/workflows/licenses-audits.yml@main |