Skip to content

Commit e5eae54

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

2 files changed

Lines changed: 130 additions & 94 deletions

File tree

.github/workflows/build-gcc.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: CI (gcc)
2+
3+
on:
4+
workflow_dispatch: # allows manual triggering
5+
push:
6+
branches:
7+
- master
8+
paths: ['.github/workflows/build-gcc.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+
env:
34+
ubuntu_image: "ubuntu:22.04"
35+
36+
jobs:
37+
ubuntu-22-gcc:
38+
runs-on: ubuntu-22.04
39+
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
build: [Debug, Release]
44+
arch: [linux/amd64, linux/ppc64le]
45+
46+
steps:
47+
- name: Clone
48+
uses: actions/checkout@v6
49+
50+
- name: Set up QEMU
51+
uses: docker/setup-qemu-action@v3
52+
53+
- name: Build ${{ matrix.arch }}
54+
run: |
55+
docker run --platform ${{ matrix.arch }} --rm \
56+
-v ${{ github.workspace }}:/workspace \
57+
-w /workspace ${{ env.ubuntu_image }} /bin/sh -c '
58+
set -e
59+
export DEBIAN_FRONTEND=noninteractive
60+
sed -i "s|archive.ubuntu.com|mirrors.kernel.org|g" /etc/apt/sources.list
61+
sed -i "s|security.ubuntu.com|mirrors.kernel.org|g" /etc/apt/sources.list
62+
63+
apt update
64+
apt install -y build-essential cmake libsdl2-dev git
65+
cmake . -DWHISPER_SDL2=ON -DCMAKE_BUILD_TYPE=${{ matrix.build }}
66+
make
67+
ctest -L gh --output-on-failure'
68+
69+
ubuntu-22-gcc-arm64:
70+
runs-on: ubuntu-22.04-arm
71+
72+
strategy:
73+
fail-fast: false
74+
matrix:
75+
build: [Debug, Release]
76+
77+
steps:
78+
- name: Clone
79+
uses: actions/checkout@v6
80+
81+
- name: Install dependencies
82+
run: |
83+
sudo apt-get update
84+
sudo apt-get install -y build-essential cmake libsdl2-dev git
85+
86+
- name: Configure CMake
87+
run: |
88+
cmake . \
89+
-DWHISPER_SDL2=ON \
90+
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
91+
-DGGML_NATIVE=OFF \
92+
-DGGML_CPU_ARM_ARCH=armv8-a
93+
94+
- name: Build and Test
95+
run: |
96+
make
97+
ctest -L gh --output-on-failure
98+
99+
ubuntu-22-gcc-arm-v7:
100+
runs-on: ubuntu-22.04
101+
102+
strategy:
103+
fail-fast: false
104+
matrix:
105+
build: [Debug, Release]
106+
arch: [linux/arm/v7]
107+
108+
steps:
109+
- name: Clone
110+
uses: actions/checkout@v6
111+
112+
- name: Set up QEMU
113+
uses: docker/setup-qemu-action@v3
114+
115+
- name: Build ${{ matrix.arch }}
116+
run: |
117+
docker run --platform ${{ matrix.arch }} --rm \
118+
-v ${{ github.workspace }}:/workspace \
119+
-w /workspace ${{ env.ubuntu_image }} /bin/sh -c '
120+
set -e
121+
export DEBIAN_FRONTEND=noninteractive
122+
sed -i "s|archive.ubuntu.com|mirrors.kernel.org|g" /etc/apt/sources.list
123+
sed -i "s|security.ubuntu.com|mirrors.kernel.org|g" /etc/apt/sources.list
124+
125+
apt update
126+
apt install -y build-essential cmake libsdl2-dev git
127+
cmake . -DWHISPER_SDL2=ON -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv7-a+fp
128+
make
129+
ctest -L gh --output-on-failure'

.github/workflows/build.yml

Lines changed: 1 addition & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ on:
3636
- '.github/workflows/build-sanitize.yml' # handled by build-sanitize.yml
3737
- '.github/workflows/build-linux.yml' # handled by build-linux.yml
3838
- '.github/workflows/build-macos.yml' # handled by build-macos.yml
39+
- '.github/workflows/build-gcc.yml' # handled by build-gcc.yml
3940

4041
concurrency:
4142
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
@@ -64,100 +65,6 @@ jobs:
6465
# cmake -B build
6566
# cmake --build build --config Release
6667

67-
ubuntu-22-gcc:
68-
runs-on: ubuntu-22.04
69-
70-
strategy:
71-
fail-fast: false
72-
matrix:
73-
build: [Debug, Release]
74-
arch: [linux/amd64, linux/ppc64le]
75-
76-
steps:
77-
- name: Clone
78-
uses: actions/checkout@v6
79-
80-
- name: Set up QEMU
81-
uses: docker/setup-qemu-action@v3
82-
83-
- name: Build ${{ matrix.arch }}
84-
run: |
85-
docker run --platform ${{ matrix.arch }} --rm \
86-
-v ${{ github.workspace }}:/workspace \
87-
-w /workspace ${{ env.ubuntu_image }} /bin/sh -c '
88-
set -e
89-
export DEBIAN_FRONTEND=noninteractive
90-
sed -i "s|archive.ubuntu.com|mirrors.kernel.org|g" /etc/apt/sources.list
91-
sed -i "s|security.ubuntu.com|mirrors.kernel.org|g" /etc/apt/sources.list
92-
93-
apt update
94-
apt install -y build-essential cmake libsdl2-dev git
95-
cmake . -DWHISPER_SDL2=ON -DCMAKE_BUILD_TYPE=${{ matrix.build }}
96-
make
97-
ctest -L gh --output-on-failure'
98-
99-
ubuntu-22-gcc-arm64:
100-
runs-on: ubuntu-22.04-arm
101-
102-
strategy:
103-
fail-fast: false
104-
matrix:
105-
build: [Debug, Release]
106-
107-
steps:
108-
- name: Clone
109-
uses: actions/checkout@v6
110-
111-
- name: Install dependencies
112-
run: |
113-
sudo apt-get update
114-
sudo apt-get install -y build-essential cmake libsdl2-dev git
115-
116-
- name: Configure CMake
117-
run: |
118-
cmake . \
119-
-DWHISPER_SDL2=ON \
120-
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
121-
-DGGML_NATIVE=OFF \
122-
-DGGML_CPU_ARM_ARCH=armv8-a
123-
124-
- name: Build and Test
125-
run: |
126-
make
127-
ctest -L gh --output-on-failure
128-
129-
ubuntu-22-gcc-arm-v7:
130-
runs-on: ubuntu-22.04
131-
132-
strategy:
133-
fail-fast: false
134-
matrix:
135-
build: [Debug, Release]
136-
arch: [linux/arm/v7]
137-
138-
steps:
139-
- name: Clone
140-
uses: actions/checkout@v6
141-
142-
- name: Set up QEMU
143-
uses: docker/setup-qemu-action@v3
144-
145-
- name: Build ${{ matrix.arch }}
146-
run: |
147-
docker run --platform ${{ matrix.arch }} --rm \
148-
-v ${{ github.workspace }}:/workspace \
149-
-w /workspace ${{ env.ubuntu_image }} /bin/sh -c '
150-
set -e
151-
export DEBIAN_FRONTEND=noninteractive
152-
sed -i "s|archive.ubuntu.com|mirrors.kernel.org|g" /etc/apt/sources.list
153-
sed -i "s|security.ubuntu.com|mirrors.kernel.org|g" /etc/apt/sources.list
154-
155-
apt update
156-
apt install -y build-essential cmake libsdl2-dev git
157-
cmake . -DWHISPER_SDL2=ON -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv7-a+fp
158-
make
159-
ctest -L gh --output-on-failure'
160-
16168
ubuntu-22-clang:
16269
runs-on: ubuntu-22.04
16370

0 commit comments

Comments
 (0)