Skip to content

Commit

Permalink
Fix android build, add android to CI (#2244)
Browse files Browse the repository at this point in the history
* Add android builds to CI

* Fix compilation of mutation_ui.cpp on android

* Remove unused bits from workflow file
  • Loading branch information
olanti-p authored Dec 19, 2022
1 parent 66fe753 commit 3d29308
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Cataclysm Android build

on:
pull_request:
branches:
- upload
paths-ignore:
- 'build-data/osx/**'
- 'doc/**'
- 'doxygen_doc/**'
- 'gfx/**'
- 'lang/**'
- 'lgtm/**'
- 'msvc-object_creator/**'
- 'object_creator/**'
- 'tools/**'
- '!tools/format/**'
- 'utilities/**'

# We only care about the latest revision of a PR, so cancel previous instances.
concurrency:
group: android-build-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true

jobs:
build_catatclysm:
name: Build
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Set up JDK 8 (android)
uses: actions/setup-java@v2
with:
java-version: "8"
distribution: "adopt"

- name: Setup build and dependencies
run: |
sudo apt-get update
sudo apt-get install gettext
- name: Build
working-directory: ./android
run: |
chmod +x gradlew
./gradlew -Pj=$((`nproc`+0)) -Pabi_arm_32=false assembleExperimentalRelease
4 changes: 2 additions & 2 deletions src/mutation_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ detail::mutations_ui_result detail::show_mutations_ui_internal( Character &who )
ctxt.register_action( "QUIT" );
#if defined(__ANDROID__)
for( const auto &p : passive ) {
ctxt.register_manual_key( my_mutations[p].key, p.obj().name() );
ctxt.register_manual_key( who.my_mutations[p].key, p.obj().name() );
}
for( const auto &a : active ) {
ctxt.register_manual_key( my_mutations[a].key, a.obj().name() );
ctxt.register_manual_key( who.my_mutations[a].key, a.obj().name() );
}
#endif

Expand Down

0 comments on commit 3d29308

Please sign in to comment.