Skip to content

Commit 9911f7c

Browse files
committed
ci : extract android jobs into build-android.yml
1 parent 08114fd commit 9911f7c

2 files changed

Lines changed: 81 additions & 54 deletions

File tree

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: CI (android)
2+
3+
on:
4+
workflow_dispatch: # allows manual triggering
5+
push:
6+
branches:
7+
- master
8+
paths: ['.github/workflows/build-android.yml',
9+
'**/CMakeLists.txt',
10+
'**/*.h',
11+
'**/*.hpp',
12+
'**/*.c',
13+
'**/*.cpp',
14+
'**/*.java']
15+
16+
pull_request:
17+
types: [opened, synchronize, reopened]
18+
paths-ignore:
19+
- 'bindings/ruby/**' # handled by bindings-ruby.yml
20+
- 'bindings/go/**' # handled by bindings-go.yml
21+
- 'examples/addon.node/**' # handled by examples.yml
22+
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
25+
cancel-in-progress: true
26+
27+
jobs:
28+
android:
29+
runs-on: ubuntu-22.04
30+
31+
steps:
32+
- name: Clone
33+
uses: actions/checkout@v6
34+
with:
35+
path: whisper
36+
37+
- name: Install Java
38+
uses: actions/setup-java@v5
39+
with:
40+
distribution: zulu
41+
java-version: 21
42+
43+
- name: Setup Android SDK
44+
uses: android-actions/setup-android@v3
45+
46+
- name: Build
47+
run: |
48+
cd whisper/examples/whisper.android
49+
./gradlew assembleRelease --no-daemon
50+
51+
- name: Build with external ggml
52+
run: |
53+
export PATH_TO_GGML=$PWD/ggml
54+
cd whisper/examples/whisper.android
55+
./gradlew assembleRelease --no-daemon
56+
57+
android_java:
58+
runs-on: ubuntu-22.04
59+
60+
steps:
61+
- name: Clone
62+
uses: actions/checkout@v6
63+
64+
- name: set up JDK 11
65+
uses: actions/setup-java@v5
66+
with:
67+
java-version: '11'
68+
distribution: 'temurin'
69+
cache: gradle
70+
71+
- name: Setup Android SDK
72+
uses: android-actions/setup-android@v3
73+
with:
74+
cmdline-tools-version: 9.0
75+
76+
- name: Build
77+
run: |
78+
cd examples/whisper.android.java
79+
chmod +x ./gradlew
80+
./gradlew assembleRelease

.github/workflows/build.yml

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ on:
4141
- '.github/workflows/build-sycl.yml' # handled by build-sycl.yml
4242
- '.github/workflows/build-windows.yml' # handled by build-windows.yml
4343
- '.github/workflows/build-wasm.yml' # handled by build-wasm.yml
44+
- '.github/workflows/build-android.yml' # handled by build-android.yml
4445

4546
concurrency:
4647
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
@@ -69,60 +70,6 @@ jobs:
6970
# cmake -B build
7071
# cmake --build build --config Release
7172

72-
android:
73-
runs-on: ubuntu-22.04
74-
75-
steps:
76-
- name: Clone
77-
uses: actions/checkout@v6
78-
with:
79-
path: whisper
80-
81-
- name: Install Java
82-
uses: actions/setup-java@v5
83-
with:
84-
distribution: zulu
85-
java-version: 21
86-
87-
- name: Setup Android SDK
88-
uses: android-actions/setup-android@v3
89-
90-
- name: Build
91-
run: |
92-
cd whisper/examples/whisper.android
93-
./gradlew assembleRelease --no-daemon
94-
95-
- name: Build with external ggml
96-
run: |
97-
export PATH_TO_GGML=$PWD/ggml
98-
cd whisper/examples/whisper.android
99-
./gradlew assembleRelease --no-daemon
100-
101-
android_java:
102-
runs-on: ubuntu-22.04
103-
104-
steps:
105-
- name: Clone
106-
uses: actions/checkout@v6
107-
108-
- name: set up JDK 11
109-
uses: actions/setup-java@v5
110-
with:
111-
java-version: '11'
112-
distribution: 'temurin'
113-
cache: gradle
114-
115-
- name: Setup Android SDK
116-
uses: android-actions/setup-android@v3
117-
with:
118-
cmdline-tools-version: 9.0
119-
120-
- name: Build
121-
run: |
122-
cd examples/whisper.android.java
123-
chmod +x ./gradlew
124-
./gradlew assembleRelease
125-
12673
quantize:
12774
runs-on: ubuntu-22.04
12875

0 commit comments

Comments
 (0)