# Copyright (C) 2021-2021 Sergii Pylypenko # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages # arising from the use of this software. # # Permission is granted to anyone to use this software for any purpose, # including commercial applications, and to alter it and redistribute it # freely, subject to the following restrictions: # # 1. The origin of this software must not be misrepresented; you must not # claim that you wrote the original software. If you use this software # in a product, an acknowledgment in the product documentation would be # appreciated but is not required. # 2. Altered source versions must be plainly marked as such, and must not be # misrepresented as being the original software. # 3. This notice may not be removed or altered from any source distribution. name: ballfield on: push: branches: - '*' tags: - '*' pull_request: {} jobs: build: env: APP_NAME: ballfield # It takes one hour per one architecture to build Boost and ICU libraries, and Github limits CI script duration to 6 hours ARCH_LIST: armeabi-v7a arm64-v8a x86 x86_64 PATH: ${ANDROID_NDK_LATEST_HOME}:${PATH} runs-on: ubuntu-latest steps: - name: Setup Android SDK uses: android-actions/setup-android@v2 - name: Check out the repository uses: actions/checkout@v2 with: fetch-depth: 1 submodules: false - name: Check out submodules # There are many more submodules in this repo, we don't need them all run: > git submodule update --init --recursive --depth=1 project/jni/boost/src project/jni/iconv/src project/jni/sdl2 project/jni/sdl2_image project/jni/sdl2_mixer project/jni/sdl2_ttf - name: Symlink to the source dir run: | ln -s ${APP_NAME} project/jni/application/src - name: Limit architectures to ARM64 run: | sed -i "s/MultiABI=.*/MultiABI='${ARCH_LIST}'/g" project/jni/application/src/AndroidAppSettings.cfg - name: Build Boost, ICU, and OpenSSL # This takes exactly one hour on Gitlab runner run: | ./changeAppSettings.sh - name: Hyper turbo build script GOOOOOOOOOOOO run: | ./build.sh - name: Package run: | mkdir -p upload/ mv project/app/build/outputs/apk/release/app-release.apk upload/ # Github actions is dumb and won't let you download single files from artifacts, so break up the artifacts instead - uses: actions/upload-artifact@v2 with: name: "android-apk" path: upload if-no-files-found: error