Elffuss BraidHub

utopia-ia/elffuss-braid public

38b3e04f7d4a · 2.5 KiBRawPermalink
1name: CI
2
3on:
4 push:
5 branches: [main]
6 pull_request:
7
8permissions:
9 contents: read
10
11env:
12 CARGO_TERM_COLOR: always
13 RUSTFLAGS: -D warnings
14
15jobs:
16 test:
17 name: test (${{ matrix.os }})
18 strategy:
19 fail-fast: false
20 matrix:
21 os: [ubuntu-latest, ubuntu-24.04-arm, macos-15]
22 runs-on: ${{ matrix.os }}
23 steps:
24 - uses: actions/checkout@v5
25 with:
26 # The git bridge round-trips this repository's own history, which a
27 # shallow checkout does not have.
28 fetch-depth: 0
29 - uses: dtolnay/rust-toolchain@stable
30 with:
31 components: rustfmt, clippy
32 - uses: Swatinem/rust-cache@v2
33 - run: cargo fmt --all --check
34 - run: cargo clippy --workspace --all-targets --locked
35 - run: cargo test --workspace --locked
36
37 msrv:
38 name: minimum Rust version
39 runs-on: ubuntu-latest
40 steps:
41 - uses: actions/checkout@v5
42 - uses: dtolnay/rust-toolchain@1.89
43 - uses: Swatinem/rust-cache@v2
44 - run: cargo check --workspace --locked
45
46 wasm:
47 name: format and engine on WebAssembly
48 runs-on: ubuntu-latest
49 steps:
50 - uses: actions/checkout@v5
51 - uses: dtolnay/rust-toolchain@stable
52 with:
53 targets: wasm32-unknown-unknown
54 - run: cargo check -p elffuss-braid-format -p elffuss-braid-engine --target wasm32-unknown-unknown --locked
55
56 deny:
57 name: licences and advisories
58 runs-on: ubuntu-latest
59 steps:
60 - uses: actions/checkout@v5
61 - uses: EmbarkStudios/cargo-deny-action@v2
62
63 privacy:
64 name: privacy check
65 runs-on: ubuntu-latest
66 steps:
67 - uses: actions/checkout@v5
68 with:
69 fetch-depth: 0
70 - run: scripts/privacy-check.sh
71
72 spec:
73 name: spec vectors (independent implementation)
74 runs-on: ubuntu-latest
75 steps:
76 - uses: actions/checkout@v5
77 - uses: dtolnay/rust-toolchain@stable
78 - uses: Swatinem/rust-cache@v2
79 - run: cargo install b3sum --locked
80 - run: python3 docs/spec/check_vectors.py
81
82 fuzz:
83 name: fuzz smoke test
84 runs-on: ubuntu-latest
85 steps:
86 - uses: actions/checkout@v5
87 - uses: dtolnay/rust-toolchain@nightly
88 - uses: taiki-e/install-action@v2
89 with:
90 tool: cargo-fuzz
91 - name: run every target for one minute
92 working-directory: fuzz
93 run: |
94 for target in decode_tree decode_changeset names git_map git_objects; do
95 cargo fuzz run "$target" -- -max_total_time=60
96 done