Skip to content

Commit 3d29308

Browse files
authored
Fix android build, add android to CI (cataclysmbn#2244)
* Add android builds to CI * Fix compilation of mutation_ui.cpp on android * Remove unused bits from workflow file
1 parent 66fe753 commit 3d29308

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed

.github/workflows/android.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Cataclysm Android build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- upload
7+
paths-ignore:
8+
- 'build-data/osx/**'
9+
- 'doc/**'
10+
- 'doxygen_doc/**'
11+
- 'gfx/**'
12+
- 'lang/**'
13+
- 'lgtm/**'
14+
- 'msvc-object_creator/**'
15+
- 'object_creator/**'
16+
- 'tools/**'
17+
- '!tools/format/**'
18+
- 'utilities/**'
19+
20+
# We only care about the latest revision of a PR, so cancel previous instances.
21+
concurrency:
22+
group: android-build-${{ github.event.pull_request.number || github.ref_name }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
build_catatclysm:
27+
name: Build
28+
runs-on: ubuntu-22.04
29+
if: github.event.pull_request.draft == false
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v2
34+
with:
35+
fetch-depth: 1
36+
37+
- name: Set up JDK 8 (android)
38+
uses: actions/setup-java@v2
39+
with:
40+
java-version: "8"
41+
distribution: "adopt"
42+
43+
- name: Setup build and dependencies
44+
run: |
45+
sudo apt-get update
46+
sudo apt-get install gettext
47+
48+
- name: Build
49+
working-directory: ./android
50+
run: |
51+
chmod +x gradlew
52+
./gradlew -Pj=$((`nproc`+0)) -Pabi_arm_32=false assembleExperimentalRelease

src/mutation_ui.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,10 @@ detail::mutations_ui_result detail::show_mutations_ui_internal( Character &who )
242242
ctxt.register_action( "QUIT" );
243243
#if defined(__ANDROID__)
244244
for( const auto &p : passive ) {
245-
ctxt.register_manual_key( my_mutations[p].key, p.obj().name() );
245+
ctxt.register_manual_key( who.my_mutations[p].key, p.obj().name() );
246246
}
247247
for( const auto &a : active ) {
248-
ctxt.register_manual_key( my_mutations[a].key, a.obj().name() );
248+
ctxt.register_manual_key( who.my_mutations[a].key, a.obj().name() );
249249
}
250250
#endif
251251

0 commit comments

Comments
 (0)