Skip to content

Commit

Permalink
ci : try to fix arm builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Jan 3, 2025
1 parent 1deb9a6 commit 6cc8c9d
Showing 1 changed file with 120 additions and 2 deletions.
122 changes: 120 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
name: CI
on: [push, pull_request]

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true

env:
ubuntu_image: "ubuntu:22.04"
Expand All @@ -12,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le]
arch: [linux/amd64, linux/ppc64le]

steps:
- name: Clone
Expand All @@ -32,6 +42,58 @@ jobs:
cmake -B build
cmake --build build --config Release -j $(nproc)'
ubuntu-latest-arm64:
runs-on: ubuntu-latest-arm64

strategy:
fail-fast: false
matrix:
arch: [linux/arm64, linux/arm/v7]

steps:
- name: Clone
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Build ${{ matrix.arch }}
run: |
docker run --platform ${{ matrix.arch }} --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace ${{ env.ubuntu_image }} /bin/sh -c '
set -e
apt update
apt install -y build-essential libsdl2-dev cmake
cmake -B build -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv8-a
cmake --build build --config Release -j $(nproc)'
ubuntu-latest-arm-v7:
runs-on: ubuntu-latest-arm-v7

strategy:
fail-fast: false
matrix:
arch: [linux/arm64, linux/arm/v7]

steps:
- name: Clone
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Build ${{ matrix.arch }}
run: |
docker run --platform ${{ matrix.arch }} --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace ${{ env.ubuntu_image }} /bin/sh -c '
set -e
apt update
apt install -y build-essential libsdl2-dev cmake
cmake -B build -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv7-a
cmake --build build --config Release -j $(nproc)'
macOS-latest:
runs-on: macOS-latest

Expand Down Expand Up @@ -95,6 +157,62 @@ jobs:
make
ctest -L gh --output-on-failure'
ubuntu-latest-gcc-arm64:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
build: [Debug, Release]
arch: [linux/arm64]

steps:
- name: Clone
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Build ${{ matrix.arch }}
run: |
docker run --platform ${{ matrix.arch }} --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace ${{ env.ubuntu_image }} /bin/sh -c '
set -e
apt update
apt install -y build-essential cmake libsdl2-dev
cmake . -DWHISPER_SDL2=ON -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv8-a
make
ctest -L gh --output-on-failure'
ubuntu-latest-gcc-arm-v7:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
build: [Debug, Release]
arch: [linux/arm/v7]

steps:
- name: Clone
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Build ${{ matrix.arch }}
run: |
docker run --platform ${{ matrix.arch }} --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace ${{ env.ubuntu_image }} /bin/sh -c '
set -e
apt update
apt install -y build-essential cmake libsdl2-dev
cmake . -DWHISPER_SDL2=ON -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv7-a
make
ctest -L gh --output-on-failure'
ubuntu-latest-clang:
runs-on: ubuntu-latest

Expand Down

0 comments on commit 6cc8c9d

Please sign in to comment.