Skip to content

Commit 9366544

Browse files
committed
ci : fix arm builds
1 parent 9558394 commit 9366544

File tree

2 files changed

+122
-4
lines changed

2 files changed

+122
-4
lines changed

.github/workflows/build.yml

Lines changed: 121 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
name: CI
2-
on: [push, pull_request]
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
313

414
env:
515
ubuntu_image: "ubuntu:22.04"
@@ -12,7 +22,7 @@ jobs:
1222
strategy:
1323
fail-fast: false
1424
matrix:
15-
arch: [linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le]
25+
arch: [linux/amd64, linux/ppc64le]
1626

1727
steps:
1828
- name: Clone
@@ -32,6 +42,58 @@ jobs:
3242
cmake -B build
3343
cmake --build build --config Release -j $(nproc)'
3444
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+
3597
macOS-latest:
3698
runs-on: macOS-latest
3799

@@ -74,7 +136,7 @@ jobs:
74136
fail-fast: false
75137
matrix:
76138
build: [Debug, Release]
77-
arch: [linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le]
139+
arch: [linux/amd64, linux/ppc64le]
78140

79141
steps:
80142
- name: Clone
@@ -95,6 +157,62 @@ jobs:
95157
make
96158
ctest -L gh --output-on-failure'
97159
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+
98216
ubuntu-latest-clang:
99217
runs-on: ubuntu-latest
100218

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
config:
20-
- { tag: "main", dockerfile: ".devops/main.Dockerfile", platform: "linux/amd64,linux/arm64" }
20+
- { tag: "main", dockerfile: ".devops/main.Dockerfile", platform: "linux/amd64" }
2121
#TODO: the cuda image keeps failing - disable for now
2222
# https://github.com/ggerganov/whisper.cpp/actions/runs/11019444428/job/30602020339
2323
#- { tag: "main-cuda", dockerfile: ".devops/main-cuda.Dockerfile", platform: "linux/amd64" }

0 commit comments

Comments
 (0)