Bump whisper.cpp from 6aa1d7b
to d17e713
#135
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
env: | |
# Checks for the '[debug]' string in the commit message to compile as debug instead of release. | |
build_type: ${{ contains(github.event.head_commit.message, '[debug]') && 'Debug' || 'Release' }} | |
# Checks whether the event corresponds to a tag to activate the automatic creation of a release. | |
is_tagged: ${{ startsWith(github.ref, 'refs/tags/') }} | |
# The name of the version | |
tag_name: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || ''}} | |
jobs: | |
# Checks source code formatting with clang before compiling. | |
Format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check | |
uses: jidicula/[email protected] | |
with: | |
clang-format-version: '19' | |
check-path: '.' | |
exclude-regex: 'whisper.cpp' | |
# Creates a cache for the model downloaded and transcribed | |
# into the C++ file for embedding in the binary. | |
Cache: | |
runs-on: ubuntu-latest | |
needs: Format | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ./build/source | |
key: wvp-model-base-q5_1 | |
enableCrossOsArchive: true | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ./build/models | |
key: wvp-models-q5 | |
enableCrossOsArchive: true | |
- name: Configure | |
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.build_type }} | |
# Compiles, tests and packages the plugin for Ubuntu. | |
Ubuntu: | |
runs-on: ubuntu-latest | |
needs: Cache | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ./build/source | |
key: wvp-model-base-q5_1 | |
enableCrossOsArchive: true | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ./build/models | |
key: wvp-models-q5 | |
enableCrossOsArchive: true | |
- uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Configure | |
run: cmake -B ${{ github.workspace }}/build -G Ninja -DCMAKE_BUILD_TYPE=${{ env.build_type }} -DCMAKE_C_COMPILER="/usr/bin/clang" -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DBPVP_BUILD_TAG=${{ env.tag_name }} | |
- name: Build | |
run: cmake --build ${{ github.workspace }}/build | |
- name: Test | |
run: ctest -C ${{ env.build_type }} -VV --test-dir ${{ github.workspace }}/build | |
- name: Artifact | |
uses: actions/[email protected] | |
with: | |
name: Whisper-Linux | |
path: ${{ github.workspace }}/package/Whisper-Linux.tar.gz | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ env.is_tagged == 'true' }} | |
with: | |
draft: true | |
prerelease: true | |
fail_on_unmatched_files: true | |
generate_release_notes: true | |
body_path: ${{ github.workspace }}/build/whisper-release.md | |
files: ${{ github.workspace }}/package/Whisper-Linux.tar.gz | |
# Compiles, tests and packages the plugin for Windows. | |
Windows: | |
runs-on: windows-latest | |
needs: Cache | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ./build/source | |
key: wvp-model-base-q5_1 | |
enableCrossOsArchive: true | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ./build/models | |
key: wvp-models-q5 | |
enableCrossOsArchive: true | |
- name: Prepare | |
run: powershell -Command "& {[System.IO.File]::WriteAllBytes('${{ github.workspace }}\cert.p12', [System.Convert]::FromBase64String('${{ secrets.SECTIGO_CERT_P12}}'))}" | |
- name: Configure | |
run: cmake -B ${{ github.workspace }}/build -G "Visual Studio 17 2022" -A x64 -DVPP_NOTARIZE=ON -DVPP_CODESIGN_WINDOWS_KEYFILE=${{ github.workspace }}\cert.p12 -DVPP_CODESIGN_WINDOWS_KEYPASSWORD=${{ secrets.DEV_ID_PASSWORD }} -DBPVP_BUILD_TAG="${{ env.tag_name }}" | |
- name: Build | |
run: cmake --build ${{ github.workspace }}/build --config ${{ env.build_type }} | |
- name: Test | |
run: ctest -C ${{ env.build_type }} -VV --test-dir ${{ github.workspace }}/build | |
- name: Artifact | |
uses: actions/[email protected] | |
with: | |
name: Whisper-Windows | |
path: ${{ github.workspace }}/package/Whisper-Windows.exe | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ env.is_tagged == 'true' }} | |
with: | |
draft: true | |
prerelease: true | |
fail_on_unmatched_files: true | |
generate_release_notes: true | |
body_path: ${{ github.workspace }}/build/whisper-release.md | |
files: ${{ github.workspace }}/package/Whisper-Windows.exe | |
# Compiles, tests and packages the plugin for MacOS. | |
MacOS: | |
runs-on: macos-latest | |
needs: Cache | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ./build/source | |
key: wvp-model-base-q5_1 | |
enableCrossOsArchive: true | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ./build/models | |
key: wvp-models-q5 | |
enableCrossOsArchive: true | |
- name: Prepare | |
run: | | |
security create-keychain -p ${{ secrets.DEV_ID_PASSWORD }} buildagent | |
security unlock-keychain -p ${{ secrets.DEV_ID_PASSWORD }} buildagent | |
security list-keychains -s buildagent && security default-keychain -s buildagent | |
echo ${{ secrets.DEV_ID_APP_CERT }} | base64 --decode > ./cert.p12 | |
security import ./cert.p12 -P ${{ secrets.DEV_ID_PASSWORD }} -A -t cert -f pkcs12 -k buildagent -T /usr/bin/codesign >/dev/null | |
rm ./cert.p12 | |
echo ${{ secrets.DEV_ID_INST_CERT }} | base64 --decode > ./cert.p12 | |
security import ./cert.p12 -P ${{ secrets.DEV_ID_PASSWORD }} -A -t cert -f pkcs12 -k buildagent -T /usr/bin/codesign >/dev/null | |
rm ./cert.p12 | |
security set-key-partition-list -S "apple-tool:,apple:,codesign:" -s -k ${{ secrets.DEV_ID_PASSWORD }} buildagent >/dev/null | |
xcrun notarytool store-credentials "notary-installer" --apple-id ${{ secrets.DEV_USER_APPLE_ID }} --team-id ${{ secrets.DEV_TEAM_APPLE_ID }} --password ${{ secrets.DEV_SPEC_APP_PASSWORD }} >/dev/null | |
- name: Configure | |
run: cmake -B ${{ github.workspace }}/build -G "Xcode" -DVPP_CODESIGN_APPLE_KEYCHAIN_PROFILE_INSTALLER="notary-installer" -DVPP_NOTARIZE=ON -DBPVP_BUILD_TAG=${{ env.tag_name }} | |
- name: Build | |
run: | | |
security unlock-keychain -p ${{ secrets.DEV_ID_PASSWORD }} buildagent | |
security set-keychain-settings -lut 7200 buildagent | |
set -o pipefail && cmake --build ${{ github.workspace }}/build --config ${{ env.build_type }} | xcbeautify --renderer github-actions --disable-logging | |
- name: Test | |
run: ctest -C ${{ env.build_type }} -VV --test-dir ${{ github.workspace }}/build | |
- name: Artifact | |
uses: actions/[email protected] | |
with: | |
name: Whisper-MacOS | |
path: ${{ github.workspace }}/package/Whisper-MacOS.pkg | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ env.is_tagged == 'true' }} | |
with: | |
draft: true | |
prerelease: true | |
fail_on_unmatched_files: true | |
generate_release_notes: true | |
body_path: ${{ github.workspace }}/build/whisper-release.md | |
files: ${{ github.workspace }}/package/Whisper-MacOS.pkg | |
# Generates the documentation. | |
Doc: | |
runs-on: ubuntu-latest | |
needs: Cache | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: npm install -g git+https://github.com/elliotblackburn/mdpdf.git#3.0.4 | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ./build/source | |
key: wvp-model-base-q5_1 | |
enableCrossOsArchive: true | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ./build/models | |
key: wvp-models-q5 | |
enableCrossOsArchive: true | |
- name: Configure | |
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.build_type }} -DBPVP_BUILD_TAG=${{ env.tag_name }} | |
- name: Build | |
run: | | |
cmake --build build --target wvp_manual | |
zip -jr Whisper-Manual.zip ${{ github.workspace }}/build/Manual | |
- name: Artifact | |
uses: actions/[email protected] | |
with: | |
name: Whisper-Manual | |
path: ${{ github.workspace }}/build/Manual | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ env.is_tagged == 'true' }} | |
with: | |
draft: true | |
prerelease: true | |
fail_on_unmatched_files: true | |
generate_release_notes: true | |
body_path: ${{ github.workspace }}/build/whisper-release.md | |
files: ${{ github.workspace }}/Whisper-Manual.zip |