Skip to content

build

build #1255

Workflow file for this run

on:
schedule:
- cron: '0 0 * * *'
push:
branches: [ main ]
pull_request:
branches: [ main ]
name: build
env:
CARGO_UNSTABLE_SPARSE_REGISTRY: true
jobs:
build:
name: Check on ${{ matrix.rust }}
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.75.0 # MSRV
- stable
- nightly
steps:
- uses: actions/checkout@v3
- name: Install ${{ matrix.rust }}
run: |
rustup toolchain install ${{ matrix.rust }} --profile minimal --component rustfmt,clippy
rustup default ${{ matrix.rust }}
- name: Run cargo check
run: cargo check --features kytea,train
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
continue-on-error: ${{ matrix.rust == 'nightly' }}
run: cargo clippy -- -D warnings -W clippy::nursery -W clippy::cast_lossless -W clippy::cast_possible_truncation -W clippy::cast_possible_wrap -A clippy::empty_line_after_outer_attr
- name: Run cargo test (workspace)
run: cargo test --release --workspace
- name: Run cargo test (vaporetto / no-default-features)
run: cargo test --release -p vaporetto --no-default-features --features alloc
- name: Run cargo test (vaporetto / features kytea)
run: cargo test --release -p vaporetto --no-default-features --features kytea
- name: Run cargo test (vaporetto / features train)
run: cargo test --release -p vaporetto --no-default-features --features train
- name: Run cargo test (vaporetto / features cache-type-score)
run: cargo test --release -p vaporetto --no-default-features --features cache-type-score
- name: Run cargo test (vaporetto / features fix-weight-length)
run: cargo test --release -p vaporetto --no-default-features --features fix-weight-length
- name: Run cargo test (vaporetto / features tag-prediction)
run: cargo test --release -p vaporetto --no-default-features --features tag-prediction
- name: Run cargo test (vaporetto / features charwise-daachorse)
run: cargo test --release -p vaporetto --no-default-features --features charwise-pma
- name: Run cargo test (vaporetto / features std)
run: cargo test --release -p vaporetto --no-default-features --features std