Skip to content

Split workflows and add regressions #2

Split workflows and add regressions

Split workflows and add regressions #2

Workflow file for this run

name: Hop android
on:
pull_request:
workflow_dispatch:
jobs:
androidBuild:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: pack headers
run: |
mkdir headers
for inc in include/jGL/include/jGL \
include/jGL/include/*.h \
include/jGL/include/vendored/freetype/include/* \
include/jGL/include/vendored/glew/include/GL \
include/jGL/include/vendored/glfw/include/GLFW \
include/jGL/include/vendored/glm/glm \
include/jGL/include/vendored/stduuid/include/uuid.h \
include/jGL/include/vendored/stduuid/gsl \
include/jGL/include/vendored/stb_image.h \
include/jLog \
include/jThread \
include/Collision \
include/Component \
include/Console \
include/Debug \
include/Maths \
include/Object \
include/Shader \
include/System \
include/Util \
include/World \
include/vendored/lua/src/lauxlib.h \
include/vendored/lua/src/lua.h \
include/vendored/lua/src/luaconf.h \
include/vendored/lua/src/lualib.h \
include/vendored/miniaudio \
include/vendored/json.hpp \
include/*.h \
include/vendored/vorbis/include/vorbis \
include/vendored/ogg/include/ogg \
include/vendored/sparsehash;
do cp -r $inc headers; done
- name: install dependencies
run: |
sudo apt-get update && sudo apt-get install -y build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools
wget https://dl.google.com/android/repository/android-ndk-r25c-linux.zip
unzip android-ndk-r25c-linux.zip
wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
unzip commandlinetools-linux-9477386_latest.zip
export ANDROID_SDK_ROOT=~/
mv cmdline-tools latest
mkdir cmdline-tools
mv latest cmdline-tools
yes | ./cmdline-tools/latest/bin/sdkmanager --licenses
./cmdline-tools/latest/bin/sdkmanager --channel=3 emulator
./cmdline-tools/latest/bin/sdkmanager --install "system-images;android-34;google_apis;x86_64"
./cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-34"
echo no | ./cmdline-tools/latest/bin/avdmanager create avd --name android34 --package "system-images;android-34;google_apis;x86_64"
- name: build
run: |
./build.sh -r --android android-ndk-r25c
- name: buildArtifact
uses: actions/upload-artifact@v4
with:
name: androidbuild
path: androidbuild
- name: build demo
run: |
cp -r headers/ demo/android/perlinWorld/app/src/main/cpp/include/
cp -r build/*.a demo/android/perlinWorld/app/src/main/cpp/include/
cd demo/android/perlinWorld
./gradlew assembleDebug
cd ~/