-
Notifications
You must be signed in to change notification settings - Fork 9
66 lines (51 loc) · 2.31 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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