Add missing libs, fix build #11
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
| name: Build APK | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| pull_request: | |
| branches: | |
| - dev | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Check out the repository code with submodules | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| # Set up JDK 17 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: "17" | |
| distribution: "temurin" | |
| # Set up Android SDK and NDK | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| with: | |
| cmdline-tools-version: "11076708" # Latest known working version | |
| packages: "platforms;android-34 build-tools;34.0.0 ndk;27.2.12479018" | |
| accept-android-sdk-licenses: true | |
| # Verify NDK version | |
| - name: Verify NDK version | |
| run: cat $ANDROID_NDK_HOME/source.properties | |
| # Cache Gradle dependencies | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| # Grant execute permission for gradlew | |
| - name: Make gradlew executable | |
| run: chmod +x ./gradlew | |
| # Build the APK | |
| - name: Build debug APK | |
| run: ./gradlew assembleDebug | |
| env: | |
| ANDROID_SDK_ROOT: ${{ env.ANDROID_HOME }} | |
| ANDROID_NDK_HOME: ${{ env.ANDROID_NDK_HOME }} | |
| # Upload the APK as an artifact | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: raymob-debug-apk | |
| path: app/build/outputs/apk/debug/app-debug.apk |