From 01351aab377b543c90ccb444ba233a1805eef4f1 Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Tue, 9 Jun 2026 14:33:19 +0000 Subject: [PATCH] .github/workflows/release.yml: build KEVM once and populate both nix caches from it Merge the 'Populate Nix Cache' and 'Populate Nix Binary Cache' release jobs into a single 'nix-cache' job that builds KEVM once per architecture and pushes the resulting store paths to both the public k-framework cache and the private k-framework-binary cache. Previously each cache had its own job, so KEVM was built twice per architecture (four builds total), doubling release-time build pressure. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/release.yml | 39 ++--------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3981468cac..4dbd05a430 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: echo "version=${VERSION}" >> "$GITHUB_OUTPUT" nix-cache: - name: 'Populate Nix Cache' + name: 'Populate Nix Caches' strategy: matrix: include: @@ -59,41 +59,6 @@ jobs: kevm=$(nix build --extra-experimental-features 'nix-command flakes' .#kevm --json | jq -r '.[].outputs | to_entries[].value') drv=$(nix-store --query --deriver ${kevm}) nix-store --query --requisites --include-outputs ${drv} | cachix push k-framework || true - - name: 'On failure, delete drafted release' - if: failure() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - set -x - VERSION=v$(cat package/version) - gh release delete ${VERSION} \ - --repo runtimeverification/evm-semantics \ - --yes \ - --cleanup-tag - - name: 'Post failure to channel' - if: failure() - uses: slackapi/slack-github-action@v1.24.0 - with: - channel-id: "#kevm-notifications" - slack-message: "Failed to create KEVM release: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} - - nix-binary-cache: - name: 'Populate Nix Binary Cache' - strategy: - matrix: - include: - - runner: normal - - runner: ARM64 - runs-on: ${{ matrix.runner }} - needs: draft-release - steps: - - name: 'Check out code' - uses: actions/checkout@v4 - with: - ref: ${{ github.event.push.head.sha }} - fetch-depth: 0 - name: 'Publish KEVM to k-framework-binary cache' uses: workflow/nix-shell-action@v3.0.3 env: @@ -131,7 +96,7 @@ jobs: make-release: name: 'Cut Release' runs-on: ubuntu-latest - needs: [draft-release, nix-cache, nix-binary-cache] + needs: [draft-release, nix-cache] steps: - name: 'Check out code' uses: actions/checkout@v4