From 201105202a499abecff77c46ef44a465418e0554 Mon Sep 17 00:00:00 2001 From: Sandro Hanea <40202887+sandrohanea@users.noreply.github.com> Date: Thu, 12 Jun 2025 18:44:33 +0200 Subject: [PATCH 1/3] Fixed the order of that commit check --- .github/workflows/build-all.yml | 2 +- .github/workflows/upload-build-artifacts.yml | 12 ++++++------ Whisper.net/Internals/Native/Data.cs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index 4c1312be5..74adfd0d5 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -147,7 +147,7 @@ jobs: - linux-no-avx if: > (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && - (github.ref == 'refs/heads/main') + (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/sandrohanea/artifacts-fix') permissions: contents: write uses: ./.github/workflows/upload-build-artifacts.yml diff --git a/.github/workflows/upload-build-artifacts.yml b/.github/workflows/upload-build-artifacts.yml index 1b2872978..20a0cca02 100644 --- a/.github/workflows/upload-build-artifacts.yml +++ b/.github/workflows/upload-build-artifacts.yml @@ -12,6 +12,12 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set release info + id: release-info + run: | + echo "date=$(date -u +'%Y%m%d-%H%M')" >> "$GITHUB_OUTPUT" + echo "commit=$(git -C whisper.cpp rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" + - name: Check for existing release with same commit id: check-release run: | @@ -37,12 +43,6 @@ jobs: run: | zip -r native-runtimes.zip runtime-artifacts - - name: Set release info - id: release-info - run: | - echo "date=$(date -u +'%Y%m%d-%H%M')" >> "$GITHUB_OUTPUT" - echo "commit=$(git -C whisper.cpp rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" - - name: Create preview release if: steps.check-release.outputs.release_exists != 'true' uses: ncipollo/release-action@90dc22b77f7e5e8d3a3a92924b18415dca53f445 diff --git a/Whisper.net/Internals/Native/Data.cs b/Whisper.net/Internals/Native/Data.cs index 931fc2372..4ccac17d7 100644 --- a/Whisper.net/Internals/Native/Data.cs +++ b/Whisper.net/Internals/Native/Data.cs @@ -201,7 +201,7 @@ internal struct WhisperFullParams public byte SuppressBlank; // suppress non-speech tokens (e.g. `,`, `.`, etc.) - public byte SupressNonSpeechTokens; + public byte SuppressNonSpeechTokens; // common decoding parameters: // ref: https://github.com/openai/whisper/blob/f82bc59f5ea234d4b97fb2860842ed38519f7e65/whisper/decoding.py#L89 From a50859c0ffd36f8b9405ab8d2c28576761d452e8 Mon Sep 17 00:00:00 2001 From: Sandro Hanea <40202887+sandrohanea@users.noreply.github.com> Date: Thu, 12 Jun 2025 19:09:49 +0200 Subject: [PATCH 2/3] retry --- .github/workflows/upload-build-artifacts.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/upload-build-artifacts.yml b/.github/workflows/upload-build-artifacts.yml index 20a0cca02..15b5f9235 100644 --- a/.github/workflows/upload-build-artifacts.yml +++ b/.github/workflows/upload-build-artifacts.yml @@ -21,8 +21,9 @@ jobs: - name: Check for existing release with same commit id: check-release run: | - COMMIT=${{ steps.release-info.outputs.commit }} - if gh release list --limit 100 --json tagName --jq ".[] | select(.tagName | contains(\"${COMMIT}\"))"; then + TAG="preview-nativelibs-${{ steps.release-info.outputs.commit }}" + echo "Checking if release with tag $TAG exists..." + if gh release view "$TAG" --json tagName &>/dev/null; then echo "release_exists=true" >> "$GITHUB_OUTPUT" else echo "release_exists=false" >> "$GITHUB_OUTPUT" @@ -41,14 +42,17 @@ jobs: - name: Zip Artifacts if: steps.check-release.outputs.release_exists != 'true' run: | - zip -r native-runtimes.zip runtime-artifacts + zip -r native-runtimes.zip runtime-artifacts - name: Create preview release if: steps.check-release.outputs.release_exists != 'true' uses: ncipollo/release-action@90dc22b77f7e5e8d3a3a92924b18415dca53f445 with: - tag: preview-${{ steps.release-info.outputs.date }}-${{ steps.release-info.outputs.commit }} - name: Preview ${{ steps.release-info.outputs.date }} (${{ steps.release-info.outputs.commit }}) + tag: preview-nativelibs-${{ steps.release-info.outputs.commit }} + name: Preview NativeLibs ${{ steps.release-info.outputs.date }} (${{ steps.release-info.outputs.commit }}) artifacts: native-runtimes.zip prerelease: true + body: | + These are the native libraries built from [whisper.cpp](https://github.com/ggml-org/whisper.cpp) at commit `${{ steps.release-info.outputs.commit }}`. + This release was automatically generated on `${{ steps.release-info.outputs.date }}`. From 0a5c49e291f2554e368858c8b9a29c246cdbbab9 Mon Sep 17 00:00:00 2001 From: Sandro Hanea <40202887+sandrohanea@users.noreply.github.com> Date: Thu, 12 Jun 2025 19:24:35 +0200 Subject: [PATCH 3/3] Remove branch condition for artifact upload workflow --- .github/workflows/build-all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index 74adfd0d5..4c1312be5 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -147,7 +147,7 @@ jobs: - linux-no-avx if: > (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && - (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/sandrohanea/artifacts-fix') + (github.ref == 'refs/heads/main') permissions: contents: write uses: ./.github/workflows/upload-build-artifacts.yml