Skip to content

Commit cf98625

Browse files
committed
fix android project path
1 parent 8c2c28d commit cf98625

File tree

2 files changed

+46
-47
lines changed

2 files changed

+46
-47
lines changed

.github/workflows/android.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

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

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
- '**/*CMakeLists*.txt'
1919
- '**/*CMakePresets.json'
2020
- '.github/workflows/**'
21+
- 'android-project/**'
2122
pull_request:
2223
branches: ["main"]
2324
paths:
@@ -35,6 +36,7 @@ on:
3536
- '**/*CMakeLists*.txt'
3637
- '**/CMakePresets.json'
3738
- '.github/workflows/**'
39+
- 'android-project/**'
3840

3941
jobs:
4042
build-package:
@@ -93,3 +95,47 @@ jobs:
9395
name: ${{ matrix.os }}-${{ matrix.preset }}-rpm
9496
path: build/*/*.rpm
9597
if-no-files-found: ignore
98+
99+
build-apk:
100+
runs-on: ubuntu-latest
101+
102+
strategy:
103+
matrix:
104+
# todo: setup keys for release
105+
# todo: add multi arch build (64 bit)
106+
build-type: [debug] # todo: relese
107+
abi: [x86_64] # todo: arm64-v8a
108+
include:
109+
- build-type: debug
110+
gradle-task: assembleDebug
111+
112+
env:
113+
ANDROID_PROJECT_DIR: android-project
114+
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=true -Dorg.gradle.configureondemand=true
115+
CMAKE_BUILD_PARALLEL_LEVEL: 8
116+
117+
steps:
118+
- uses: actions/checkout@v4
119+
120+
- name: Set up JDK 17
121+
uses: actions/setup-java@v4
122+
with:
123+
java-version: "17"
124+
distribution: "temurin"
125+
cache: gradle
126+
127+
- name: make gradlew executable
128+
run: chmod +x "${{ env.ANDROID_PROJECT_DIR }}/gradlew"
129+
130+
- name: build android ${{ matrix.build-type }} (${{ matrix.abi }})
131+
working-directory: ${{ env.ANDROID_PROJECT_DIR }}
132+
run: |
133+
./gradlew --no-daemon --stacktrace clean :app:${{ matrix.gradle-task }} \
134+
-Pandroid.injected.build.abi=${{ matrix.abi }}
135+
136+
- name: Upload APK artifacts
137+
uses: actions/upload-artifact@v4
138+
with:
139+
name: android-${{ matrix.abi }}-${{ matrix.build-type }}-apk
140+
path: |
141+
${{ env.ANDROID_PROJECT_DIR }}/app/build/intermediates/apk/${{ matrix.build-type }}/*.apk

0 commit comments

Comments
 (0)