Build CarLauncher.apk(Branch) #350
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 CarLauncher.apk(Branch) | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout OsmAnd | |
| uses: actions/checkout@v6 | |
| with: | |
| path: android | |
| - name: checkout OsmAnd-resources | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: osmandapp/OsmAnd-resources | |
| path: resources | |
| - name: checkout OsmAnd-core | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: osmandapp/OsmAnd-core | |
| path: core | |
| - name: checkout OsmAnd-core-legacy | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: osmandapp/OsmAnd-core-legacy | |
| path: core-legacy | |
| - name: checkout OsmAnd-build | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: osmandapp/OsmAnd-build | |
| path: build | |
| - name: checkout OsmAnd-tools | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: osmandapp/OsmAnd-tools | |
| path: tools | |
| - name: checkout OsmAnd-misc | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: osmandapp/OsmAnd-misc | |
| path: misc | |
| - name: Setup Android SDK and NDK | |
| uses: android-actions/setup-android@v3 | |
| with: | |
| packages: 'ndk;25.1.8937393' | |
| - name: set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Grant execute permission for gradlew | |
| working-directory: ./android | |
| run: chmod +x gradlew | |
| - name: Patch memory requirements | |
| working-directory: ./android | |
| run: printf "\norg.gradle.jvmargs=-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8\n" >> gradle.properties | |
| - name: Set Version Suffix | |
| working-directory: ./android | |
| run: echo "APK_VERSION_SUFFIX=-$(git log -n 1 --format='%h')" >> $GITHUB_ENV | |
| - name: Build with Gradle | |
| working-directory: ./android | |
| run: ./gradlew assemblecarlauncherLegacyFatDebug -x test --console=plain --no-daemon 2>&1 | grep -iE 'error|exception|fail' | |
| - name: Rename APK | |
| working-directory: ./android | |
| run: mv OsmAnd/build/outputs/apk/carlauncherLegacyFat/debug/OsmAnd-carlauncher-legacy-fat-debug.apk OsmAnd/build/outputs/apk/carlauncherLegacyFat/debug/OsmAnd-carlauncher-legacy-fat-debug-$(git log -n 1 --format='%h').apk | |
| - name: Archive APK | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: CarLauncher-apk | |
| path: android/OsmAnd/build/outputs/apk/*/*/*.apk | |
| retention-days: 90 |