-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (71 loc) · 2.17 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
67
68
69
70
71
72
73
74
name: Run Tests
on:
push:
branches:
- "develop"
pull_request:
workflow_dispatch:
env:
RUST_CHANNEL: "stable"
RUST_COV_CHANNEL: "nightly"
jobs:
test-covereage:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v0
with:
cache: false
channel: ${{ env.RUST_COV_CHANNEL }}
- name: Install grcov
uses: SierraSoftworks/setup-grcov@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run cargo test
run: cargo test --locked
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
RUSTDOCFLAGS: "-Cpanic=abort"
- name: Collect covereage data
run: grcov . --binary-path target/debug/deps/ -s . -t lcov --ignore-not-existing --ignore '../**' --ignore '/*' -o ./lcov.info
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./lcov.info
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v0
with:
cache: false
channel: ${{ env.RUST_COV_CHANNEL }}
- name: Run cargo test
run: cargo test -p pindakaas --features splr,cadical,ipasir-up,trace
if: matrix.os == 'windows-latest'
- name: Run cargo test
run: cargo test --all-features
if: matrix.os != 'windows-latest'
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain and clippy
uses: moonrepo/setup-rust@v0
with:
channel: ${{ env.RUST_CHANNEL }}
components: clippy
- name: Run clippy
run: cargo clippy --tests -- -D warnings
- name: Run clippy with all features
run: cargo clippy --tests --all-features -- -D warnings