Add missing libs, fix build #12
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" | |
| # Install CMake 3.25.1 | |
| - name: Install CMake | |
| run: | | |
| wget https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-linux-x86_64.sh | |
| chmod +x cmake-3.25.1-linux-x86_64.sh | |
| sudo ./cmake-3.25.1-linux-x86_64.sh --prefix=/usr/local --skip-license | |
| cmake --version | |
| # Set up Android SDK and NDK | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| with: | |
| cmdline-tools-version: "11076708" | |
| packages: "platforms;android-34 build-tools;34.0.0 ndk;27.2.12479018" | |
| accept-android-sdk-licenses: true | |
| # Verify NDK and CMake versions | |
| - name: Verify NDK and CMake versions | |
| run: | | |
| cat $ANDROID_NDK_HOME/source.properties | |
| cmake --version | |
| # 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 |