Update workflows #31
This file contains 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: Compile on Android | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- ".gitignore" | |
- "README.md" | |
# ignore CI for other platforms | |
- ".github/workflows/ios.yml" | |
- ".github/workflows/linux.yml" | |
- ".github/workflows/macos.yml" | |
- ".github/workflows/sources.yml" | |
- ".github/workflows/windows.yml" | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Install Qt for Android arm64 | |
uses: jurplel/install-qt-action@v4 | |
with: | |
aqtversion: ==3.1.* | |
cache: 'true' | |
cache-key-prefix: 'install-qt-action-android' | |
modules: 'qtlocation qtpositioning' | |
target: 'android' | |
version: '6.8.0' | |
arch: 'android_arm64_v8a' | |
- name: Set up OpenJDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: adopt | |
java-version: 17 | |
- name: Setup ninja | |
uses: seanmiddleditch/gha-setup-ninja@v5 | |
- name: Install Additional Software | |
run: | | |
echo "y" | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "platforms;android-34" "platform-tools" "build-tools;34.0.0" | |
echo "y" | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "ndk;26.1.10909125" | |
echo ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/26.1.10909125 >> $GITHUB_ENV | |
- name: Remove Unwanted Software | |
run: | | |
echo "y" | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-33-ext4" "platforms;android-33-ext5" "platforms;android-34-ext8" | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: android | |
- name: Compile and Install libzip | |
run: | | |
$QT_ROOT_DIR/bin/qt-cmake \ | |
-G Ninja \ | |
-S libzip \ | |
-B build-libzip \ | |
-DBUILD_DOC=OFF \ | |
-DBUILD_EXAMPLES=OFF \ | |
-DBUILD_REGRESS=OFF \ | |
-DBUILD_SHARED_LIBS=OFF \ | |
-DBUILD_TOOLS=OFF \ | |
-DENABLE_BZIP2=OFF \ | |
-DENABLE_LZMA=OFF \ | |
-DENABLE_ZSTD=OFF \ | |
-DCMAKE_INSTALL_PREFIX=Qt/android_arm64_v8a | |
cmake --build build-libzip | |
cmake --install build-libzip | |
- name: Compile and Install maplibre-native-qt | |
run: | | |
export QT_HOST_PATH="$(readlink -f "$QT_ROOT_DIR/../gcc_64")" | |
$QT_ROOT_DIR/bin/qt-cmake \ | |
-S maplibre-native-qt \ | |
-B build-maplibre-native-qt \ | |
-G Ninja \ | |
-DBUILD_TESTING=OFF \ | |
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ | |
-DCMAKE_PREFIX_PATH=$Qt6_DIR \ | |
-DCMAKE_INSTALL_PREFIX=Qt/android_arm64_v8a | |
cmake --build build-maplibre-native-qt | |
cmake --install build-maplibre-native-qt | |
- name: Package | |
run: | | |
tar cvfz enrouteDependencies_android_arm64.tar.gz Qt | |
- name: Upload to developerBuilds | |
run: | | |
gh release upload --clobber developerBuilds *.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |