Skip to content

Commit 594d06f

Browse files
committed
fix(build): consolidate Linux build configurations and install steps
1 parent b73a1e3 commit 594d06f

1 file changed

Lines changed: 10 additions & 55 deletions

File tree

.github/workflows/main.yml

Lines changed: 10 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -15,55 +15,14 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
include:
18-
# Linux builds
1918
- os: ubuntu-latest
2019
arch: x86_64
21-
name: linux-cpu
22-
make: LLAMA="-DGGML_NATIVE=ON"
23-
- os: ubuntu-latest
24-
arch: x86_64
25-
name: linux-cpu-avx2
26-
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_AVX2=ON -DGGML_FMA=ON -DGGML_F16C=ON"
27-
- os: ubuntu-latest
28-
arch: x86_64
29-
name: linux-cpu-avx512
30-
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_AVX512=ON -DGGML_AVX512_VNNI=ON"
31-
- os: ubuntu-latest
32-
arch: x86_64
33-
name: linux-openblas
34-
make: LLAMA="-DGGML_NATIVE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS"
35-
- os: ubuntu-latest
36-
arch: x86_64
37-
name: linux-vulkan
38-
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_VULKAN=ON"
39-
- os: ubuntu-latest
40-
arch: x86_64
41-
name: linux-opencl
42-
make: LLAMA="-DGGML_NATIVE=ON -DGGML_OPENCL=ON"
43-
44-
# Linux ARM64 builds
20+
name: linux
21+
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_CPU_ALL_VARIANTS=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DGGML_VULKAN=ON -DGGML_OPENCL=ON"
4522
- os: LinuxARM64
4623
arch: arm64
47-
name: linux-cpu
48-
make: LLAMA="-DGGML_NATIVE=ON"
49-
- os: LinuxARM64
50-
arch: arm64
51-
name: linux-neon
52-
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv8.2-a"
53-
- os: LinuxARM64
54-
arch: arm64
55-
name: linux-openblas
56-
make: LLAMA="-DGGML_NATIVE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS"
57-
- os: LinuxARM64
58-
arch: arm64
59-
name: linux-vulkan
60-
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_VULKAN=ON"
61-
- os: LinuxARM64
62-
arch: arm64
63-
name: linux-opencl
64-
make: LLAMA="-DGGML_NATIVE=ON -DGGML_OPENCL=ON"
65-
66-
# macOS builds
24+
name: linux
25+
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_CPU_ALL_VARIANTS=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DGGML_VULKAN=ON -DGGML_OPENCL=ON"
6726
- os: macos-latest
6827
name: macos
6928
make: LLAMA="-DGGML_NATIVE=ON -DGGML_METAL=ON -DGGML_ACCELERATE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=Apple" WHISPER="-DGGML_METAL=ON -DGGML_ACCELERATE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=Apple -DWHISPER_COREML=ON -DWHISPER_COREML_ALLOW_FALLBACK=ON"
@@ -191,16 +150,12 @@ jobs:
191150
${{ matrix.name == 'windows-opencl' && 'mingw-w64-x86_64-opencl-headers' || '' }}
192151
${{ matrix.name == 'windows-opencl' && 'mingw-w64-x86_64-opencl-icd' || '' }}
193152
194-
- name: linux install openblas
195-
if: matrix.name == 'linux-openblas'
196-
run: sudo apt-get install -y libopenblas-dev
197-
198-
- name: linux install opencl
199-
if: matrix.name == 'linux-opencl'
200-
run: sudo apt-get install -y opencl-headers ocl-icd-opencl-dev
153+
- name: linux install openblas and opencl
154+
if: matrix.name == 'linux'
155+
run: sudo apt-get install -y libopenblas-dev opencl-headers ocl-icd-opencl-dev
201156

202157
- name: linux-x86_64 install vulkan
203-
if: matrix.name == 'linux-vulkan' && matrix.arch == 'x86_64'
158+
if: matrix.name == 'linux' && matrix.arch == 'x86_64'
204159
run: |
205160
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
206161
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
@@ -217,7 +172,7 @@ jobs:
217172
echo "VK_ADD_LAYER_PATH=$VK_ADD_LAYER_PATH" >> $GITHUB_ENV
218173
219174
- name: linux-arm64 install vulkan
220-
if: matrix.name == 'linux-vulkan' && matrix.arch == 'arm64'
175+
if: matrix.name == 'linux' && matrix.arch == 'arm64'
221176
run: |
222177
sudo dpkg --add-architecture arm64
223178
@@ -596,7 +551,7 @@ jobs:
596551
shell: msys2 {0}
597552

598553
- name: test sqlite-ai
599-
if: startsWith(matrix.name, 'linux-') || matrix.name == 'macos'
554+
if: matrix.name == 'linux' || matrix.name == 'macos'
600555
run: make test
601556

602557
- uses: actions/upload-artifact@v4.6.2

0 commit comments

Comments
 (0)