Repository navigation
97 lines (93 loc) · 2.78 KB
/
Copy pathci.yml
File metadata and controls
97 lines (93 loc) · 2.78 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Cargo Build & Test
on:
push:
branches:
- main
- dev
tags:
- v[0-9]+.*
pull_request:
branches:
- main
- dev
- gc-v2
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# Timing and protocol safety must both hold; every TLC violation fails CI.
tla-plus:
name: TLA+ Formal Verification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- name: Download TLA+ tools
run: make tla-setup
- name: Check transaction graph timing and safety invariants
run: make tla
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions-rs/toolchain@v1
timeout-minutes: 30
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
# node and GOATNetwork/bitvm-gc must pin the same BitVM/BitVM rev,
# or Cargo builds two copies of bitvm without complaint.
- name: Single bitvm in Cargo.lock
run: test "$(grep -c '^name = "bitvm"$' Cargo.lock)" = 1
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
# Keep Ziren's generated FFI layouts on the tested LLVM 18 environment.
runs-on: ubuntu-24.04
env:
LIBCLANG_PATH: /usr/lib/llvm-18/lib
steps:
- uses: actions/checkout@v5
- uses: actions-rs/toolchain@v1
timeout-minutes: 30
with:
profile: minimal
toolchain: nightly-2026-09-17
override: true
components: clippy
- name: Install Ziren toolchain
uses: ./.github/actions/install-ziren
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libclang-18-dev
- run: |
source ~/.zkm-toolchain/env
cargo clippy --all-targets --features rpc-debug-endpoints -- -D warnings
test:
name: Cargo Test
runs-on: ubuntu-24.04
env:
LIBCLANG_PATH: /usr/lib/llvm-18/lib
steps:
- uses: actions/checkout@v5
- name: Install Ziren toolchain
uses: ./.github/actions/install-ziren
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libclang-18-dev
- name: Launch the Regtest
run: cd scripts && docker compose up -d
- name: Run all unit tests
run: |
set -e
source ~/.zkm-toolchain/env
cargo test -r --all --all-targets --features rpc-debug-endpoints