-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (82 loc) · 3.33 KB
/
ci.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
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI
on: [ push, pull_request, workflow_dispatch ]
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- run: cargo clippy --all --all-targets --features full-test-suite
- run: cargo clippy --all --all-targets --features full-test-suite --no-default-features
- run: cargo clippy --all --all-targets --no-default-features
- run: cargo fmt --all --check
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
toolchain:
- stable
- "1.65"
os:
- ubuntu-latest
# - macos-latest
# - windows-latest
steps:
- uses: actions/checkout@v4
- name: install toolchain (${{ matrix.toolchain }})
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- uses: Swatinem/rust-cache@v2
- name: msrv pinning
run: if [[ "stable" != "${{ matrix.toolchain }}" ]]; then ./downgrade-for-msrv.sh ; fi
- name: test
run: cargo test --workspace --all-targets --features full-test-suite
- name: test no-default-features
run: cargo test --workspace --all-targets --features full-test-suite --no-default-features
- name: test minimal features
run: cargo test --workspace --all-targets --no-default-features
- name: test doc
run: cargo test --workspace --doc --features full-test-suite
- name: test doc no-default-features
run: cargo test --workspace --doc --features full-test-suite --no-default-features
- name: test doc minimal features
run: cargo test --workspace --doc --no-default-features
kani:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify with Kani
uses: model-checking/kani-github-action@v1
with:
enable-propproof: true
kani-version: "0.45.0"
args: |
--tests -p bilrost-types --default-unwind 3 \
--harness "tests::check_timestamp_roundtrip_via_system_time" \
--harness "tests::check_duration_roundtrip" \
--harness "tests::check_duration_roundtrip_nanos"
# --default-unwind N roughly corresponds to how much effort
# Kani will spend trying to prove correctness of the
# program. Higher the number, more programs can be proven
# correct. However, Kani will require more time and memory. If
# Kani fails with "Failed Checks: unwinding assertion," this
# number may need to be raised for Kani to succeed.
no-std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- name: install cargo-no-std-check
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-no-std-check
- name: bilrost cargo-no-std-check
run: cargo no-std-check --manifest-path Cargo.toml --features full-test-suite --no-default-features
- name: bilrost-derive cargo-no-std-check
run: cargo no-std-check --manifest-path bilrost-derive/Cargo.toml --no-default-features
- name: bilrost-types cargo-no-std-check
run: cargo no-std-check --manifest-path bilrost-types/Cargo.toml --no-default-features