2026-02-02 19:24:57 +01:00
|
|
|
kind: pipeline
|
|
|
|
|
type: docker
|
2026-02-18 00:19:05 +01:00
|
|
|
name: build-and-test
|
2026-02-02 19:24:57 +01:00
|
|
|
|
|
|
|
|
when:
|
|
|
|
|
event: pull_request
|
2026-03-19 06:33:20 +00:00
|
|
|
path:
|
|
|
|
|
exclude:
|
|
|
|
|
- "formulas/**"
|
|
|
|
|
- "evidence/**"
|
|
|
|
|
- "docs/**"
|
|
|
|
|
- "*.md"
|
2026-02-02 19:24:57 +01:00
|
|
|
|
2026-02-22 16:07:07 +00:00
|
|
|
clone:
|
|
|
|
|
git:
|
|
|
|
|
image: woodpeckerci/plugin-git
|
|
|
|
|
settings:
|
|
|
|
|
depth: 50
|
2026-03-14 12:44:08 +00:00
|
|
|
reference: /git-mirrors/harb.git
|
2026-02-27 09:41:51 +00:00
|
|
|
netrc_machine: codeberg.org
|
|
|
|
|
netrc_username: johba
|
|
|
|
|
netrc_password:
|
2026-02-22 16:07:07 +00:00
|
|
|
from_secret: codeberg_token
|
|
|
|
|
|
2026-02-02 19:24:57 +01:00
|
|
|
steps:
|
|
|
|
|
- name: bootstrap-deps
|
2026-03-20 12:47:58 +00:00
|
|
|
depends_on: []
|
2026-02-02 19:24:57 +01:00
|
|
|
image: registry.niovi.voyage/harb/node-ci:latest
|
|
|
|
|
commands:
|
|
|
|
|
- |
|
2026-02-03 12:07:28 +01:00
|
|
|
bash -c '
|
2026-02-02 19:24:57 +01:00
|
|
|
set -euo pipefail
|
|
|
|
|
git submodule update --init --recursive
|
|
|
|
|
yarn --cwd onchain/lib/uni-v3-lib install --frozen-lockfile
|
|
|
|
|
'
|
|
|
|
|
|
|
|
|
|
- name: foundry-suite
|
2026-03-20 12:47:58 +00:00
|
|
|
depends_on: [bootstrap-deps]
|
2026-02-02 19:24:57 +01:00
|
|
|
image: registry.niovi.voyage/harb/node-ci:latest
|
|
|
|
|
commands:
|
|
|
|
|
- |
|
2026-02-03 12:07:28 +01:00
|
|
|
bash -c '
|
2026-02-02 19:24:57 +01:00
|
|
|
set -euo pipefail
|
|
|
|
|
cd onchain
|
|
|
|
|
export PATH=/root/.foundry/bin:$PATH
|
|
|
|
|
forge --version
|
|
|
|
|
forge build
|
|
|
|
|
forge test -vvv
|
|
|
|
|
forge snapshot
|
|
|
|
|
'
|
|
|
|
|
|
2026-02-18 00:19:05 +01:00
|
|
|
- name: contracts-local-fork
|
2026-03-20 13:27:04 +00:00
|
|
|
depends_on: [foundry-suite]
|
2026-02-18 00:19:05 +01:00
|
|
|
image: registry.niovi.voyage/harb/node-ci:latest
|
|
|
|
|
environment:
|
|
|
|
|
HARB_ENV: BASE_SEPOLIA_LOCAL_FORK
|
|
|
|
|
commands:
|
|
|
|
|
- |
|
|
|
|
|
bash -c '
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
cd onchain
|
|
|
|
|
export PATH=/root/.foundry/bin:$PATH
|
|
|
|
|
forge test -vv --ffi
|
|
|
|
|
'
|
|
|
|
|
|
|
|
|
|
# NOTE: contracts-base-sepolia step removed — requires base_sepolia_rpc secret
|
|
|
|
|
# which is not configured. Re-add when RPC secret is provisioned.
|
|
|
|
|
|
2026-03-18 13:11:33 +00:00
|
|
|
- name: transpiler-tests
|
2026-03-20 12:47:58 +00:00
|
|
|
depends_on: []
|
2026-03-18 13:11:33 +00:00
|
|
|
image: registry.niovi.voyage/harb/node-ci:latest
|
2026-03-20 03:29:45 +00:00
|
|
|
when:
|
|
|
|
|
- event: pull_request
|
|
|
|
|
path:
|
|
|
|
|
include:
|
|
|
|
|
- tools/push3-transpiler/**
|
2026-03-18 13:11:33 +00:00
|
|
|
commands:
|
|
|
|
|
- |
|
|
|
|
|
bash -c '
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
cd tools/push3-transpiler
|
|
|
|
|
npm install --silent
|
2026-03-18 23:06:49 +00:00
|
|
|
npm run build
|
2026-03-20 03:29:45 +00:00
|
|
|
npm test
|
2026-03-18 13:11:33 +00:00
|
|
|
'
|
|
|
|
|
|
2026-03-20 07:57:46 +00:00
|
|
|
- name: evolution-tests
|
2026-03-20 13:27:04 +00:00
|
|
|
depends_on: []
|
2026-03-20 07:57:46 +00:00
|
|
|
image: registry.niovi.voyage/harb/node-ci:latest
|
|
|
|
|
when:
|
|
|
|
|
- event: pull_request
|
|
|
|
|
path:
|
|
|
|
|
include:
|
|
|
|
|
- tools/push3-evolution/**
|
|
|
|
|
- tools/push3-transpiler/**
|
|
|
|
|
commands:
|
|
|
|
|
- |
|
|
|
|
|
bash -c '
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
cd tools/push3-transpiler
|
|
|
|
|
npm install --silent
|
|
|
|
|
cd ../push3-evolution
|
|
|
|
|
npm install --silent
|
|
|
|
|
npm run build
|
|
|
|
|
npm test
|
|
|
|
|
'
|
|
|
|
|
|
2026-03-21 20:47:52 +00:00
|
|
|
- name: seed-transpile-check
|
|
|
|
|
depends_on: [bootstrap-deps]
|
|
|
|
|
image: registry.niovi.voyage/harb/node-ci:latest
|
|
|
|
|
when:
|
|
|
|
|
- event: pull_request
|
|
|
|
|
path:
|
|
|
|
|
include:
|
|
|
|
|
- tools/push3-transpiler/**
|
|
|
|
|
- tools/push3-evolution/seeds/**
|
|
|
|
|
commands:
|
|
|
|
|
- |
|
|
|
|
|
bash -c '
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
cd tools/push3-transpiler
|
|
|
|
|
npm install --silent
|
|
|
|
|
cd ../..
|
|
|
|
|
export PATH=/root/.foundry/bin:$PATH
|
|
|
|
|
failed=0
|
|
|
|
|
for seed in tools/push3-evolution/seeds/*.push3; do
|
|
|
|
|
name=$(basename "$seed")
|
|
|
|
|
echo "--- Transpiling $name ---"
|
|
|
|
|
if ! npx tsx tools/push3-transpiler/src/index.ts "$seed" onchain/src/OptimizerV3Push3.sol; then
|
2026-03-22 21:36:05 +00:00
|
|
|
echo "WARN: $name failed to transpile (invalid program) — skipping" >&2
|
2026-03-21 20:47:52 +00:00
|
|
|
continue
|
|
|
|
|
fi
|
|
|
|
|
echo "--- Compiling $name ---"
|
2026-03-22 21:23:57 +00:00
|
|
|
if ! (cd onchain && forge build --skip test script --silent); then
|
2026-03-21 20:47:52 +00:00
|
|
|
echo "FAIL: $name transpiled but Solidity compilation failed" >&2
|
|
|
|
|
failed=1
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
git checkout onchain/src/OptimizerV3Push3.sol
|
|
|
|
|
if [ "$failed" -ne 0 ]; then
|
|
|
|
|
echo "ERROR: One or more seeds failed transpile+compile check" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
echo "All seeds transpile and compile successfully."
|
|
|
|
|
'
|
|
|
|
|
|
2026-02-28 10:51:59 +00:00
|
|
|
- name: single-package-manager
|
2026-03-20 12:47:58 +00:00
|
|
|
depends_on: []
|
2026-02-28 10:51:59 +00:00
|
|
|
image: registry.niovi.voyage/harb/node-ci:latest
|
|
|
|
|
commands:
|
|
|
|
|
- |
|
|
|
|
|
bash -c '
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
if [ -f kraiken-lib/yarn.lock ]; then
|
|
|
|
|
echo "ERROR: kraiken-lib/yarn.lock must not be committed. Use npm only (see packageManager field in kraiken-lib/package.json)." >&2
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
'
|
|
|
|
|
|
2026-03-18 13:28:13 +00:00
|
|
|
- name: validate-evolution-patch
|
2026-03-20 12:47:58 +00:00
|
|
|
depends_on: []
|
2026-03-18 13:28:13 +00:00
|
|
|
image: registry.niovi.voyage/harb/node-ci:latest
|
|
|
|
|
when:
|
|
|
|
|
- event: pull_request
|
|
|
|
|
path:
|
|
|
|
|
include:
|
|
|
|
|
- onchain/**
|
|
|
|
|
- tools/push3-evolution/**
|
|
|
|
|
commands:
|
|
|
|
|
- |
|
|
|
|
|
bash -c '
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
if ! git apply --check tools/push3-evolution/evolution.patch; then
|
|
|
|
|
echo "ERROR: evolution.patch needs regeneration — see tools/push3-evolution/evolution.conf" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
echo "evolution.patch applies cleanly."
|
|
|
|
|
'
|
|
|
|
|
|
2026-03-19 22:36:49 +00:00
|
|
|
- name: optimizer-not-mutated
|
2026-03-20 12:47:58 +00:00
|
|
|
depends_on: []
|
2026-03-19 22:36:49 +00:00
|
|
|
image: registry.niovi.voyage/harb/node-ci:latest
|
|
|
|
|
commands:
|
|
|
|
|
- |
|
|
|
|
|
bash -c '
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
if ! git diff --exit-code onchain/src/OptimizerV3.sol; then
|
|
|
|
|
echo "ERROR: onchain/src/OptimizerV3.sol has uncommitted mutations (likely left by batch-eval or inject.sh)." >&2
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
echo "OptimizerV3.sol is clean."
|
|
|
|
|
'
|
|
|
|
|
|
2026-02-02 19:24:57 +01:00
|
|
|
- name: node-quality
|
2026-03-20 13:27:04 +00:00
|
|
|
depends_on: [foundry-suite]
|
2026-02-02 19:24:57 +01:00
|
|
|
image: registry.niovi.voyage/harb/node-ci:latest
|
|
|
|
|
environment:
|
|
|
|
|
CI: "true"
|
2026-02-18 00:19:05 +01:00
|
|
|
NODE_OPTIONS: "--max-old-space-size=2048"
|
2026-02-02 19:24:57 +01:00
|
|
|
commands:
|
|
|
|
|
- |
|
2026-02-03 12:07:28 +01:00
|
|
|
bash -c '
|
2026-02-02 19:24:57 +01:00
|
|
|
set -euo pipefail
|
|
|
|
|
npm config set fund false
|
|
|
|
|
npm config set audit false
|
|
|
|
|
./scripts/build-kraiken-lib.sh
|
2026-02-19 20:18:27 +01:00
|
|
|
# Root install links workspace packages (@harb/web3) + all workspace members
|
|
|
|
|
npm install --no-audit --no-fund
|
|
|
|
|
# Landing (workspace member — deps already installed by root)
|
2026-02-02 19:24:57 +01:00
|
|
|
npm run lint --prefix landing
|
|
|
|
|
npm run build --prefix landing
|
2026-02-19 20:18:27 +01:00
|
|
|
# Web-app (workspace member)
|
2026-02-02 19:24:57 +01:00
|
|
|
npm run lint --prefix web-app
|
|
|
|
|
npm run test --prefix web-app -- --run
|
|
|
|
|
npm run build --prefix web-app
|
2026-02-19 20:18:27 +01:00
|
|
|
# Ponder (standalone — not a workspace member)
|
2026-02-02 19:24:57 +01:00
|
|
|
npm install --prefix services/ponder --no-audit --no-fund
|
|
|
|
|
npm run lint --prefix services/ponder
|
|
|
|
|
npm run build --prefix services/ponder
|
2026-02-19 20:18:27 +01:00
|
|
|
# TxnBot (standalone)
|
2026-02-02 19:24:57 +01:00
|
|
|
npm install --prefix services/txnBot --no-audit --no-fund
|
|
|
|
|
npm run lint --prefix services/txnBot
|
|
|
|
|
npm run test --prefix services/txnBot
|
|
|
|
|
npm run build --prefix services/txnBot
|
|
|
|
|
'
|