Repository navigation
75 lines (66 loc) · 2.26 KB
/
Copy pathci.yml
File metadata and controls
75 lines (66 loc) · 2.26 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
test:
name: test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v7
- uses: Swatinem/rust-cache@v2
- run: cargo fmt -- --check
- run: cargo clippy --all-targets --all-features --locked
- run: cargo test --locked --all-features
env:
PROPTEST_CASES: "2000"
no-std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: Swatinem/rust-cache@v2
- run: cargo build --locked --no-default-features --target wasm32v1-none
wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: Swatinem/rust-cache@v2
- run: cargo build --release --locked -p setoff-engine-wasm --target wasm32-unknown-unknown
- name: The reference vectors, through WebAssembly in Node
run: |
version=$(cargo metadata --format-version 1 --locked | jq -r '.packages[] | select(.name == "wasm-bindgen") | .version')
cargo install wasm-bindgen-cli --version "$version" --locked
wasm-bindgen --target nodejs --out-dir bindings/wasm/pkg-node target/wasm32-unknown-unknown/release/setoff_engine_wasm.wasm
node --test bindings/wasm/test/vectors.mjs
deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: EmbarkStudios/cargo-deny-action@v2
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
# The toolchain goes in the input, not the tag, so Dependabot never "upgrades" the MSRV.
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.88"
- run: rm rust-toolchain.toml
- run: cargo +1.88 check --locked
hygiene:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: No stray working files
run: |
bad=$(git ls-files | grep -Ei '(^|/)(ISSUE_[0-9]+.*|.*_SUMMARY\.md|IMPLEMENTATION_.*|PR\.md|pr_body\.md|.*\.bak|.*\.orig)$' || true)
if [ -n "$bad" ]; then echo "Remove these files from the PR:"; echo "$bad"; exit 1; fi