Skip to content

Compile Android

Compile Android #4

Workflow file for this run

name: Compile Android
on: [workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r21e
- name: Setup Java JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Setup Haxe
uses: krdlab/[email protected]
with:
haxe-version: 4.3.3
- name: Install Haxelib
run: |
haxelib setup ~/haxelib
haxelib install hxcpp > /dev/null
haxelib install lime
haxelib install openfl
haxelib install flixel
haxelib install akifox-asynchttp
haxelib install extension-androidtools
haxelib run lime setup flixel
haxelib --always set flixel 4.11.0
haxelib --always set lime 8.0.2
haxelib --always set openfl 9.1.0
haxelib install flixel-ui 2.5.0
haxelib list
- name: Setup Lime
run: |
echo '<xml><compilerflag value="-DHAVE_CONFIG_H" /><compilerflag value="-DPCRE2_STATIC" /><compilerflag value="-DSUPPORT_UNICODE" /><compilerflag value="-I${PCRE_DIR}" /><compilerflag value="-std=c99" unless="MSVC_VER" /><file name="${PCRE_DIR}/pcre2_auto_possess.c" /><file name="${PCRE_DIR}/pcre2_chartables.c" /><file name="${PCRE_DIR}/pcre2_compile.c" /><file name="${PCRE_DIR}/pcre2_config.c" /><file name="${PCRE_DIR}/pcre2_context.c" /><file name="${PCRE_DIR}/pcre2_convert.c" /><file name="${PCRE_DIR}/pcre2_dfa_match.c" /><file name="${PCRE_DIR}/pcre2_error.c" /><file name="${PCRE_DIR}/pcre2_extuni.c" /><file name="${PCRE_DIR}/pcre2_find_bracket.c" /><file name="${PCRE_DIR}/pcre2_jit_compile.c" /><file name="${PCRE_DIR}/pcre2_maketables.c" /><file name="${PCRE_DIR}/pcre2_match.c" /><file name="${PCRE_DIR}/pcre2_match_data.c" /><file name="${PCRE_DIR}/pcre2_newline.c" /><file name="${PCRE_DIR}/pcre2_ord2utf.c" /><file name="${PCRE_DIR}/pcre2_pattern_info.c" /><file name="${PCRE_DIR}/pcre2_script_run.c" /><file name="${PCRE_DIR}/pcre2_serialize.c" /><file name="${PCRE_DIR}/pcre2_string_utils.c" /><file name="${PCRE_DIR}/pcre2_study.c" /><file name="${PCRE_DIR}/pcre2_substitute.c" /><file name="${PCRE_DIR}/pcre2_substring.c" /><file name="${PCRE_DIR}/pcre2_tables.c" /><file name="${PCRE_DIR}/pcre2_ucd.c" /><file name="${PCRE_DIR}/pcre2_valid_utf.c" /><file name="${PCRE_DIR}/pcre2_xclass.c" /></xml>' > /home/runner/haxelib/hxcpp/4.3.2/src/hx/libs/regexp/pcre2_sources.xml
haxelib run lime setup -alias -y
haxelib run lime config ANDROID_SDK $ANDROID_HOME
haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_HOME
haxelib run lime config JAVA_HOME $JAVA_HOME
haxelib run lime config ANDROID_SETUP true
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Compile
run: haxelib run lime build android -final
- name: Publish Artifact
uses: actions/[email protected]
with:
name: androidBuild
path: export/release/android/bin/app/build/outputs/apk/debug