|
43 | 43 | - '.github/workflows/build-wasm.yml' # handled by build-wasm.yml |
44 | 44 | - '.github/workflows/build-android.yml' # handled by build-android.yml |
45 | 45 | - '.github/workflows/quantize.yml' # handled by quantize.yml |
| 46 | + - '.github/workflows/coreml.yml' # handled by coreml.yml |
46 | 47 |
|
47 | 48 | concurrency: |
48 | 49 | group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} |
|
71 | 72 | # cmake -B build |
72 | 73 | # cmake --build build --config Release |
73 | 74 |
|
74 | | - coreml-base-en: |
75 | | - if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || |
76 | | - startsWith(github.ref, 'refs/tags/v') }} |
77 | | - runs-on: macos-latest |
78 | | - |
79 | | - steps: |
80 | | - - name: Checkout with full history |
81 | | - uses: actions/checkout@v6 |
82 | | - with: |
83 | | - fetch-depth: 0 |
84 | | - |
85 | | - - name: Set environment variables |
86 | | - id: set_vars |
87 | | - run: | |
88 | | - BUILD_NUMBER=$(git rev-list --count HEAD) |
89 | | - SHORT_HASH=$(git rev-parse --short=7 HEAD) |
90 | | - if [[ "${{ github.ref_type }}" == "tag" ]]; then |
91 | | - TAG_NAME="${{ github.ref_name }}" |
92 | | - elif [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then |
93 | | - TAG_NAME="b${BUILD_NUMBER}" |
94 | | - else |
95 | | - SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-') |
96 | | - TAG_NAME="${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" |
97 | | - fi |
98 | | - echo "MODEL_NAME=base.en" >> $GITHUB_ENV |
99 | | - echo "GEN_MODEL_NAME=whisper-${TAG_NAME}-ggml-base.en-encoder.mlmodelc" >> $GITHUB_ENV |
100 | | -
|
101 | | - - name: Download model |
102 | | - run: | |
103 | | - ./models/download-ggml-model.sh ${{ env.MODEL_NAME }} |
104 | | -
|
105 | | - - name: Generate CoreML model |
106 | | - run: | |
107 | | - python3.11 -m venv venv |
108 | | - source venv/bin/activate |
109 | | - pip install ane_transformers openai-whisper coremltools |
110 | | - ./models/generate-coreml-model.sh ${{ env.MODEL_NAME }} |
111 | | -
|
112 | 75 | vad: |
113 | 76 | runs-on: ubuntu-latest |
114 | 77 |
|
|
0 commit comments