-
Notifications
You must be signed in to change notification settings - Fork 109
46 lines (40 loc) · 1.19 KB
/
Copy pathverify.yml
File metadata and controls
46 lines (40 loc) · 1.19 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
name: Formal Verification
on:
push:
branches: [master, main]
paths:
- '**.rs'
- '**.wasm'
- 'Cargo.toml'
- 'Cargo.lock'
pull_request:
paths:
- '**.rs'
- '**.wasm'
- 'Cargo.toml'
- 'Cargo.lock'
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libudev-dev
- name: Build starforge
run: cargo build --locked
- name: Run formal verification (if WASM artifact exists)
run: |
WASM="target/wasm32-unknown-unknown/release/contract.wasm"
if [ -f "$WASM" ]; then
cargo run -- verify run \
--wasm "$WASM" \
--contract my-contract \
--network testnet \
--fail-on-critical true
cargo run -- verify report --contract my-contract
else
echo "No WASM artifact found — skipping on-chain verification run"
cargo run -- verify ci --platform github --contract my-contract
fi