Skip to content

Commit cdcea8e

Browse files
committed
ci : add coreml job that converts base.en to coreml
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. Refs: ggml-org#2783
1 parent 4200430 commit cdcea8e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,7 @@ jobs:
10641064
needs:
10651065
- determine-tag
10661066
- ios-xcode-build
1067+
- coreml-base-en
10671068

10681069
steps:
10691070
- name: Clone
@@ -1119,3 +1120,39 @@ jobs:
11191120
});
11201121
}
11211122
}
1123+
1124+
coreml-base-en:
1125+
runs-on: macos-latest
1126+
needs: determine-tag
1127+
1128+
steps:
1129+
- name: Checkout code
1130+
uses: actions/checkout@v4
1131+
1132+
- name: Download model
1133+
run: |
1134+
./models/download-ggml-model.sh base.en
1135+
1136+
- name: Generate CoreML model
1137+
run: |
1138+
python3 -m venv venv
1139+
source venv/bin/activate
1140+
pip install ane_transformers openai-whisper coremltools
1141+
./models/generate-coreml-model.sh base.en
1142+
1143+
- name: Pack CoreML model
1144+
id: pack_artifacts
1145+
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') ||
1146+
github.event.inputs.create_release == 'true' ||
1147+
github.event.inputs.pre_release_tag != '' }}
1148+
run: |
1149+
zip --symlinks -r whisper-${{ needs.determine-tag.outputs.tag_name }}-ggml-base.en-encoder.mlmodelc.zip models/ggml-base.en-encoder.mlmodelc
1150+
1151+
- name: Upload artifacts
1152+
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') ||
1153+
github.event.inputs.create_release == 'true' ||
1154+
github.event.inputs.pre_release_tag != '' }}
1155+
uses: actions/upload-artifact@v4
1156+
with:
1157+
path: whisper-${{ needs.determine-tag.outputs.tag_name }}-ggml-base.en-encoder.mlmodelc.zip
1158+
name: whisper-${{ needs.determine-tag.outputs.tag_name }}-ggml-base.en-encoder.mlmodelc

0 commit comments

Comments
 (0)