Skip to content

Dev/new ci

Dev/new ci #62

Workflow file for this run

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
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
- 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 }}
- uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '12.1.0'
- name: Build release blue-candle
run: cargo build --release --features cuda
# test:
# name: 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