Skip to content

Commit 04b9508

Browse files
authored
ci : add coreml job that converts base.en to coreml [no ci] (#2981)
* ci : add coreml job that converts base.en to coreml [no ci] This commit adds a new job to the CI pipeline that downloads the base.en model and converts it to CoreML format. The CoreML model is then packed into a zip file and uploaded as an artifact. This will only be done for pushes to master, releases, or pre-releases. Refs: #2783 * coreml : remove publishing of coreml model * ci : add GGML_OPENMP=OFF to ubuntu-22-gcc-sanitized
1 parent 4200430 commit 04b9508

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,9 @@ jobs:
367367
set -e
368368
apt update
369369
apt install -y build-essential cmake git
370-
cmake . -DCMAKE_BUILD_TYPE=Debug -DWHISPER_SANITIZE_${{ matrix.sanitizer }}=ON
370+
cmake . -DCMAKE_BUILD_TYPE=Debug \
371+
-DWHISPER_SANITIZE_${{ matrix.sanitizer }}=ON \
372+
-DGGML_OPENMP=OFF
371373
make
372374
ctest -L gh --output-on-failure'
373375
@@ -1119,3 +1121,31 @@ jobs:
11191121
});
11201122
}
11211123
}
1124+
1125+
coreml-base-en:
1126+
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') ||
1127+
github.event.inputs.create_release == 'true' ||
1128+
github.event.inputs.pre_release_tag != '' }}
1129+
runs-on: macos-latest
1130+
needs: determine-tag
1131+
1132+
steps:
1133+
- name: Checkout code
1134+
uses: actions/checkout@v4
1135+
1136+
- name: Set environment variables
1137+
id: set_vars
1138+
run: |
1139+
echo "MODEL_NAME=base.en" >> $GITHUB_ENV
1140+
echo "GEN_MODEL_NAME=whisper-${{ needs.determine-tag.outputs.tag_name }}-ggml-base.en-encoder.mlmodelc" >> $GITHUB_ENV
1141+
1142+
- name: Download model
1143+
run: |
1144+
./models/download-ggml-model.sh ${{ env.MODEL_NAME }}
1145+
1146+
- name: Generate CoreML model
1147+
run: |
1148+
python3.11 -m venv venv
1149+
source venv/bin/activate
1150+
pip install ane_transformers openai-whisper coremltools
1151+
./models/generate-coreml-model.sh ${{ env.MODEL_NAME }}

0 commit comments

Comments
 (0)