From 8a46a9f33f3a961d7e2cb1ce96954b96647bb5b4 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 11:46:29 +0000 Subject: [PATCH] build(cli): zstd-compress the tar before artifact upload Uncompressed tar left the artifact at ~2.7 GB (same as no-compression zip on the previous attempt). zstd compresses the tree-sitter wasms ~4x while being near-native speed on the already-compact binaries, which should bring the artifact close to ~1 GB. zstd 1.5.7 and GNU tar 1.35 are preinstalled on both github-hosted and blacksmith ubuntu-2404 images (per the actions/runner-images Ubuntu2404 manifest and blacksmith's drop-in-replacement docs). Already used in this same workflow by actions/cache@v4 for bun pm cache restoration, so availability is empirically confirmed. --- .github/workflows/publish.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1ee71a1e7b8..0ca65c9623f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -95,20 +95,22 @@ jobs: GH_TOKEN: ${{ github.token }} GH_REPO: ${{ github.repository }} - # kilocode_change start - tar the whole dist tree into a single file before upload. - # download-artifact@v4's streaming unzip is CPU-bound and processes entries one by - # one; collapsing ~480 files into one tar cuts build-vscode download from >30m to - # seconds. compression-level: 0 avoids double-compressing binaries on the outer zip. + # kilocode_change start - pack dist tree into a single zstd-compressed tar before upload. + # download-artifact@v4's streaming unzip is CPU-bound and processes entries one by one; + # collapsing ~480 files into one tar cuts build-vscode download from >30m to seconds. + # zstd compresses the wasms (~4x) and leaves the already-compact binaries alone, for + # ~1 GB artifact. compression-level: 0 on the outer zip avoids double-compression. + # zstd + GNU tar are preinstalled on both github-hosted and blacksmith ubuntu-2404. # See actions/upload-artifact#36, actions/toolkit#1533. - - name: Pack CLI dist into tar + - name: Pack CLI dist into tar.zst run: | find packages/opencode/dist -name '*.map' -delete - tar -cf /tmp/kilo-cli.tar -C packages/opencode/dist . + tar --zstd -cf /tmp/kilo-cli.tar.zst -C packages/opencode/dist . - uses: actions/upload-artifact@v4 with: name: kilo-cli - path: /tmp/kilo-cli.tar + path: /tmp/kilo-cli.tar.zst compression-level: 0 # kilocode_change end @@ -137,11 +139,11 @@ jobs: name: kilo-cli path: /tmp - # kilocode_change start - extract the tar packed by build-cli + # kilocode_change start - extract the tar.zst packed by build-cli - name: Unpack CLI dist run: | mkdir -p packages/opencode/dist - tar -xf /tmp/kilo-cli.tar -C packages/opencode/dist + tar --zstd -xf /tmp/kilo-cli.tar.zst -C packages/opencode/dist # kilocode_change end - name: Build VSIX packages run: bun script/build.ts @@ -335,11 +337,11 @@ jobs: name: kilo-cli path: /tmp - # kilocode_change start - extract the tar packed by build-cli + # kilocode_change start - extract the tar.zst packed by build-cli - name: Unpack CLI dist run: | mkdir -p packages/opencode/dist - tar -xf /tmp/kilo-cli.tar -C packages/opencode/dist + tar --zstd -xf /tmp/kilo-cli.tar.zst -C packages/opencode/dist # kilocode_change end - uses: actions/download-artifact@v4 with: