Repository navigation
232 lines (232 loc) · 10.4 KB
/
Copy pathci.yml
File metadata and controls
232 lines (232 loc) · 10.4 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
msrv:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@1.78.0
- run: cargo build --release --locked --workspace
test:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-node@v7
with:
node-version: '24'
- name: build
run: cargo build --release --workspace
- name: test
run: cargo test --release --workspace
- name: demo pipeline (probbit demo | probbit decide)
shell: bash
run: |
cargo run --release -p probbit-cli -- demo --tasks 12 | cargo run --release -p probbit-cli -- decide --pretty
cargo run --release -p probbit-cli -- demo --tasks 300 | cargo run --release -p probbit-cli -- decide --budget-ms 300
- name: processor spec sheet (probbit stats)
run: cargo run --release -p probbit-cli -- stats --pretty
- name: agent_router example
run: cargo run --release --example agent_router
- name: Python and MCP integration contracts
shell: bash
run: |
B="$PWD/target/release/probbit"
if [ "$RUNNER_OS" = Windows ]; then B="$(cygpath -w "$B.exe")"; fi
export PROBBIT_BIN="$B"
python -m unittest discover -s python -p 'test_*.py'
node examples/node/decide.mjs
node --test examples/node/stance-host.test.mjs
- name: npm platform and process contracts
run: node --test npm/test-wrapper.cjs
- name: clean-prefix install and npm package contracts
shell: bash
run: |
set -euo pipefail
TARGET=$(rustc -vV | sed -n 's/^host: //p')
TAG=v$(node -p "require('./npm/package.json').version")
BIN=target/release/probbit
[ "$RUNNER_OS" = Windows ] && BIN="$BIN.exe"
if [ "$RUNNER_OS" != Windows ]; then
python3 scripts/tests/test_install_contract.py
sh scripts/bench/test_install_sh.sh "$BIN" "$TARGET" "$TAG"
else
sh scripts/bench/package_like_release.sh "$BIN" "$TARGET" "$TAG" "target/install-fixture/good/$TAG"
cp -R target/install-fixture/good target/install-fixture/bad
printf '%064d %s\n' 0 "probbit-$TAG-$TARGET.zip" > "target/install-fixture/bad/$TAG/probbit-$TAG-$TARGET.zip.sha256"
for PS in pwsh powershell; do
"$PS" -NoProfile -ExecutionPolicy Bypass -File scripts/bench/test_install_ps1.ps1 -Srv target/install-fixture -Tag "$TAG"
done
fi
sh scripts/bench/test_npm.sh "$BIN" "$TARGET" "$TAG"
- name: npm 12 clean-prefix contracts
if: runner.os == 'Linux'
shell: bash
run: |
npm install -g npm@12
sh scripts/bench/test_npm.sh target/release/probbit x86_64-unknown-linux-gnu
npm-node18:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '18'
- run: node --test npm/test-wrapper.cjs
openclaw-plugin:
# plugins/openclaw (the probbit-stance OpenClaw plugin): tsc against the bundled SDK type slice, then its node:test suite
# (mocked host, the real probbit built from this commit). The real-host type check (npm run test:host) needs an installed
# OpenClaw and runs on the author's machine.
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-node@v7
with:
node-version: '22'
- name: build probbit
run: cargo build --release --locked -p probbit-cli
- name: build and test the plugin
shell: bash
working-directory: plugins/openclaw
run: |
npm ci
PROBBIT_BIN="$GITHUB_WORKSPACE/target/release/probbit" npm test
npm pack --dry-run
agentdojo-tables:
# The AgentDojo numbers (BENCHMARKS.md §14) recomputed on a machine that is not the author's: experiments/rerun.sh runs
# the judge twice over the logged episodes and the 726 arm-A strands (verified by the probbit built from this commit), and
# the committed tables must come out byte-identical (each script prints MATCH or DIFFERS per table and exits non-zero on
# DIFFERS; E3's rerun as well). No API calls. REPRODUCE.md names this job as the standing reproduction.
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: build
run: cargo build --release --locked -p probbit-cli
- name: recompute every table twice; the committed ones must not change
shell: bash
working-directory: bench/agentdojo
run: |
python -m pip install --quiet numpy==1.26.4
tar xzf tables/strands-A.tar.gz
PROBBIT="$GITHUB_WORKSPACE/target/release/probbit" experiments/rerun.sh python
(cd e3 && experiments/rerun_e3.sh python)
git diff --exit-code -- tables/results.tsv tables/bars.tsv tables/strands-verify.tsv e3/tables/results-e3.tsv e3/tables/bars-e3.tsv
shasum -a 256 tables/results.tsv tables/bars.tsv tables/strands-verify.tsv
wasm:
timeout-minutes: 15
# probbit-wasm, the browser build (wasm32-unknown-unknown, no threads): built as playground/build.sh builds it, then loaded by
# Node with the playground's own loader and run on the 300-task demo (--sweeps 3200) and the evaluate example; check.mjs
# exits 1 unless both answer with 0 violations. The no-thread = 4-thread equality runs natively in `test` (probbit-wasm tests).
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '24'
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: build
run: sh playground/build.sh
- name: run under Node
run: node --version && node playground/check.mjs playground/probbit.wasm
- name: WASM integer boundaries and native parity
run: |
cargo build --release -p probbit-cli
node probbit-wasm/tests/boundaries.mjs playground/probbit.wasm target/release/probbit
- name: real browser interaction and narrow layout
run: node playground/check-browser.mjs target/browser-check
- name: real monitor playback and live append in the browser
env:
PROBBIT_BIN: ${{ github.workspace }}/target/release/probbit
PROBBIT_BROWSER_OUT: ${{ github.workspace }}/target/browser-check/monitor
run: node probbit-cli/tests/monitor_browser.mjs
- uses: actions/upload-artifact@v7
if: always()
with:
name: browser-check
path: target/browser-check/
macos-app:
# apps/macos/ProbbitMonitor, the monitor as a Mac app: its build.sh (the one release.yml runs) builds the Swift shell
# around the probbit built from this commit and signs the bundle ad-hoc with the hardened runtime (what a Developer ID
# signature in release.yml adds, so a runtime violation shows here first), then smoke.sh launches it: the bundled engine
# must serve the page on 127.0.0.1 only, and quitting the app (SIGTERM, and SIGKILL for the crash case) must leave no
# engine process. No upload.
runs-on: macos-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- name: build probbit
run: cargo build --release --locked -p probbit-cli
- name: build the app
run: apps/macos/ProbbitMonitor/build.sh --binary target/release/probbit --identity - # ad-hoc, with the hardened runtime
- name: launch it, quit it
run: |
APP="apps/macos/ProbbitMonitor/dist/probbit Monitor.app"
apps/macos/ProbbitMonitor/smoke.sh "$APP" --quit term -- --demo week
apps/macos/ProbbitMonitor/smoke.sh "$APP" --quit kill9 -- --demo week
release-targets:
# The release archives' targets that `test` does not build (release.yml runs only on tags): built here, so a tag is
# never the first build of a target. Static musl (x86_64 runs here, aarch64 is cross-linked), macOS x86_64 under
# Rosetta 2, Windows with the C runtime linked in.
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, target: x86_64-unknown-linux-musl, run: true }
- { os: ubuntu-latest, target: aarch64-unknown-linux-musl, linker: aarch64-linux-gnu-gcc }
- { os: ubuntu-24.04-arm, target: aarch64-unknown-linux-musl, linker: aarch64-linux-gnu-gcc, run: true }
- { os: macos-latest, target: x86_64-apple-darwin, run: true, rosetta: true }
- { os: windows-latest, target: x86_64-pc-windows-msvc, run: true, rustflags: "-C target-feature=+crt-static" }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: cross linker
if: ${{ matrix.linker }}
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
- name: build
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc
RUSTFLAGS: ${{ matrix.rustflags }}
run: cargo build --release --locked -p probbit-cli --target ${{ matrix.target }}
- name: smoke test and what it links
if: ${{ matrix.run }}
shell: bash
run: |
BIN="target/${{ matrix.target }}/release/probbit"
[ "${{ runner.os }}" = "Windows" ] && BIN="$BIN.exe"
RUN=""; [ "${{ matrix.rosetta }}" = "true" ] && RUN="arch -x86_64"
$RUN "$BIN" version
$RUN "$BIN" demo --tasks 12 | $RUN "$BIN" decide > /dev/null
file "$BIN" || true
if [ "${{ runner.os }}" = "Windows" ]; then objdump -p "$BIN" | grep -i "dll name" || true; fi