fix: No CI check that Push3 seeds transpile successfully before merge (#697)

Add seed-transpile-check CI step that loops over every *.push3 file in
tools/push3-evolution/seeds/, transpiles it via the Push3 transpiler,
and verifies the generated Solidity compiles with forge build. Fails
the build if any seed fails transpilation or compilation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
johba 2026-03-21 20:47:52 +00:00
parent 7fd1963480
commit 3508ec5f42

View file

@ -105,6 +105,46 @@ steps:
npm test npm test
' '
- 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
echo "FAIL: $name failed to transpile" >&2
failed=1
continue
fi
echo "--- Compiling $name ---"
if ! (cd onchain && forge build --silent); then
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."
'
- name: single-package-manager - name: single-package-manager
depends_on: [] depends_on: []
image: registry.niovi.voyage/harb/node-ci:latest image: registry.niovi.voyage/harb/node-ci:latest