forked from argmaxinc/WhisperKit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sync_Load-tokenizer-config-from-local-storage
# Conflicts: # Sources/WhisperKit/Core/WhisperKit.swift
- Loading branch information
Showing
52 changed files
with
5,988 additions
and
1,750 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Development Tests | ||
|
||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
pull_request_review: | ||
types: [submitted] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-and-test: | ||
uses: ./.github/workflows/unit-tests.yml | ||
with: | ||
ios-version: '17.2' | ||
macos-runner: 'macos-14' | ||
|
||
check-approvals: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
reviews: ${{ steps.reviews.outputs.state }} | ||
permissions: | ||
pull-requests: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check Approvals | ||
id: reviews | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
pr: ${{ github.event.pull_request.number }} | ||
run: | | ||
echo "Checking PR approval for: $pr" | ||
state=$(gh pr view $pr --json reviewDecision --jq '.reviewDecision') | ||
echo "Review decision state: $state" | ||
echo "state=$state" >> "$GITHUB_OUTPUT" | ||
pre-merge-tests: | ||
needs: [check-approvals] | ||
if: needs.check-approvals.outputs.reviews == 'APPROVED' || github.event_name == 'workflow_dispatch' | ||
uses: ./.github/workflows/unit-tests.yml | ||
with: | ||
ios-version: '16.1' | ||
macos-runner: 'macos-13-xlarge' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Bump Homebrew Formula | ||
|
||
on: | ||
push: | ||
tags: 'v*' | ||
|
||
jobs: | ||
homebrew: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: mislav/bump-homebrew-formula-action@v3 | ||
with: | ||
formula-name: whisperkit-cli | ||
env: | ||
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Pre-Release Tests | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-test-all-platforms: | ||
strategy: | ||
matrix: | ||
include: | ||
- os: macos-13-xlarge | ||
ios-version: "16.1" # Oldest available version | ||
- os: macos-14 | ||
ios-version: "17.2" # Latest available version | ||
uses: ./.github/workflows/unit-tests.yml | ||
with: | ||
ios-version: ${{ matrix.ios-version }} | ||
macos-runner: ${{ matrix.os }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,60 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
workflow_call: | ||
inputs: | ||
ios-version: | ||
required: true | ||
type: string | ||
macos-runner: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
cache-models: | ||
runs-on: macos-14 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup environment | ||
run: make setup | ||
- name: Cache Models | ||
uses: actions/cache@v4 | ||
with: | ||
path: Models | ||
key: ${{ runner.os }}-models | ||
- name: Download and cache models | ||
run: make download-model MODEL=tiny | ||
|
||
build-and-test: | ||
runs-on: macos-14 | ||
needs: cache-models | ||
unit-tests: | ||
name: unit-tests-${{ inputs.macos-runner }} | ||
runs-on: ${{ inputs.macos-runner }} | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup environment | ||
run: make setup | ||
- name: Cache Models | ||
uses: actions/cache@v4 | ||
with: | ||
path: Models | ||
key: ${{ runner.os }}-models | ||
- name: Build | ||
run: xcodebuild clean build-for-testing -scheme whisperkit-Package -destination 'platform=macOS' | xcpretty | ||
- name: Run tests | ||
run: | | ||
set -o pipefail | ||
xcodebuild test-without-building -only-testing WhisperKitTests/UnitTests -scheme whisperkit-Package -showdestinations | ||
xcodebuild test-without-building -only-testing WhisperKitTests/UnitTests -scheme whisperkit-Package -destination "platform=macOS,arch=arm64" | xcpretty | ||
- uses: actions/checkout@v4 | ||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: '15.2' | ||
- name: Setup environment | ||
run: make setup | ||
- name: Setup Cache | ||
id: model-cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: Models | ||
key: ${{ runner.os }}-models | ||
- name: Download Models | ||
if: steps.model-cache.outputs.cache-hit != 'true' | ||
run: make download-model MODEL=tiny | ||
- name: Install and discover destinations | ||
run: | | ||
xcodebuild -downloadAllPlatforms | ||
echo "Destinations for testing:" | ||
xcodebuild test-without-building -only-testing WhisperKitTests/UnitTests -scheme whisperkit-Package -showdestinations | ||
- name: Build and Test - macOS | ||
run: | | ||
set -o pipefail | ||
xcodebuild clean build-for-testing -scheme whisperkit-Package -destination generic/platform=macOS | xcpretty | ||
xcodebuild test -only-testing WhisperKitTests/UnitTests -scheme whisperkit-Package -destination "platform=macOS,arch=arm64" | xcpretty | ||
- name: Build and Test - iOS | ||
run: | | ||
set -o pipefail | ||
xcodebuild clean build-for-testing -scheme whisperkit-Package -destination generic/platform=iOS | xcpretty | ||
xcodebuild test -only-testing WhisperKitTests/UnitTests -scheme whisperkit-Package -destination "platform=iOS Simulator,OS=${{ inputs.ios-version }},name=iPhone 15" | xcpretty | ||
- name: Build and Test - watchOS | ||
if: ${{ inputs.macos-runner == 'macos-14' }} | ||
run: | | ||
set -o pipefail | ||
xcodebuild clean build-for-testing -scheme whisperkit-Package -destination generic/platform=watchOS | xcpretty | ||
xcodebuild test -only-testing WhisperKitTests/UnitTests -scheme whisperkit-Package -destination "platform=watchOS Simulator,OS=10.2,name=Apple Watch Ultra 2 (49mm)" | xcpretty | ||
- name: Build and Test - visionOS | ||
if: ${{ inputs.macos-runner == 'macos-14' }} | ||
run: | | ||
set -o pipefail | ||
xcodebuild clean build-for-testing -scheme whisperkit-Package -destination generic/platform=visionOS | xcpretty | ||
xcodebuild test -only-testing WhisperKitTests/UnitTests -scheme whisperkit-Package -destination "platform=visionOS Simulator,name=Apple Vision Pro" | xcpretty |
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
Oops, something went wrong.