Skip to content

Commit e96d9c7

Browse files
ci: Seperate builds for x86_64 and aarch64 linux
1 parent 812807c commit e96d9c7

2 files changed

Lines changed: 35 additions & 9 deletions

File tree

.github/workflows/linux-native-build-cont.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55

66
jobs:
7-
linux-native-build:
7+
linux-x64-build:
88
runs-on: ubuntu-latest
99

1010
steps:
@@ -19,7 +19,7 @@ jobs:
1919
path: whisper.cpp
2020

2121
- name: Build Docker Image
22-
run: docker build -t linux-native-build -f linux-Dockerfile .
22+
run: docker build -t linux-x64-build -f linux-Dockerfile .
2323

2424
- name: Create output directory
2525
run: mkdir -p ./artifacts
@@ -29,11 +29,41 @@ jobs:
2929
docker run --rm \
3030
-v $(pwd):/build \
3131
-v $(pwd)/artifacts:/build/runtimes \
32-
linux-native-build
32+
linux-x64-build
3333
34-
- name: Upload Linux Build Artifacts
34+
- name: Upload Build Artifacts
3535
uses: actions/upload-artifact@v4
3636
with:
3737
name: linux-build
3838
path: ./artifacts
3939
retention-days: 7
40+
41+
linux-aarch64-build:
42+
runs-on: ubuntu-20.04
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
48+
- name: Checkout whisper.cpp
49+
uses: actions/checkout@v4
50+
with:
51+
repository: ggerganov/whisper.cpp
52+
ref: v1.7.2
53+
path: whisper.cpp
54+
55+
- name: Install cross-compilation toolchains
56+
run: |
57+
sudo apt-get update
58+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
59+
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
60+
61+
- name: Build Linux Native Libraries
62+
run: make linux_aarch64
63+
64+
- name: Upload Linux Build Artifacts
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: linux-build
68+
path: runtimes/linux-*/*
69+
retention-days: 7

linux-Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ RUN apt-get update && \
1010
git \
1111
wget \
1212
software-properties-common \
13-
gcc-aarch64-linux-gnu \
14-
g++-aarch64-linux-gnu \
15-
gcc-arm-linux-gnueabihf \
16-
g++-arm-linux-gnueabihf \
1713
gpg \
1814
ca-certificates \
1915
curl \
@@ -30,4 +26,4 @@ RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/nul
3026
WORKDIR /build
3127

3228
# Default command (can be overridden)
33-
CMD ["make", "linux"]
29+
CMD ["make", "linux_x64"]

0 commit comments

Comments
 (0)