Skip to content

Commit 23e0354

Browse files
committed
ci : extract macos jobs to build-macos.yml
1 parent db91b2f commit 23e0354

2 files changed

Lines changed: 72 additions & 37 deletions

File tree

.github/workflows/build-macos.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: CI (macOS)
2+
3+
on:
4+
workflow_dispatch: # allows manual triggering
5+
push:
6+
branches:
7+
- master
8+
paths: ['.github/workflows/build-macos.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+
'**/*.swift',
21+
'**/*.m',
22+
'**/*.mm',
23+
'**/*.metal']
24+
25+
pull_request:
26+
types: [opened, synchronize, reopened]
27+
paths-ignore:
28+
- 'bindings/ruby/**' # handled by bindings-ruby.yml
29+
- 'bindings/go/**' # handled by bindings-go.yml
30+
- 'examples/addon.node/**' # handled by examples.yml
31+
32+
concurrency:
33+
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
34+
cancel-in-progress: true
35+
36+
jobs:
37+
macOS-latest:
38+
runs-on: macOS-latest
39+
40+
strategy:
41+
matrix:
42+
destination: ['generic/platform=macOS', 'generic/platform=iOS', 'generic/platform=tvOS']
43+
44+
steps:
45+
- name: Clone
46+
id: checkout
47+
uses: actions/checkout@v6
48+
49+
- name: ccache
50+
uses: hendrikmuhs/ccache-action@v1.2.16
51+
with:
52+
key: macOS-latest-swift
53+
evict-old-files: 1d
54+
55+
- name: Dependencies
56+
run: |
57+
brew update
58+
cmake --version
59+
brew install sdl2
60+
61+
- name: Build
62+
run: |
63+
sysctl -a
64+
cmake -B build -G Xcode \
65+
-DGGML_METAL_USE_BF16=ON \
66+
-DGGML_METAL_EMBED_LIBRARY=ON \
67+
-DWHISPER_BUILD_EXAMPLES=OFF \
68+
-DWHISPER_BUILD_TESTS=OFF \
69+
-DWHISPER_BUILD_SERVER=OFF \
70+
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
71+
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)

.github/workflows/build.yml

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ on:
3535
- 'examples/addon.node/**' # handled by examples.yml
3636
- '.github/workflows/build-sanitize.yml' # handled by build-sanitize.yml
3737
- '.github/workflows/build-linux.yml' # handled by build-linux.yml
38+
- '.github/workflows/build-macos.yml' # handled by build-macos.yml
3839

3940
concurrency:
4041
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
@@ -45,43 +46,6 @@ env:
4546
ubuntu_image: "ubuntu:22.04"
4647

4748
jobs:
48-
macOS-latest:
49-
runs-on: macOS-latest
50-
51-
strategy:
52-
matrix:
53-
destination: ['generic/platform=macOS', 'generic/platform=iOS', 'generic/platform=tvOS']
54-
55-
steps:
56-
- name: Clone
57-
id: checkout
58-
uses: actions/checkout@v6
59-
60-
- name: ccache
61-
uses: hendrikmuhs/ccache-action@v1.2.16
62-
with:
63-
key: macOS-latest-swift
64-
evict-old-files: 1d
65-
66-
- name: Dependencies
67-
run: |
68-
brew update
69-
cmake --version
70-
brew install sdl2
71-
72-
- name: Build
73-
run: |
74-
sysctl -a
75-
cmake -B build -G Xcode \
76-
-DGGML_METAL_USE_BF16=ON \
77-
-DGGML_METAL_EMBED_LIBRARY=ON \
78-
-DWHISPER_BUILD_EXAMPLES=OFF \
79-
-DWHISPER_BUILD_TESTS=OFF \
80-
-DWHISPER_BUILD_SERVER=OFF \
81-
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
82-
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
83-
84-
8549
# freeBSD-latest:
8650
# runs-on: macos-13
8751
#

0 commit comments

Comments
 (0)