ggerganov commited on
Commit
31f91d9
·
1 Parent(s): 0211dda

ci : fix arm builds

Browse files
.github/workflows/build.yml CHANGED
@@ -1,5 +1,15 @@
1
  name: CI
2
- on: [push, pull_request]
 
 
 
 
 
 
 
 
 
 
3
 
4
  env:
5
  ubuntu_image: "ubuntu:22.04"
@@ -12,7 +22,7 @@ jobs:
12
  strategy:
13
  fail-fast: false
14
  matrix:
15
- arch: [linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le]
16
 
17
  steps:
18
  - name: Clone
@@ -32,6 +42,58 @@ jobs:
32
  cmake -B build
33
  cmake --build build --config Release -j $(nproc)'
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  macOS-latest:
36
  runs-on: macOS-latest
37
 
@@ -74,7 +136,7 @@ jobs:
74
  fail-fast: false
75
  matrix:
76
  build: [Debug, Release]
77
- arch: [linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le]
78
 
79
  steps:
80
  - name: Clone
@@ -95,6 +157,62 @@ jobs:
95
  make
96
  ctest -L gh --output-on-failure'
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  ubuntu-latest-clang:
99
  runs-on: ubuntu-latest
100
 
 
1
  name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ types: [opened, synchronize, reopened]
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
12
+ cancel-in-progress: true
13
 
14
  env:
15
  ubuntu_image: "ubuntu:22.04"
 
22
  strategy:
23
  fail-fast: false
24
  matrix:
25
+ arch: [linux/amd64, linux/ppc64le]
26
 
27
  steps:
28
  - name: Clone
 
42
  cmake -B build
43
  cmake --build build --config Release -j $(nproc)'
44
 
45
+ ubuntu-latest-arm64:
46
+ runs-on: ubuntu-latest-arm64
47
+
48
+ strategy:
49
+ fail-fast: false
50
+ matrix:
51
+ arch: [linux/arm64, linux/arm/v7]
52
+
53
+ steps:
54
+ - name: Clone
55
+ uses: actions/checkout@v4
56
+
57
+ - name: Set up QEMU
58
+ uses: docker/setup-qemu-action@v3
59
+
60
+ - name: Build ${{ matrix.arch }}
61
+ run: |
62
+ docker run --platform ${{ matrix.arch }} --rm \
63
+ -v ${{ github.workspace }}:/workspace \
64
+ -w /workspace ${{ env.ubuntu_image }} /bin/sh -c '
65
+ set -e
66
+ apt update
67
+ apt install -y build-essential libsdl2-dev cmake
68
+ cmake -B build -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv8-a
69
+ cmake --build build --config Release -j $(nproc)'
70
+
71
+ ubuntu-latest-arm-v7:
72
+ runs-on: ubuntu-latest-arm-v7
73
+
74
+ strategy:
75
+ fail-fast: false
76
+ matrix:
77
+ arch: [linux/arm64, linux/arm/v7]
78
+
79
+ steps:
80
+ - name: Clone
81
+ uses: actions/checkout@v4
82
+
83
+ - name: Set up QEMU
84
+ uses: docker/setup-qemu-action@v3
85
+
86
+ - name: Build ${{ matrix.arch }}
87
+ run: |
88
+ docker run --platform ${{ matrix.arch }} --rm \
89
+ -v ${{ github.workspace }}:/workspace \
90
+ -w /workspace ${{ env.ubuntu_image }} /bin/sh -c '
91
+ set -e
92
+ apt update
93
+ apt install -y build-essential libsdl2-dev cmake
94
+ cmake -B build -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv7-a+fp
95
+ cmake --build build --config Release -j $(nproc)'
96
+
97
  macOS-latest:
98
  runs-on: macOS-latest
99
 
 
136
  fail-fast: false
137
  matrix:
138
  build: [Debug, Release]
139
+ arch: [linux/amd64, linux/ppc64le]
140
 
141
  steps:
142
  - name: Clone
 
157
  make
158
  ctest -L gh --output-on-failure'
159
 
160
+ ubuntu-latest-gcc-arm64:
161
+ runs-on: ubuntu-latest
162
+
163
+ strategy:
164
+ fail-fast: false
165
+ matrix:
166
+ build: [Debug, Release]
167
+ arch: [linux/arm64]
168
+
169
+ steps:
170
+ - name: Clone
171
+ uses: actions/checkout@v4
172
+
173
+ - name: Set up QEMU
174
+ uses: docker/setup-qemu-action@v3
175
+
176
+ - name: Build ${{ matrix.arch }}
177
+ run: |
178
+ docker run --platform ${{ matrix.arch }} --rm \
179
+ -v ${{ github.workspace }}:/workspace \
180
+ -w /workspace ${{ env.ubuntu_image }} /bin/sh -c '
181
+ set -e
182
+ apt update
183
+ apt install -y build-essential cmake libsdl2-dev
184
+ cmake . -DWHISPER_SDL2=ON -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv8-a
185
+ make
186
+ ctest -L gh --output-on-failure'
187
+
188
+ ubuntu-latest-gcc-arm-v7:
189
+ runs-on: ubuntu-latest
190
+
191
+ strategy:
192
+ fail-fast: false
193
+ matrix:
194
+ build: [Debug, Release]
195
+ arch: [linux/arm/v7]
196
+
197
+ steps:
198
+ - name: Clone
199
+ uses: actions/checkout@v4
200
+
201
+ - name: Set up QEMU
202
+ uses: docker/setup-qemu-action@v3
203
+
204
+ - name: Build ${{ matrix.arch }}
205
+ run: |
206
+ docker run --platform ${{ matrix.arch }} --rm \
207
+ -v ${{ github.workspace }}:/workspace \
208
+ -w /workspace ${{ env.ubuntu_image }} /bin/sh -c '
209
+ set -e
210
+ apt update
211
+ apt install -y build-essential cmake libsdl2-dev
212
+ cmake . -DWHISPER_SDL2=ON -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv7-a+fp
213
+ make
214
+ ctest -L gh --output-on-failure'
215
+
216
  ubuntu-latest-clang:
217
  runs-on: ubuntu-latest
218
 
.github/workflows/docker.yml CHANGED
@@ -17,7 +17,7 @@ jobs:
17
  strategy:
18
  matrix:
19
  config:
20
- - { tag: "main", dockerfile: ".devops/main.Dockerfile", platform: "linux/amd64,linux/arm64" }
21
  #TODO: the cuda image keeps failing - disable for now
22
  # https://github.com/ggerganov/whisper.cpp/actions/runs/11019444428/job/30602020339
23
  #- { tag: "main-cuda", dockerfile: ".devops/main-cuda.Dockerfile", platform: "linux/amd64" }
 
17
  strategy:
18
  matrix:
19
  config:
20
+ - { tag: "main", dockerfile: ".devops/main.Dockerfile", platform: "linux/amd64" }
21
  #TODO: the cuda image keeps failing - disable for now
22
  # https://github.com/ggerganov/whisper.cpp/actions/runs/11019444428/job/30602020339
23
  #- { tag: "main-cuda", dockerfile: ".devops/main-cuda.Dockerfile", platform: "linux/amd64" }