From ba719b1209ccd0e7f8670e3ef0cdab766b176e41 Mon Sep 17 00:00:00 2001 From: Sergei Blinov Date: Mon, 23 Mar 2026 00:30:11 +0100 Subject: [PATCH 1/6] cache verda build artifacts between ci runs --- .github/workflows/pr.yaml | 9 +++++++++ build.sh | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index aebeae4..c63bab9 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -99,9 +99,18 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Restore verda cache + uses: actions/cache@v4 + with: + path: .verda-cache + key: verda-${{ hashFiles('VERSION') }}-${{ hashFiles('private-build-plans.toml') }} + restore-keys: | + verda-${{ hashFiles('VERSION') }}- + - name: Build font env: IMAGE_REF: ${{ needs.build-image.outputs.image-ref }} + VERDA_CACHE: .verda-cache run: ./build.sh - uses: actions/upload-artifact@v4 diff --git a/build.sh b/build.sh index 8dc5338..66302eb 100755 --- a/build.sh +++ b/build.sh @@ -10,6 +10,7 @@ BUILD_PLAN=${BUILD_PLAN:-private-build-plans.toml} OUTPUT_DIR=$(pwd)/_output IMAGE=${IMAGE:-ghcr.io/awnion/custom-iosevka-nerd-font} IMAGE_REF=${IMAGE_REF:-} +VERDA_CACHE=${VERDA_CACHE:-} rm -rf "$OUTPUT_DIR" mkdir -p "$OUTPUT_DIR" @@ -34,9 +35,18 @@ fi echo "Building font '$FONT_NAME' using plan '$BUILD_PLAN' ..." +CACHE_MOUNT=() +if [ -n "$VERDA_CACHE" ]; then + mkdir -p "$VERDA_CACHE" + VERDA_CACHE=$(cd "$VERDA_CACHE" && pwd) + echo "Using verda cache: $VERDA_CACHE" + CACHE_MOUNT=(-v "$VERDA_CACHE":${BUILD_DIR}/iosevka/.build) +fi + docker run --rm -t \ -v "$OUTPUT_DIR":/output \ -v "$(pwd)/$BUILD_PLAN":${BUILD_DIR}/iosevka/private-build-plans.toml:ro \ + "${CACHE_MOUNT[@]}" \ "$IMAGE_REF" -c "\ cd ${BUILD_DIR}/iosevka && \ bun run build -- ttf::${FONT_NAME} && \ From 42d1e65e4bccf449482e56d2fbe2d6c056cb7722 Mon Sep 17 00:00:00 2001 From: Sergei Blinov Date: Mon, 23 Mar 2026 22:02:29 +0100 Subject: [PATCH 2/6] Trigger CI From f435fa5a5c2800840cbd337cd63087304b0bea07 Mon Sep 17 00:00:00 2001 From: Sergei Blinov Date: Mon, 23 Mar 2026 22:02:38 +0100 Subject: [PATCH 3/6] Trigger CI From c3c3b533792f5463c86994f5981e0f23cd1e783f Mon Sep 17 00:00:00 2001 From: Sergei Blinov Date: Mon, 23 Mar 2026 22:02:45 +0100 Subject: [PATCH 4/6] Trigger CI From 591db7b53a153c41814c85aee871f3450af8a35d Mon Sep 17 00:00:00 2001 From: Sergei Blinov Date: Mon, 23 Mar 2026 23:07:35 +0100 Subject: [PATCH 5/6] bump actions/cache, upload-artifact, download-artifact to v5 --- .github/workflows/pr.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index c63bab9..32261c1 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -100,7 +100,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Restore verda cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: .verda-cache key: verda-${{ hashFiles('VERSION') }}-${{ hashFiles('private-build-plans.toml') }} @@ -113,7 +113,7 @@ jobs: VERDA_CACHE: .verda-cache run: ./build.sh - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v5 with: name: font-build path: _output/${{ env.FONT_NAME }}-*.zip @@ -124,7 +124,7 @@ jobs: steps: - uses: actions/checkout@v6 - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v5 with: name: font-build path: _output @@ -165,13 +165,13 @@ jobs: exit 1 fi - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v5 if: failure() with: name: visual-diffs path: _diffs/ - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v5 if: failure() with: name: visual-generated @@ -192,7 +192,7 @@ jobs: echo "VERSION=${VERSION}" >> "$GITHUB_ENV" - name: Download font artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: font-build path: _output From 156bcf7a32166c70c199df85c7fa55452acaeda9 Mon Sep 17 00:00:00 2001 From: Sergei Blinov Date: Mon, 23 Mar 2026 23:14:09 +0100 Subject: [PATCH 6/6] bump upload-artifact to v7 and download-artifact to v8 --- .github/workflows/pr.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 32261c1..561b730 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -113,7 +113,7 @@ jobs: VERDA_CACHE: .verda-cache run: ./build.sh - - uses: actions/upload-artifact@v5 + - uses: actions/upload-artifact@v7 with: name: font-build path: _output/${{ env.FONT_NAME }}-*.zip @@ -124,7 +124,7 @@ jobs: steps: - uses: actions/checkout@v6 - - uses: actions/download-artifact@v5 + - uses: actions/download-artifact@v8 with: name: font-build path: _output @@ -165,13 +165,13 @@ jobs: exit 1 fi - - uses: actions/upload-artifact@v5 + - uses: actions/upload-artifact@v7 if: failure() with: name: visual-diffs path: _diffs/ - - uses: actions/upload-artifact@v5 + - uses: actions/upload-artifact@v7 if: failure() with: name: visual-generated @@ -192,7 +192,7 @@ jobs: echo "VERSION=${VERSION}" >> "$GITHUB_ENV" - name: Download font artifact - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v8 with: name: font-build path: _output