-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (73 loc) · 3.04 KB
/
Copy pathci.yml
File metadata and controls
80 lines (73 loc) · 3.04 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
76
77
78
79
80
name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
sdk-relay:
name: SDK + relay (build & test)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
# Version is inferred from the root package.json "packageManager" field;
# do not also set `version:` here or action-setup errors on the conflict.
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm -r build
- run: pnpm -r test
hook:
name: xah-did hook (wasm32 compile)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Install clang + lld
run: sudo apt-get update && sudo apt-get install -y clang lld
- run: bash hooks/xah-did/build.sh
- name: Verify wasm artifact
run: test -f hooks/xah-did/did_hook.wasm
programs:
name: Anchor programs (cargo check)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
workspaces: ". -> target"
- run: cargo check --workspace
- run: cargo test -p poi-subscription
zk-circuits:
name: ZK circuits (manifest validation)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
# sp1-sdk 3.4.0 is incompatible with every current stable Rust toolchain:
# Rust <1.82: E0283 type-inference errors in sp1-core-machine
# Rust <1.85: transitive dep cpufeatures 0.3.0 requires edition2024
# Full compilation requires a pinned Cargo.lock generated with the sp1
# custom toolchain. Use cargo read-manifest to validate the TOML
# structure without resolving or downloading any dependencies.
- name: Validate workspace manifests
run: |
# packages/zk-circuits/Cargo.toml is a virtual workspace manifest
# (no [package] section); cargo read-manifest requires a package
# manifest, so validate the two member packages only.
cargo read-manifest --manifest-path packages/zk-circuits/program/Cargo.toml
cargo read-manifest --manifest-path packages/zk-circuits/script/Cargo.toml
circuits:
name: ZK provenance reference (JS)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- run: cd circuits && npm install
- run: cd circuits && npm test