Add GitHub actions build with artifacts upload (#80) #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install required packages | |
| run: sudo apt-get install -y gcc-multilib | |
| - name: Set up JDK 8 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '8' | |
| distribution: 'temurin' | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| with: | |
| cmdline-tools-version: 9123335 | |
| packages: 'platforms;android-30 ndk;21.4.7075529' | |
| - name: Configure path to NDK | |
| run: sed -i -e 's,NDK = .*,NDK = /usr/local/lib/android/sdk/ndk/21.4.7075529,g' sys/android/Makefile.src | |
| - name: Build native Android application | |
| run: cd sys/android && sh ./setup.sh && cd ../.. && make install | |
| - name: Build NetHack | |
| run: cd sys/android && sh gradlew build | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: nethack-release-unsigned | |
| path: sys/android/app/build/outputs/apk/release/app-release-unsigned.apk | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: nethack-debug | |
| path: sys/android/app/build/outputs/apk/debug/app-debug.apk |