name: CI
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
schedule:
- cron: '13 3 * * 1'
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
fmt-clippy:
name: fmt + clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout o3gen
uses: actions/checkout@v4
with:
repository: dineshdb/o3gen
path: o3gen_dep
- name: Setup o3gen path
run: mv o3gen_dep ../o3gen
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --all-features -- -D warnings
test:
name: test ${{ matrix.rust }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust: [stable, beta, nightly]
os: [ubuntu-latest, windows-latest, macos-latest]
exclude:
- os: macos-latest
rust: beta
- os: macos-latest
rust: nightly
- os: windows-latest
rust: beta
- os: windows-latest
rust: nightly
steps:
- uses: actions/checkout@v4
- name: Checkout o3gen
uses: actions/checkout@v4
with:
repository: dineshdb/o3gen
path: o3gen_dep
- name: Setup o3gen path
run: mv o3gen_dep ../o3gen
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- run: cargo build --verbose
- run: cargo test --all-features --verbose
- run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: -D warnings