Skip to content

Commit fe82aed

Browse files
ci: bootstrap CUDA packs from existing build artifacts
1 parent 596bede commit fe82aed

1 file changed

Lines changed: 17 additions & 12 deletions

File tree

‎.github/workflows/publish-performance-pack.yml‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Publish optional CUDA pack
22

33
on:
4+
# One bootstrap run from this PR branch. Remove this trigger after both packs exist.
5+
push:
6+
branches: [feature/linux-core-chat-release]
7+
paths: [.github/workflows/publish-performance-pack.yml]
48
workflow_dispatch:
59
inputs:
610
platform:
@@ -21,6 +25,13 @@ jobs:
2125
publish:
2226
runs-on: ubuntu-24.04
2327
timeout-minutes: 120
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
platform: ${{ fromJSON(github.event_name == 'push' && '["linux","win32"]' || format('["{0}"]', inputs.platform)) }}
32+
env:
33+
PLATFORM: ${{ matrix.platform }}
34+
VERSION: ${{ inputs.version || '2026-09-29-v1' }}
2435
steps:
2536
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2637
with:
@@ -29,9 +40,6 @@ jobs:
2940
with:
3041
node-version: '22'
3142
- name: Check input and source artifact
32-
env:
33-
PLATFORM: ${{ inputs.platform }}
34-
VERSION: ${{ inputs.version }}
3543
run: |
3644
[[ "$VERSION" =~ ^[a-zA-Z0-9._-]+$ ]]
3745
case "$PLATFORM" in
@@ -52,8 +60,6 @@ jobs:
5260
gh run download "$source_run" --repo "$GITHUB_REPOSITORY" --name "$source_name" --dir source
5361
find source -maxdepth 3 -type f -printf '%p %s bytes\n'
5462
- name: Extract CUDA directories
55-
env:
56-
PLATFORM: ${{ inputs.platform }}
5763
run: |
5864
mkdir -p extracted
5965
if [ "$PLATFORM" = linux ]; then
@@ -80,23 +86,22 @@ jobs:
8086
echo "BIN_ROOT=$PWD/$bin_root" >> "$GITHUB_ENV"
8187
du -sh "$bin_root"/*
8288
- name: Make and check versioned pack
83-
env:
84-
PLATFORM: ${{ inputs.platform }}
85-
VERSION: ${{ inputs.version }}
8689
run: |
8790
node scripts/package-performance-pack.mjs "$PLATFORM" "$BIN_ROOT" "$RUNNER_TEMP/$VERSION.tar.gz" "$VERSION"
8891
tar -tzf "$RUNNER_TEMP/$VERSION.tar.gz" | grep -q '^bin/llama-cuda/'
8992
sha256sum "$RUNNER_TEMP/$VERSION.tar.gz"
9093
cat "$RUNNER_TEMP/$VERSION.tar.gz.json"
9194
- name: Install S3 client
95+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
96+
with:
97+
python-version: '3.12'
98+
- name: Install AWS CLI
9299
run: python3 -m pip install --user awscli
93100
- name: Upload to Cloudflare R2
94101
env:
95102
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
96103
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
97104
AWS_DEFAULT_REGION: auto
98-
PLATFORM: ${{ inputs.platform }}
99-
VERSION: ${{ inputs.version }}
100105
run: |
101106
test -n "$AWS_ACCESS_KEY_ID"
102107
test -n "$AWS_SECRET_ACCESS_KEY"
@@ -114,6 +119,6 @@ jobs:
114119
- name: Keep manifest for app pinning
115120
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
116121
with:
117-
name: cuda-${{ inputs.platform }}-${{ inputs.version }}-manifest
118-
path: ${{ runner.temp }}/${{ inputs.version }}.tar.gz.json
122+
name: cuda-${{ matrix.platform }}-${{ env.VERSION }}-manifest
123+
path: ${{ runner.temp }}/${{ env.VERSION }}.tar.gz.json
119124
if-no-files-found: error

0 commit comments

Comments
 (0)