-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (59 loc) · 1.91 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
name: Rust
on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]
env:
CARGO_TERM_COLOR: always
RUST_CHANNEL: stable
# Lets us format with unstable rustfmt options
RUST_FMT_CHANNEL: nightly
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
run: |
rustup toolchain install --profile minimal --no-self-update ${{ env.RUST_CHANNEL }}
rustup default ${{ env.RUST_CHANNEL }}
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.5
- name: Run cargo test
run: cargo test --features splr,cadical,kissat,intel-sat,ipasir-up
if: matrix.os == 'ubuntu-latest'
- name: Run cargo test
run: cargo test -p pindakaas --features splr,cadical,ipasir-up
if: matrix.os == 'windows-latest'
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
run: |
rustup toolchain install --profile minimal --component clippy --no-self-update ${{ env.RUST_CHANNEL }}
rustup default ${{ env.RUST_CHANNEL }}
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.5
- name: Run clippy
run: cargo clippy --tests --features splr,cadical,kissat,intel-sat,ipasir-up -- -D warnings
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
run: |
rustup toolchain install --profile minimal --component rustfmt --no-self-update ${{ env.RUST_FMT_CHANNEL }}
rustup default ${{ env.RUST_CHANNEL }}
- name: Run cargo format
run: cargo +nightly fmt --all --check