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:
parent
7fd1963480
commit
3508ec5f42
1 changed files with 40 additions and 0 deletions
|
|
@ -105,6 +105,46 @@ steps:
|
|||
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
|
||||
depends_on: []
|
||||
image: registry.niovi.voyage/harb/node-ci:latest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue