Elffuss BraidHub

utopia-ia/elffuss-braid public

main · 3.3 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
15# The toolchain is pinned so that a new stable release, with new lints,
16# never breaks the build by surprise: bump it on purpose.
17jobs:
18 test:
19 name: test (${{ matrix.os }})
20 strategy:
21 fail-fast: false
22 matrix:
23 os: [ubuntu-latest, ubuntu-24.04-arm, macos-15]
24 runs-on: ${{ matrix.os }}
25 steps:
26 - uses: actions/checkout@v5
27 with:
28 # The git bridge round-trips this repository's own history, which a
29 # shallow checkout does not have.
30 fetch-depth: 0
31 - uses: dtolnay/rust-toolchain@1.99.0
32 with:
33 components: rustfmt, clippy
34 - uses: Swatinem/rust-cache@v2
35 - run: cargo fmt --all --check
36 - run: cargo clippy --workspace --all-targets --locked
37 # Doc comments are checked too: broken links, stray HTML.
38 - run: cargo doc --workspace --no-deps --all-features --locked
39 env:
40 RUSTDOCFLAGS: -D warnings
41 - run: cargo test --workspace --locked
42
43 msrv:
44 name: minimum Rust version
45 runs-on: ubuntu-latest
46 steps:
47 - uses: actions/checkout@v5
48 - uses: dtolnay/rust-toolchain@1.89
49 - uses: Swatinem/rust-cache@v2
50 - run: cargo check --workspace --all-targets --locked
51
52 wasm:
53 name: format and engine on WebAssembly
54 runs-on: ubuntu-latest
55 steps:
56 - uses: actions/checkout@v5
57 - uses: dtolnay/rust-toolchain@1.99.0
58 with:
59 targets: wasm32-unknown-unknown
60 - run: cargo check -p elffuss-braid-format -p elffuss-braid-engine --target wasm32-unknown-unknown --locked
61
62 deny:
63 name: licences and advisories
64 runs-on: ubuntu-latest
65 steps:
66 - uses: actions/checkout@v5
67 - uses: EmbarkStudios/cargo-deny-action@v2
68
69 bench:
70 name: benchmark smoke run
71 runs-on: ubuntu-latest
72 steps:
73 - uses: actions/checkout@v5
74 with:
75 # The quick import scenario reads this repository's own history.
76 fetch-depth: 0
77 - uses: dtolnay/rust-toolchain@1.99.0
78 - uses: Swatinem/rust-cache@v2
79 # Small inputs, only to keep the suite working: the ratios of a quick
80 # run mean nothing, and its results stay on the runner, unpublished.
81 - run: python3 bench/run.py --quick
82
83 privacy:
84 name: privacy check
85 runs-on: ubuntu-latest
86 steps:
87 - uses: actions/checkout@v5
88 with:
89 fetch-depth: 0
90 - run: scripts/privacy-check.sh
91
92 spec:
93 name: spec vectors (independent implementation)
94 runs-on: ubuntu-latest
95 steps:
96 - uses: actions/checkout@v5
97 - uses: dtolnay/rust-toolchain@1.99.0
98 - uses: Swatinem/rust-cache@v2
99 - run: cargo install b3sum --locked
100 - run: python3 docs/spec/check_vectors.py
101
102 fuzz:
103 name: fuzz smoke test
104 runs-on: ubuntu-latest
105 steps:
106 - uses: actions/checkout@v5
107 - uses: dtolnay/rust-toolchain@nightly
108 - uses: taiki-e/install-action@v2
109 with:
110 tool: cargo-fuzz
111 - name: run every target for one minute
112 working-directory: fuzz
113 run: |
114 for target in decode_tree decode_changeset names git_map git_objects; do
115 cargo fuzz run --target x86_64-unknown-linux-gnu "$target" -- -max_total_time=60
116 done