Skip to content

Commit 2aa3bee

Browse files
committed
Add Android CI
1 parent 65155e0 commit 2aa3bee

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,33 @@ 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+
git clone https://github.com/gabime/spdlog && cd spdlog && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/opt/android-sdk-linux/ndk/28.0.13004108/prebuilt/linux-x86_64/ .. && make -j `nproc` && make install
27+
git clone https://github.com/KDAB/KDBindings && cd KDBindings && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/opt/android-sdk-linux/ndk/28.0.13004108/prebuilt/linux-x86_64/ .. && make -j `nproc` && make install
28+
29+
- name: Checkout sources
30+
uses: actions/checkout@v4
31+
with:
32+
submodules: true
33+
34+
- name: Build KDUtils
35+
run: |
36+
export CMAKE_TOOLCHAIN_FILE=/opt/android-sdk-linux/ndk/28.0.13004108/build/cmake/android.toolchain.cmake
37+
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"
38+
mkdir build
39+
cd build
40+
cmake -DANDROID=ON -DKDUTILS_USE_EXTERNAL_DEPENDENCIES=ON ..
41+
make -j `nproc`
42+
1643
build:
1744
runs-on: ${{ matrix.os }}
1845
strategy:

0 commit comments

Comments
 (0)