-
Notifications
You must be signed in to change notification settings - Fork 4
fix: resolve post-merge bugs from #1716 and #1717 #1718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 13 commits
6f98a22
3038bd5
a0d0314
f00f224
62c2b50
6f811fa
9c09adf
33cd17e
0b64991
0329889
8016a30
9090632
2fce62f
6b268fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -755,6 +755,27 @@ jobs: | |
| --module Contracts.LocalObligationMacroSmoke.LocalObligationMacroSmoke \ | ||
| --output compiler/yul >/dev/null | ||
|
|
||
| - name: Pre-build smoke test Yul artifacts (unpatched) | ||
| run: | | ||
| set -euo pipefail | ||
| smoke_modules=( | ||
| Contracts.BytesEqSmoke | ||
| Contracts.Smoke.LowLevelTryCatchSmoke | ||
| Contracts.StringArrayErrorSmoke | ||
| Contracts.StringArrayEventSmoke | ||
| Contracts.StringEqSmoke | ||
| Contracts.StringErrorSmokeContract | ||
| Contracts.StringEventSmoke | ||
| Contracts.StringSmoke | ||
| ) | ||
| lake build "${smoke_modules[@]}" >/dev/null | ||
| mkdir -p compiler/yul-smoke | ||
| for module in "${smoke_modules[@]}"; do | ||
| ./compiler/bin/verity-compiler \ | ||
| --module "$module" \ | ||
| --output compiler/yul-smoke >/dev/null | ||
| done | ||
|
|
||
| - name: Generate patched Yul + patch coverage report | ||
| run: | | ||
| ./compiler/bin/verity-compiler-patched \ | ||
|
|
@@ -772,12 +793,32 @@ jobs: | |
| if [ -f "${artifact}" ]; then | ||
| exit 0 | ||
| fi | ||
| lake build Contracts.LocalObligationMacroSmoke.LocalObligationMacroSmoke >/dev/null | ||
| ./compiler/bin/verity-compiler-patched \ | ||
| --module Contracts.LocalObligationMacroSmoke.LocalObligationMacroSmoke \ | ||
| --output compiler/yul-patched \ | ||
| --enable-patches >/dev/null | ||
|
|
||
| - name: Pre-build patched smoke test Yul artifacts for foundry-patched | ||
| run: | | ||
| set -euo pipefail | ||
| smoke_modules=( | ||
| Contracts.BytesEqSmoke | ||
| Contracts.Smoke.LowLevelTryCatchSmoke | ||
| Contracts.StringArrayErrorSmoke | ||
| Contracts.StringArrayEventSmoke | ||
| Contracts.StringEqSmoke | ||
| Contracts.StringErrorSmokeContract | ||
| Contracts.StringEventSmoke | ||
| Contracts.StringSmoke | ||
| ) | ||
| mkdir -p compiler/yul-patched-smoke | ||
| for module in "${smoke_modules[@]}"; do | ||
| ./compiler/bin/verity-compiler-patched \ | ||
| --module "$module" \ | ||
| --output compiler/yul-patched-smoke \ | ||
| --enable-patches >/dev/null | ||
| done | ||
|
|
||
| - name: Save static gas report snapshot | ||
| run: lake exe gas-report --manifest packages/verity-examples/contracts.manifest > gas-report-static.tsv | ||
|
|
||
|
|
@@ -825,6 +866,20 @@ jobs: | |
| --name generated-yul-patched \ | ||
| --path compiler/yul-patched | ||
|
|
||
| - name: Publish smoke Yul locally | ||
| run: | | ||
| scripts/ci_local_persistence.sh publish \ | ||
| --run-id "${{ github.run_id }}" \ | ||
| --name generated-yul-smoke \ | ||
| --path compiler/yul-smoke | ||
|
|
||
| - name: Publish patched smoke Yul locally | ||
| run: | | ||
| scripts/ci_local_persistence.sh publish \ | ||
| --run-id "${{ github.run_id }}" \ | ||
| --name generated-yul-patched-smoke \ | ||
| --path compiler/yul-patched-smoke | ||
|
|
||
| - name: Publish gas reports locally | ||
| run: | | ||
| staging="${RUNNER_TEMP}/gas-reports-${{ github.run_id }}" | ||
|
|
@@ -838,50 +893,72 @@ jobs: | |
| --path "$staging" | ||
|
|
||
| - name: Upload difftest interpreter | ||
| if: '!cancelled()' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: difftest-interpreter | ||
| path: .lake/build/bin/difftest-interpreter | ||
|
|
||
| - name: Upload compiler binaries | ||
| if: '!cancelled()' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: verity-compiler-binaries | ||
| path: compiler/bin | ||
| compression-level: 0 | ||
|
|
||
| - name: Upload compiler workspace build | ||
| if: '!cancelled()' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: lean-workspace-compiler-build | ||
| path: lean-workspace-compiler-build.tar | ||
| compression-level: 0 | ||
|
|
||
| - name: Upload generated Yul | ||
| if: '!cancelled()' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: generated-yul | ||
| path: compiler/yul | ||
|
|
||
| - name: Upload patched Yul | ||
| if: '!cancelled()' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: generated-yul-patched | ||
| path: compiler/yul-patched | ||
|
|
||
| - name: Upload smoke Yul | ||
| if: '!cancelled()' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: generated-yul-smoke | ||
| path: compiler/yul-smoke | ||
|
|
||
| - name: Upload patched smoke Yul | ||
| if: '!cancelled()' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: generated-yul-patched-smoke | ||
| path: compiler/yul-patched-smoke | ||
|
|
||
| - name: Upload patch coverage report | ||
| if: '!cancelled()' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: patch-coverage-report | ||
| path: compiler/patch-report.tsv | ||
|
|
||
| - name: Upload static gas report | ||
| if: '!cancelled()' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: static-gas-report | ||
| path: gas-report-static.tsv | ||
|
|
||
| - name: Upload patched static gas report | ||
| if: '!cancelled()' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: static-gas-report-patched | ||
|
|
@@ -1149,11 +1226,38 @@ jobs: | |
| with: | ||
| name: static-gas-report | ||
|
|
||
| - name: Verify Lake package integrity | ||
| run: | | ||
| shopt -s nullglob | ||
| for pkg_git in .lake/packages/*/.git; do | ||
| pkg="$(dirname "$pkg_git")" | ||
| if ! git -C "$pkg" rev-parse HEAD >/dev/null 2>&1; then | ||
| echo "::warning::Removing corrupted Lake package: $pkg" | ||
| rm -rf "$pkg" | ||
| fi | ||
| done | ||
|
|
||
| - name: Setup Foundry environment | ||
| uses: ./.github/actions/setup-foundry | ||
| with: | ||
| local-artifact-run-id: ${{ github.run_id }} | ||
|
|
||
| - name: Verify solc can compile Yul artifacts | ||
| run: | | ||
| echo "solc path: $(which solc)" | ||
| echo "solc version: $(solc --version 2>&1 | grep -i version)" | ||
| for yul in compiler/yul/*.yul; do | ||
| hex=$(solc --strict-assembly --bin "$yul" 2>/dev/null | grep -E '^[0-9a-fA-F]+$' | tail -n 1) | ||
| if [ -z "$hex" ]; then | ||
| echo "FAIL: solc produced no hex for $yul" | ||
| echo "--- solc stderr ---" | ||
| solc --strict-assembly --bin "$yul" 2>&1 || true | ||
| echo "---" | ||
| exit 1 | ||
| fi | ||
| echo "OK: $yul (${#hex} hex chars)" | ||
| done | ||
|
|
||
| - name: Check static-vs-foundry gas calibration | ||
| env: | ||
| FOUNDRY_PROFILE: difftest | ||
|
|
@@ -1188,6 +1292,37 @@ jobs: | |
| - name: Restore compiler executable bits | ||
| run: chmod +x compiler/bin/verity-compiler compiler/bin/verity-compiler-patched compiler/bin/difftest-interpreter | ||
|
|
||
| - name: Restore smoke Yul (local) | ||
| id: local-restore-yul-smoke | ||
| continue-on-error: true | ||
| run: | | ||
| source_dir="${VERIFY_LOCAL_ARTIFACT_ROOT}/${{ github.run_id }}/generated-yul-smoke" | ||
| if [ -f "$source_dir/.ready" ]; then | ||
| mkdir -p compiler/yul-smoke | ||
| cp -a "$source_dir/." compiler/yul-smoke/ | ||
| rm -f compiler/yul-smoke/.ready | ||
| else | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Download smoke Yul (fallback) | ||
| if: steps.local-restore-yul-smoke.outcome != 'success' | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| name: generated-yul-smoke | ||
| path: compiler/yul-smoke | ||
|
Comment on lines
+1316
to
+1320
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In Useful? React with 👍 / 👎. |
||
|
|
||
| - name: Verify Lake package integrity | ||
| run: | | ||
| shopt -s nullglob | ||
| for pkg_git in .lake/packages/*/.git; do | ||
| pkg="$(dirname "$pkg_git")" | ||
| if ! git -C "$pkg" rev-parse HEAD >/dev/null 2>&1; then | ||
| echo "::warning::Removing corrupted Lake package: $pkg" | ||
| rm -rf "$pkg" | ||
| fi | ||
| done | ||
|
|
||
| - name: Setup Foundry environment | ||
| uses: ./.github/actions/setup-foundry | ||
| with: | ||
|
|
@@ -1232,6 +1367,37 @@ jobs: | |
| - name: Restore compiler workspace build | ||
| run: tar -xf lean-workspace-compiler-build.tar | ||
|
|
||
| - name: Restore patched smoke Yul (local) | ||
| id: local-restore-yul-patched-smoke | ||
| continue-on-error: true | ||
| run: | | ||
| source_dir="${VERIFY_LOCAL_ARTIFACT_ROOT}/${{ github.run_id }}/generated-yul-patched-smoke" | ||
| if [ -f "$source_dir/.ready" ]; then | ||
| mkdir -p compiler/yul-patched-smoke | ||
| cp -a "$source_dir/." compiler/yul-patched-smoke/ | ||
| rm -f compiler/yul-patched-smoke/.ready | ||
| else | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Download patched smoke Yul (fallback) | ||
| if: steps.local-restore-yul-patched-smoke.outcome != 'success' | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| name: generated-yul-patched-smoke | ||
| path: compiler/yul-patched-smoke | ||
|
|
||
| - name: Verify Lake package integrity | ||
| run: | | ||
| shopt -s nullglob | ||
| for pkg_git in .lake/packages/*/.git; do | ||
| pkg="$(dirname "$pkg_git")" | ||
| if ! git -C "$pkg" rev-parse HEAD >/dev/null 2>&1; then | ||
| echo "::warning::Removing corrupted Lake package: $pkg" | ||
| rm -rf "$pkg" | ||
| fi | ||
| done | ||
|
|
||
| - name: Setup Foundry environment | ||
| uses: ./.github/actions/setup-foundry | ||
| with: | ||
|
|
@@ -1276,6 +1442,37 @@ jobs: | |
| - name: Restore compiler executable bits | ||
| run: chmod +x compiler/bin/verity-compiler compiler/bin/verity-compiler-patched compiler/bin/difftest-interpreter | ||
|
|
||
| - name: Restore smoke Yul (local) | ||
| id: local-restore-yul-smoke | ||
| continue-on-error: true | ||
| run: | | ||
| source_dir="${VERIFY_LOCAL_ARTIFACT_ROOT}/${{ github.run_id }}/generated-yul-smoke" | ||
| if [ -f "$source_dir/.ready" ]; then | ||
| mkdir -p compiler/yul-smoke | ||
| cp -a "$source_dir/." compiler/yul-smoke/ | ||
| rm -f compiler/yul-smoke/.ready | ||
| else | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Download smoke Yul (fallback) | ||
| if: steps.local-restore-yul-smoke.outcome != 'success' | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| name: generated-yul-smoke | ||
| path: compiler/yul-smoke | ||
|
|
||
| - name: Verify Lake package integrity | ||
| run: | | ||
| shopt -s nullglob | ||
| for pkg_git in .lake/packages/*/.git; do | ||
| pkg="$(dirname "$pkg_git")" | ||
| if ! git -C "$pkg" rev-parse HEAD >/dev/null 2>&1; then | ||
| echo "::warning::Removing corrupted Lake package: $pkg" | ||
| rm -rf "$pkg" | ||
| fi | ||
| done | ||
|
|
||
| - name: Setup Foundry environment | ||
| uses: ./.github/actions/setup-foundry | ||
| with: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This restore block treats a
.readymarker as success without verifying that any*.yulfiles were actually copied, so a partially published or corrupted local artifact can skip the fallback download and leavecompiler/yul-smokeempty. In that state, smoke tests still select this directory (it exists) and then fall back to recompiling modules during test execution, which can make CI flaky or fail on runners wherelake/Lean build state is unavailable. The same missing validation pattern appears in the other smoke restore blocks (generated-yul-patched-smokeand the multi-seed job).Useful? React with 👍 / 👎.