Skip to content

Commit 8f320dd

Browse files
committed
Add Android CI
1 parent 65155e0 commit 8f320dd

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,32 @@ on:
1313
- main
1414

1515
jobs:
16+
build-android:
17+
runs-on: ubuntu-latest
18+
container:
19+
image: saschpe/android-ndk:35-jdk23.0.2_7-ndk28.0.13004108-cmake3.31.5
20+
21+
steps:
22+
- name: Install dependencies
23+
run: |
24+
export CMAKE_TOOLCHAIN_FILE=/opt/android-sdk-linux/ndk/28.0.13004108/build/cmake/android.toolchain.cmake
25+
export PATH="/opt/android-sdk-linux/cmake/3.31.5/bin/:/opt/android-sdk-linux/ndk/28.0.13004108/prebuilt/linux-x86_64/bin/:$PATH"
26+
export CMAKE_GENERATOR="Ninja"
27+
git clone https://github.com/gabime/spdlog && cd spdlog && cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/android-sdk-linux/ndk/28.0.13004108/prebuilt/linux-x86_64/ && cd build && ninja install
28+
git clone https://github.com/KDAB/KDBindings && cd KDBindings && cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/android-sdk-linux/ndk/28.0.13004108/prebuilt/linux-x86_64/ && cd build && ninja install
29+
30+
- name: Checkout sources
31+
uses: actions/checkout@v4
32+
with:
33+
submodules: true
34+
35+
- name: Build KDUtils
36+
run: |
37+
export CMAKE_TOOLCHAIN_FILE=/opt/android-sdk-linux/ndk/28.0.13004108/build/cmake/android.toolchain.cmake
38+
export PATH="/opt/android-sdk-linux/cmake/3.31.5/bin/:/opt/android-sdk-linux/ndk/28.0.13004108/prebuilt/linux-x86_64/bin/:$PATH"
39+
export CMAKE_GENERATOR="Ninja"
40+
cmake -S . -B build -DANDROID=ON -DKDUTILS_USE_EXTERNAL_DEPENDENCIES=ON && cmake --build build
41+
1642
build:
1743
runs-on: ${{ matrix.os }}
1844
strategy:

0 commit comments

Comments
 (0)