Skip to content

Commit 90c49ee

Browse files
committed
added android ci cd build
1 parent e0472ce commit 90c49ee

File tree

3 files changed

+54
-2
lines changed

3 files changed

+54
-2
lines changed

.github/workflows/android.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: android-build
2+
3+
# todo: maybe trigger on c++ changes?
4+
on:
5+
push:
6+
branches: ["main"]
7+
paths:
8+
- "android-project/**"
9+
- ".github/workflows/android.yml"
10+
pull_request:
11+
branches: ["main"]
12+
paths:
13+
- "android-project/**"
14+
- ".github/workflows/android.yml"
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
# todo: setup keys for release
23+
# todo: add multi arch build (64 bit)
24+
build-type: [debug]
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Set up JDK 17
30+
uses: actions/setup-java@v4
31+
with:
32+
java-version: "17"
33+
distribution: "temurin"
34+
cache: gradle
35+
36+
- name: Cd to project
37+
run: cd android-project
38+
39+
- name: Grant execute permission for gradlew
40+
run: chmod +x gradlew
41+
42+
- name: Build with Gradle
43+
run: ./gradlew --no-daemon --stacktrace clean :app:assembleRelease -Pandroid.injected.build.abi=x86_64
44+
45+
- name: Upload APK artifacts
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: android-x86_64-${{ matrix.build-type }}-apk
49+
path: |
50+
app/build/intermediates/apk/**/*.apk

.github/workflows/cmake-multi-platform.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: cmake-multiplatform-workflow
1+
name: cmake-desktop-multiplatform-workflow
22

33
on:
44
push:
@@ -39,6 +39,8 @@ on:
3939
jobs:
4040
build-package:
4141
runs-on: ${{ matrix.os }}
42+
env:
43+
CMAKE_BUILD_PARALLEL_LEVEL: "8"
4244
strategy:
4345
fail-fast: false
4446
matrix:

android-project/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ android {
7676
externalNativeBuild {
7777
cmake {
7878
path = file('../../CMakeLists.txt')
79-
version = "3.31.6"
79+
version = "3.31.6+"
8080
}
8181
}
8282
}

0 commit comments

Comments
 (0)