From 40f79354d615be286d3ba761b194f22928f57c79 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Mon, 26 Oct 2026 00:40:43 +0100 Subject: [PATCH] release: build the preparer and compile the exporters fresh in the exporters job The clean checkout removes target/, and vanilla-data.sh builds horizon-prepare only when it prepares afresh, so compile-exporters had no binary on a cached preparation. The bundle is also compiled in the job instead of reused from .local/exporters, which vanilla-data.sh links to preparations that pull requests' parity jobs write, and the job fails if anything but our classes and the manifest would leave the runner. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d20941d4..52eef26da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,9 +96,19 @@ jobs: shell: bash run: | set -euo pipefail + # target/ is gone after the clean checkout, and vanilla-data.sh builds the preparer only when it + # prepares afresh. + cargo build --release --locked -p horizon-prepare + # Compiled here, never taken from the runner's shared preparations: pull requests' parity jobs + # write those (vanilla-data.sh links .local/exporters to them). + rm -rf .local/exporters bundle=$(target/release/horizon-prepare compile-exporters --root "$PWD" | tail -1) mkdir -p exporters cp -R "$bundle/server" "$bundle/client" "$bundle/manifest.json" exporters/ + # Only our classes and their manifest leave this runner. + stray=$(find exporters -type f ! -path exporters/manifest.json \ + ! \( -name '*.class' \( -path 'exporters/server/dev/horizonlab/parity/*' -o -path 'exporters/client/dev/horizonlab/parity/*' \) \)) + [ -z "$stray" ] || { echo "::error::not one of our classes: $stray"; exit 1; } python3 tools/check_prepare_exporters.py --binary target/release/horizon-prepare - uses: actions/upload-artifact@v4 with: