Create dependabot.yml #73
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: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '00 01 * * *' | |
permissions: | |
# to fetch code (actions/checkout) | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
# Compute capability: https://developer.nvidia.com/cuda-gpus | |
jobs: | |
build-cuda: | |
name: build-cuda | |
env: | |
RUST_BACKTRACE: 1 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- build: linux | |
os: ubuntu-latest | |
rust: stable | |
computecap: 61 | |
- build: win | |
os: windows-latest | |
rust: stable | |
computecap: 61 | |
- build: linux | |
os: ubuntu-latest | |
rust: stable | |
computecap: 75 | |
- build: win | |
os: windows-latest | |
rust: stable | |
computecap: 75 | |
- build: linux | |
os: ubuntu-latest | |
rust: stable | |
computecap: 86 | |
- build: win | |
os: windows-latest | |
rust: stable | |
computecap: 86 | |
- build: linux | |
os: ubuntu-latest | |
rust: stable | |
computecap: 89 | |
- build: win | |
os: windows-latest | |
rust: stable | |
computecap: 89 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Configure build for amd64 | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64 | |
- uses: Jimver/[email protected] | |
id: cuda-toolkit | |
with: | |
cuda: '12.1.0' | |
method: 'network' | |
sub-packages: '[]' | |
non-cuda-sub-packages: '["libcublas"]' | |
- name: Build release blue-candle | |
run: cargo build --release --features cuda | |
env: | |
CUDA_COMPUTE_CAP: ${{ matrix.computecap }} | |
build-test-cpu: | |
name: build-test-cpu | |
env: | |
RUST_BACKTRACE: 1 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- build: beta | |
os: ubuntu-latest | |
rust: beta | |
- build: nightly | |
os: ubuntu-latest | |
rust: nightly | |
- build: linux | |
os: ubuntu-latest | |
rust: stable | |
- build: macos | |
os: macos-latest | |
rust: stable | |
- build: win | |
os: windows-latest | |
rust: stable | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Build debug blue-candle | |
run: cargo build | |
- name: Run test with release | |
run: cargo run --release --bin blue_candle -- --test | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: rustfmt | |
- name: Check formatting | |
run: cargo fmt --all --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: clippy | |
- name: Check clippy | |
run: cargo clippy --all-targets -- -D warnings | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Check documentation | |
env: | |
RUSTDOCFLAGS: -D warnings | |
run: cargo doc --no-deps --document-private-items --workspace |