|
| 1 | +name: CI (windows) |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: # allows manual triggering |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - master |
| 8 | + paths: ['.github/workflows/build-windows.yml', |
| 9 | + '**/CMakeLists.txt', |
| 10 | + '**/Makefile', |
| 11 | + '**/*.mk', |
| 12 | + '**/*.cmake', |
| 13 | + '**/*.in', |
| 14 | + '**/*.h', |
| 15 | + '**/*.hpp', |
| 16 | + '**/*.c', |
| 17 | + '**/*.cpp', |
| 18 | + '**/*.cu', |
| 19 | + '**/*.cuh', |
| 20 | + '**/*.cl'] |
| 21 | + |
| 22 | + pull_request: |
| 23 | + types: [opened, synchronize, reopened] |
| 24 | + paths-ignore: |
| 25 | + - 'bindings/ruby/**' # handled by bindings-ruby.yml |
| 26 | + - 'bindings/go/**' # handled by bindings-go.yml |
| 27 | + - 'examples/addon.node/**' # handled by examples.yml |
| 28 | + |
| 29 | +concurrency: |
| 30 | + group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} |
| 31 | + cancel-in-progress: true |
| 32 | + |
| 33 | +jobs: |
| 34 | + windows-msys2: |
| 35 | + runs-on: windows-latest |
| 36 | + |
| 37 | + strategy: |
| 38 | + fail-fast: false |
| 39 | + matrix: |
| 40 | + include: |
| 41 | + - { sys: UCRT64, env: ucrt-x86_64, build: Release } |
| 42 | + - { sys: CLANG64, env: clang-x86_64, build: Release } |
| 43 | + |
| 44 | + steps: |
| 45 | + - name: Clone |
| 46 | + uses: actions/checkout@v6 |
| 47 | + |
| 48 | + - name: Setup ${{ matrix.sys }} |
| 49 | + uses: msys2/setup-msys2@v2 |
| 50 | + with: |
| 51 | + update: true |
| 52 | + msystem: ${{matrix.sys}} |
| 53 | + install: >- |
| 54 | + base-devel |
| 55 | + git |
| 56 | + mingw-w64-${{matrix.env}}-toolchain |
| 57 | + mingw-w64-${{matrix.env}}-cmake |
| 58 | + mingw-w64-${{matrix.env}}-SDL2 |
| 59 | + mingw-w64-${{matrix.env}}-openblas |
| 60 | +
|
| 61 | + - name: Build using CMake |
| 62 | + shell: msys2 {0} |
| 63 | + run: | |
| 64 | + cmake -B build -DWHISPER_SDL2=ON |
| 65 | + cmake --build build --config ${{ matrix.build }} -j $(nproc) |
| 66 | +
|
| 67 | + - name: Clean after building using CMake |
| 68 | + shell: msys2 {0} |
| 69 | + run: | |
| 70 | + rm -rf build |
| 71 | +
|
| 72 | + - name: Build using CMake w/ OpenBLAS |
| 73 | + shell: msys2 {0} |
| 74 | + run: | |
| 75 | + cmake -B build -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS |
| 76 | + cmake --build build --config ${{ matrix.build }} -j $(nproc) |
0 commit comments