Elffuss BraidHub

utopia-ia/elffuss-braid public

0f2ebd52224c · 3.0 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 bench:
64 name: benchmark smoke run
65 runs-on: ubuntu-latest
66 steps:
67 - uses: actions/checkout@v5
68 with:
69 # The quick import scenario reads this repository's own history.
70 fetch-depth: 0
71 - uses: dtolnay/rust-toolchain@stable
72 - uses: Swatinem/rust-cache@v2
73 # Small inputs, only to keep the suite working: the ratios of a quick
74 # run mean nothing, and its results stay on the runner, unpublished.
75 - run: python3 bench/run.py --quick
76
77 privacy:
78 name: privacy check
79 runs-on: ubuntu-latest
80 steps:
81 - uses: actions/checkout@v5
82 with:
83 fetch-depth: 0
84 - run: scripts/privacy-check.sh
85
86 spec:
87 name: spec vectors (independent implementation)
88 runs-on: ubuntu-latest
89 steps:
90 - uses: actions/checkout@v5
91 - uses: dtolnay/rust-toolchain@stable
92 - uses: Swatinem/rust-cache@v2
93 - run: cargo install b3sum --locked
94 - run: python3 docs/spec/check_vectors.py
95
96 fuzz:
97 name: fuzz smoke test
98 runs-on: ubuntu-latest
99 steps:
100 - uses: actions/checkout@v5
101 - uses: dtolnay/rust-toolchain@nightly
102 - uses: taiki-e/install-action@v2
103 with:
104 tool: cargo-fuzz
105 - name: run every target for one minute
106 working-directory: fuzz
107 run: |
108 for target in decode_tree decode_changeset names git_map git_objects; do
109 cargo fuzz run "$target" -- -max_total_time=60
110 done