From 890a8cf9c5210999a0a2966d7955f424a9a24056 Mon Sep 17 00:00:00 2001 From: Oluwaseun Ismaila Date: Tue, 10 Feb 2026 05:15:00 -0600 Subject: [PATCH 1/2] update prebuild download location for addon workflows --- .gitattributes | 1 + .../on-merge-qvac-lib-infer-llamacpp-embed.yml | 3 +++ .../on-merge-qvac-lib-infer-llamacpp-llm.yml | 3 +++ .../on-merge-qvac-lib-infer-whispercpp.yml | 3 +++ .../prebuilds-qvac-lib-infer-llamacpp-embed.yml | 5 +++-- .../prebuilds-qvac-lib-infer-llamacpp-llm.yml | 8 +++++--- .../prebuilds-qvac-lib-infer-whispercpp.yml | 17 ++++++++--------- 7 files changed, 26 insertions(+), 14 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..94f480de94 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf \ No newline at end of file diff --git a/.github/workflows/on-merge-qvac-lib-infer-llamacpp-embed.yml b/.github/workflows/on-merge-qvac-lib-infer-llamacpp-embed.yml index 694bde74a1..a49139ea65 100644 --- a/.github/workflows/on-merge-qvac-lib-infer-llamacpp-embed.yml +++ b/.github/workflows/on-merge-qvac-lib-infer-llamacpp-embed.yml @@ -84,6 +84,7 @@ jobs: with: tag: ${{ inputs.tag || needs.publish-logic.outputs.gpr_tag }} publish_target: "gpr" + workdir: "packages/qvac-lib-infer-llamacpp-embed" publish-feature-gpr: needs: publish-logic @@ -97,6 +98,7 @@ jobs: with: tag: ${{ inputs.tag || needs.publish-logic.outputs.gpr_tag }} publish_target: "gpr" + workdir: "packages/qvac-lib-infer-llamacpp-embed" publish-tmp-gpr: needs: publish-logic @@ -110,6 +112,7 @@ jobs: with: tag: ${{ inputs.tag || needs.publish-logic.outputs.gpr_tag }} publish_target: "gpr" + workdir: "packages/qvac-lib-infer-llamacpp-embed" publish-release-npm: needs: publish-logic diff --git a/.github/workflows/on-merge-qvac-lib-infer-llamacpp-llm.yml b/.github/workflows/on-merge-qvac-lib-infer-llamacpp-llm.yml index 2f388eea1e..0572cc5053 100644 --- a/.github/workflows/on-merge-qvac-lib-infer-llamacpp-llm.yml +++ b/.github/workflows/on-merge-qvac-lib-infer-llamacpp-llm.yml @@ -92,6 +92,7 @@ jobs: with: tag: ${{ inputs.tag || needs.publish-logic.outputs.gpr_tag }} publish_target: "gpr" + workdir: "packages/qvac-lib-infer-llamacpp-llm" publish-feature-gpr: needs: publish-logic @@ -105,6 +106,7 @@ jobs: with: tag: ${{ inputs.tag || needs.publish-logic.outputs.gpr_tag }} publish_target: "gpr" + workdir: "packages/qvac-lib-infer-llamacpp-llm" publish-tmp-gpr: needs: publish-logic @@ -118,6 +120,7 @@ jobs: with: tag: ${{ inputs.tag || needs.publish-logic.outputs.gpr_tag }} publish_target: "gpr" + workdir: "packages/qvac-lib-infer-llamacpp-llm" publish-release-npm: needs: publish-logic diff --git a/.github/workflows/on-merge-qvac-lib-infer-whispercpp.yml b/.github/workflows/on-merge-qvac-lib-infer-whispercpp.yml index 3f4e7d0bf6..d81ef38819 100644 --- a/.github/workflows/on-merge-qvac-lib-infer-whispercpp.yml +++ b/.github/workflows/on-merge-qvac-lib-infer-whispercpp.yml @@ -91,6 +91,7 @@ jobs: # workflow_dispatch -> github.event.inputs.tag is set; push -> fallback to computed gpr_tag tag: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.tag) || needs.publish-logic.outputs.gpr_tag }} publish_target: "gpr" + workdir: "packages/qvac-lib-infer-whispercpp" publish-feature-gpr: needs: publish-logic @@ -104,6 +105,7 @@ jobs: with: tag: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.tag) || needs.publish-logic.outputs.gpr_tag }} publish_target: "gpr" + workdir: "packages/qvac-lib-infer-whispercpp" publish-tmp-gpr: needs: publish-logic @@ -117,6 +119,7 @@ jobs: with: tag: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.tag) || needs.publish-logic.outputs.gpr_tag }} publish_target: "gpr" + workdir: "packages/qvac-lib-infer-whispercpp" publish-release-npm: needs: publish-logic diff --git a/.github/workflows/prebuilds-qvac-lib-infer-llamacpp-embed.yml b/.github/workflows/prebuilds-qvac-lib-infer-llamacpp-embed.yml index 5bc04c6832..8b5a3adee2 100644 --- a/.github/workflows/prebuilds-qvac-lib-infer-llamacpp-embed.yml +++ b/.github/workflows/prebuilds-qvac-lib-infer-llamacpp-embed.yml @@ -468,7 +468,7 @@ jobs: uses: actions/download-artifact@v4 with: name: prebuilds - path: prebuilds + path: ${{ env.WORKDIR }}/prebuilds - name: Publish to GitHub Package Registry id: publish @@ -510,7 +510,7 @@ jobs: uses: actions/download-artifact@v4 with: name: prebuilds - path: prebuilds + path: ${{ env.WORKDIR }}/prebuilds - name: Publish to NPM Package Registry id: publish @@ -518,3 +518,4 @@ jobs: with: secret-token: ${{ secrets.NPM_TOKEN }} tag: "latest" + workdir: ${{ env.WORKDIR }} diff --git a/.github/workflows/prebuilds-qvac-lib-infer-llamacpp-llm.yml b/.github/workflows/prebuilds-qvac-lib-infer-llamacpp-llm.yml index 63d4792e06..bdfdd651c4 100644 --- a/.github/workflows/prebuilds-qvac-lib-infer-llamacpp-llm.yml +++ b/.github/workflows/prebuilds-qvac-lib-infer-llamacpp-llm.yml @@ -495,7 +495,7 @@ jobs: uses: actions/download-artifact@v4 with: name: prebuilds - path: prebuilds + path: ${{ env.WORKDIR }}/prebuilds - name: Scope package as @tetherto for GPR shell: bash @@ -549,10 +549,11 @@ jobs: uses: actions/download-artifact@v4 with: name: prebuilds - path: prebuilds + path: ${{ env.WORKDIR }}/prebuilds # Re-assert scope for public npm (fresh checkout) - name: Scope package as @qvac for npm + working-directory: ${{ env.WORKDIR }} shell: bash run: | set -euo pipefail @@ -564,4 +565,5 @@ jobs: uses: tetherto/qvac-devops/.github/actions/publish-library-to-npm@monorepo_update with: secret-token: ${{ secrets.NPM_TOKEN }} - tag: 'latest' \ No newline at end of file + tag: 'latest' + workdir: ${{ env.WORKDIR }} \ No newline at end of file diff --git a/.github/workflows/prebuilds-qvac-lib-infer-whispercpp.yml b/.github/workflows/prebuilds-qvac-lib-infer-whispercpp.yml index 2803cb768d..fbcf836f73 100644 --- a/.github/workflows/prebuilds-qvac-lib-infer-whispercpp.yml +++ b/.github/workflows/prebuilds-qvac-lib-infer-whispercpp.yml @@ -462,15 +462,7 @@ jobs: uses: actions/download-artifact@v4 with: name: prebuilds - path: /tmp/prebuilds - - - name: Place merged prebuilds into package workdir - shell: bash - run: | - set -euo pipefail - mkdir -p "${WORKDIR}/prebuilds" - rm -rf "${WORKDIR}/prebuilds"/* - cp -R /tmp/prebuilds/* "${WORKDIR}/prebuilds/" + path: ${WORKDIR}/prebuilds - name: Rename prebuild files from qvac_ to tetherto_ prefix shell: bash @@ -545,12 +537,19 @@ jobs: token: ${{ secrets.PAT_TOKEN }} fetch-depth: 0 + - name: Download prebuild artifacts + uses: actions/download-artifact@v4 + with: + name: prebuilds + path: ${WORKDIR}/prebuilds + - name: Publish to NPM Package Registry id: publish uses: tetherto/qvac-devops/.github/actions/publish-library-to-npm@monorepo_update with: secret-token: ${{ secrets.NPM_TOKEN }} tag: "latest" + workdir: $((WORKDIR)) - name: Capture published version id: capture_version From 296dc3d3f575ca26082bb6aae1dfaafbd451213f Mon Sep 17 00:00:00 2001 From: Juan Pablo Garibotti Arias Date: Tue, 10 Feb 2026 13:01:58 +0100 Subject: [PATCH 2/2] Use S3 cache for Vulkan SDK on Linux arm64 in prebuilds (#200) Reuse the same S3 Vulkan SDK cache (bucket tether-ai-dev) in prebuilds-qvac-lib-infer-whispercpp and prebuilds-qvac-lib-infer-nmtcpp. Replaces the previous GitHub Actions cache in nmtcpp and adds S3 download-or-build-and-upload in whispercpp so arm64 builds match the LLM/embed workflows. --- .../prebuilds-qvac-lib-infer-nmtcpp.yml | 38 ++++++++++++++----- .../prebuilds-qvac-lib-infer-whispercpp.yml | 29 +++++++++++++- 2 files changed, 56 insertions(+), 11 deletions(-) diff --git a/.github/workflows/prebuilds-qvac-lib-infer-nmtcpp.yml b/.github/workflows/prebuilds-qvac-lib-infer-nmtcpp.yml index 038f7a7157..8001c266f0 100644 --- a/.github/workflows/prebuilds-qvac-lib-infer-nmtcpp.yml +++ b/.github/workflows/prebuilds-qvac-lib-infer-nmtcpp.yml @@ -292,15 +292,11 @@ jobs: sudo apt install -y vulkan-sdk - if: ${{ matrix.os == 'ubuntu-24.04-arm64-private' }} - name: Cache Vulkan SDK for linux arm64 - id: cache-vulkan-arm64 - uses: actions/cache@v4 - with: - path: ~/vulkan - key: vulkan-sdk-linux-arm64-v1 - - - if: ${{ matrix.os == 'ubuntu-24.04-arm64-private' && steps.cache-vulkan-arm64.outputs.cache-hit != 'true' }} - name: Build Vulkan SDK for linux arm64 + name: Build Vulkan SDK for linux arm64 (with S3 cache) + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: us-east-1 run: | sudo apt install -y xz-utils wget -q -O /tmp/vulkansdk.tar.xz https://sdk.lunarg.com/sdk/download/latest/linux/vulkan_sdk.tar.xz @@ -308,7 +304,29 @@ jobs: mkdir -p vulkan cd vulkan tar xf /tmp/vulkansdk.tar.xz --strip-components=1 - ./vulkansdk --maxjobs + + # Extract SDK major.minor version from README.txt (e.g., "1.4" from "1.4.341.0") + SDK_VERSION=$(grep -o 'sdk/[0-9]*\.[0-9]*' README.txt | head -1 | sed 's|sdk/||') + S3_BUCKET="tether-ai-dev" + S3_KEY="vulkan-sdk-cache/linux-arm64-${SDK_VERSION}.tar.gz" + + echo "Vulkan SDK version: ${SDK_VERSION}" + + # Try to download cached build from S3 + if aws s3 cp "s3://${S3_BUCKET}/${S3_KEY}" /tmp/vulkan-arm64-cache.tar.gz 2>/dev/null; then + echo "Found cached Vulkan SDK, extracting..." + tar xzf /tmp/vulkan-arm64-cache.tar.gz -C ~/vulkan + rm /tmp/vulkan-arm64-cache.tar.gz + else + echo "No cache found, building Vulkan SDK for ARM64..." + ./vulkansdk --maxjobs + + # Upload the compiled SDK to S3 for future runs + echo "Uploading compiled SDK to S3..." + tar czf /tmp/vulkan-arm64-cache.tar.gz aarch64 + aws s3 cp /tmp/vulkan-arm64-cache.tar.gz "s3://${S3_BUCKET}/${S3_KEY}" + rm /tmp/vulkan-arm64-cache.tar.gz + fi - if: ${{ matrix.os == 'ubuntu-24.04-arm64-private' }} name: Setup Vulkan SDK environment for linux arm64 diff --git a/.github/workflows/prebuilds-qvac-lib-infer-whispercpp.yml b/.github/workflows/prebuilds-qvac-lib-infer-whispercpp.yml index fbcf836f73..96eee4bd46 100644 --- a/.github/workflows/prebuilds-qvac-lib-infer-whispercpp.yml +++ b/.github/workflows/prebuilds-qvac-lib-infer-whispercpp.yml @@ -323,11 +323,38 @@ jobs: - if: ${{ matrix.platform == 'linux' && matrix.arch == 'arm64' }} name: Setup vulkan sdk path in linux arm64 + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: us-east-1 run: | VULKAN_SDK=~/vulkan/aarch64 echo "VULKAN_SDK=$VULKAN_SDK" >> $GITHUB_ENV + cd ~/vulkan - ./vulkansdk --maxjobs + + # Extract SDK major.minor version from README.txt (e.g., "1.4" from "1.4.341.0") + SDK_VERSION=$(grep -o 'sdk/[0-9]*\.[0-9]*' README.txt | head -1 | sed 's|sdk/||') + S3_BUCKET="tether-ai-dev" + S3_KEY="vulkan-sdk-cache/linux-arm64-${SDK_VERSION}.tar.gz" + + echo "Vulkan SDK version: ${SDK_VERSION}" + + # Try to download cached build from S3 + if aws s3 cp "s3://${S3_BUCKET}/${S3_KEY}" /tmp/vulkan-arm64-cache.tar.gz 2>/dev/null; then + echo "Found cached Vulkan SDK, extracting..." + tar xzf /tmp/vulkan-arm64-cache.tar.gz -C ~/vulkan + rm /tmp/vulkan-arm64-cache.tar.gz + else + echo "No cache found, building Vulkan SDK for ARM64..." + ./vulkansdk --maxjobs + + # Upload the compiled SDK to S3 for future runs + echo "Uploading compiled SDK to S3..." + tar czf /tmp/vulkan-arm64-cache.tar.gz aarch64 + aws s3 cp /tmp/vulkan-arm64-cache.tar.gz "s3://${S3_BUCKET}/${S3_KEY}" + rm /tmp/vulkan-arm64-cache.tar.gz + fi - if: ${{ matrix.platform == 'linux' }} name: Export rest of vulkan sdk variables in linux