Repository navigation
114 lines (110 loc) · 3.5 KB
/
Copy pathci.yml
File metadata and controls
114 lines (110 loc) · 3.5 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
ZKM_TOOLCHAIN_VERSION: '20260917'
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
- 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
run: |
set -euo pipefail
installer="$RUNNER_TEMP/zkmup"
curl --proto '=https' --tlsv1.2 -fsSL --retry 3 \
https://raw.githubusercontent.com/ProjectZKM/toolchain/582f7927cac0668883a86cbd02fbc18b500b1b6f/zkmup \
-o "$installer"
sh "$installer" install -v "$ZKM_TOOLCHAIN_VERSION"
SHELL=/bin/true sh "$installer" setup -v "$ZKM_TOOLCHAIN_VERSION"
source "$HOME/.zkm-toolchain/env"
rustc --version
cargo --version
- 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
run: |
set -euo pipefail
installer="$RUNNER_TEMP/zkmup"
curl --proto '=https' --tlsv1.2 -fsSL --retry 3 \
https://raw.githubusercontent.com/ProjectZKM/toolchain/582f7927cac0668883a86cbd02fbc18b500b1b6f/zkmup \
-o "$installer"
sh "$installer" install -v "$ZKM_TOOLCHAIN_VERSION"
SHELL=/bin/true sh "$installer" setup -v "$ZKM_TOOLCHAIN_VERSION"
source "$HOME/.zkm-toolchain/env"
rustc --version
cargo --version
- 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