Skip to content

Commit 7ab0c60

Browse files
committed
add android pipeline
1 parent b6da889 commit 7ab0c60

5 files changed

Lines changed: 50 additions & 237 deletions

File tree

.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 CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [ "main" ]
7+
8+
jobs:
9+
linux:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v6.0.1
13+
- name: Setup Android SDK
14+
uses: android-actions/setup-android@v3
15+
- name: Install android sdk packages
16+
run: sdkmanager "build-tools;33.0.2" "platforms;android-26"
17+
- name: "Clone dependencies"
18+
working-directory: ./android
19+
run: |
20+
git clone --branch "release-2.28.5" https://github.com/libsdl-org/SDL.git
21+
git clone --branch "release-2.6.3" https://github.com/libsdl-org/SDL_mixer.git
22+
git clone --branch "v4.25" https://github.com/brofield/simpleini.git
23+
- name: "Create links"
24+
working-directory: ./android
25+
run: |
26+
ln -s SDL src/main/jni/SDL2
27+
ln -s SDL/include src/main/jni/SDL2/SDL2
28+
ln -s SDL_mixer src/main/jni/SDL2_mixer
29+
ln -s SDL_mixer/include src/main/jni/SDL2_mixer/SDL2
30+
ln -s simpleini src/main/jni/simpleini
31+
- name: "Init submodule for SDL_mixer"
32+
working-directory: ./android
33+
run: git -C SDL_mixer submodule update --init external/libmodplug
34+
- name: "Prepare build"
35+
working-directory: ./android
36+
run: |
37+
mkdir -p src/main/assets/
38+
cp -R ../../Sounds src/main/assets/
39+
cp ../../data/* src/main/assets/
40+
cp ../../src/config.h.in ../../src/config.h
41+
sed -i "s/@LIRI_VERSION@/$$VERSION$$/" ../../src/config.h
42+
sed -i "s/@LIRI_DATA_DIR@//" ../../src/config.h
43+
sed -i "s/SUPPORT_MOD_MODPLUG ?= false/SUPPORT_MOD_MODPLUG ?= true/" src/main/jni/SDL2_mixer/Android.mk
44+
sed -i 's/4.2.1/7.2.0/' ../build.gradle
45+
sed -i 's/7.0.2/7.3.3/' ../gradle/wrapper/gradle-wrapper.properties
46+
- name: Setup Gradle
47+
uses: gradle/actions/setup-gradle@v6
48+
- name: Build with Gradle
49+
working-directory: ./android
50+
run: ../gradlew build

.github/workflows/c-cpp.yml

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

.github/workflows/clang-format.yml

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

.github/workflows/clang-tidy.yml

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

.github/workflows/codeql.yml

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

0 commit comments

Comments
 (0)