ci : zip windows artifacts for release uploading (#3124)

This commit adds steps to the windows jobs to zip and upload
artifacts produced.

The motivation for this is that currently the artifacts are not zipped
which means that will not be picked up by the release job and hence not
be included in github releases.

Resolves: https://github.com/ggml-org/whisper.cpp/issues/3119
This commit is contained in:
Daniel Bevenius 2025-05-07 13:12:08 +02:00 committed by GitHub
parent 9b584b0cc0
commit 3a66f9f248
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -604,12 +604,19 @@ jobs:
name: ggml_cpu_${{ matrix.arch }}.dll name: ggml_cpu_${{ matrix.arch }}.dll
path: build/bin/${{ matrix.build }}/ggml-cpu.dll path: build/bin/${{ matrix.build }}/ggml-cpu.dll
- name: Pack bin artifacts
shell: pwsh
run: |
Compress-Archive -Path "build/bin/${{ matrix.build }}" -DestinationPath "whisper-bin-${{ matrix.arch }}.zip"
- name: Upload binaries - name: Upload binaries
if: matrix.sdl2 == 'ON' if: matrix.sdl2 == 'ON' && ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') ||
github.event.inputs.create_release == 'true' ||
github.event.inputs.pre_release_tag != '' }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: whisper-bin-${{ matrix.arch }} name: whisper-bin-${{ matrix.arch }}.zip
path: build/bin/${{ matrix.build }} path: whisper-bin-${{ matrix.arch }}.zip
windows-blas: windows-blas:
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' || if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' ||
@ -679,12 +686,19 @@ jobs:
if: matrix.sdl2 == 'ON' if: matrix.sdl2 == 'ON'
run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }} run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
- name: Pack bin artifacts
shell: pwsh
run: |
Compress-Archive -Path "build/bin/${{ matrix.build }}" -DestinationPath "whisper-blas-bin-${{ matrix.arch }}.zip"
- name: Upload binaries - name: Upload binaries
if: matrix.blas == 'ON' && matrix.sdl2 == 'ON' if: matrix.blas == 'ON' && matrix.sdl2 == 'ON' && ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') ||
github.event.inputs.create_release == 'true' ||
github.event.inputs.pre_release_tag != '' }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: whisper-blas-bin-${{ matrix.arch }} name: whisper-blas-bin-${{ matrix.arch }}.zip
path: build/bin/${{ matrix.build }} path: whisper-blas-bin-${{ matrix.arch }}.zip
windows-cublas: windows-cublas:
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' || if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' ||
@ -874,11 +888,19 @@ jobs:
if: matrix.sdl2 == 'ON' if: matrix.sdl2 == 'ON'
run: copy "$env:SDL2_DIR/../lib/${{ matrix.arch }}/SDL2.dll" build/bin/${{ matrix.build }} run: copy "$env:SDL2_DIR/../lib/${{ matrix.arch }}/SDL2.dll" build/bin/${{ matrix.build }}
- name: Pack bin artifacts
shell: pwsh
run: |
Compress-Archive -Path "build/bin/${{ matrix.build }}" -DestinationPath "whisper-cublas-${{ matrix.cuda-toolkit }}-bin-${{ matrix.arch }}.zip"
- name: Upload binaries - name: Upload binaries
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') ||
github.event.inputs.create_release == 'true' ||
github.event.inputs.pre_release_tag != '' }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: whisper-cublas-${{ matrix.cuda-toolkit }}-bin-${{ matrix.arch }} name: whisper-cublas-${{ matrix.cuda-toolkit }}-bin-${{ matrix.arch }}.zip
path: build/bin/${{ matrix.build }} path: whisper-cublas-${{ matrix.cuda-toolkit }}-bin-${{ matrix.arch }}.zip
emscripten: emscripten:
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' || if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' ||
@ -1140,6 +1162,9 @@ jobs:
needs: needs:
- determine-tag - determine-tag
- ios-xcode-build - ios-xcode-build
- windows
- windows-blas
- windows-cublas
steps: steps:
- name: Clone - name: Clone