Skip to content

extra space b

extra space b #91

Workflow file for this run

name: Android Build
on:
push:
workflow_dispatch:
jobs:
build:
name: Android Build
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Pulling the new commit
uses: actions/checkout@v2
- name: Setup Haxe
uses: krdlab/setup-haxe@v1
with:
haxe-version: 4.2.5
- name: Install Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r15c
- name: Restore existing build cache for faster compilation
uses: actions/cache@v3
with:
# not caching the bin folder to prevent asset duplication and stuff like that
key: cache-build-android
path: |
.haxelib/
export/release/android/haxe/
export/release/android/obj/
restore-keys: |
cache-build-android
- name: Installing/Updating libraries
run: |
haxe -cp commandline -D analyzer-optimize --run Main setup -s --lib=./libs.mobile.xml
- name: Rebuilding lime (linux) and hxcpp
run: |
sudo apt-get install -qq libgl1-mesa-dev libglu1-mesa-dev libpulse-dev g++ g++-multilib gcc-multilib libasound2-dev libx11-dev libxext-dev libxi-dev libxrandr-dev libxinerama-dev
cd $(haxelib libpath hxcpp)tools/hxcpp
haxe compile.hxml
cd ${{ github.workspace }}
haxelib run lime rebuild linux -release -clean
haxelib run lime rebuild tools
- name: Configuring Android
run: |
haxelib run lime config ANDROID_SDK $ANDROID_HOME
haxelib run lime config ANDROID_NDK_ROOT ${{ steps.setup-ndk.outputs.ndk-path }}
haxelib run lime config JAVA_HOME $JAVA_HOME_17_X64
haxelib run lime config ANDROID_SETUP true
- name: Rebuilding lime (android)
run: haxelib run lime rebuild android -release -clean
- name: Building the game
run: haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_LATEST_HOME && haxelib run lime build android
- name: Uploading artifact
uses: actions/upload-artifact@v4
with:
name: Codename Engine
path: export/release/android/bin/app/build/outputs/apk/release/*.apk
- name: Remove Docker Images
run: docker rmi $(docker image ls -aq)
- name: Clearing already existing cache
uses: actions/github-script@v6
with:
script: |
const caches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner,
repo: context.repo.repo,
})
for (const cache of caches.data.actions_caches) {
if (cache.key == "cache-build-android") {
console.log('Clearing ' + cache.key + '...')
await github.rest.actions.deleteActionsCacheById({
owner: context.repo.owner,
repo: context.repo.repo,
cache_id: cache.id,
})
console.log("Cache cleared.")
}
}
- name: Uploading new cache
uses: actions/cache@v3
with:
# caching again since for some reason it doesnt work with the first post cache shit
key: cache-build-android
path: |
.haxelib/
export/release/android/haxe/
export/release/android/obj/
restore-keys: |
cache-build-android