Skip to content

Rename maplibre-gl-native to maplibre-native and move to vendor #71

Rename maplibre-gl-native to maplibre-native and move to vendor

Rename maplibre-gl-native to maplibre-native and move to vendor #71

Workflow file for this run

name: Android Qt5 CI
on:
workflow_dispatch:
push:
branches:
- main
tags:
- "**"
paths-ignore:
- ".gitignore"
- "README.md"
# ignore CI for other platforms
- ".github/FUNDING.yml"
- ".github/actions/**"
- ".github/workflows/Android-Qt6.yml"
- ".github/workflows/iOS-Qt5.yml"
- ".github/workflows/iOS-Qt6.yml"
- ".github/workflows/Linux-Qt5.yml"
- ".github/workflows/Linux-Qt6.yml"
- ".github/workflows/macOS-Qt5.yml"
- ".github/workflows/macOS-Qt6.yml"
- ".github/workflows/Windows-Qt5.yml"
- ".github/workflows/Windows-Qt6.yml"
pull_request:
branches:
- main
paths-ignore:
- ".gitignore"
- "README.md"
# ignore CI for other platforms
- ".github/FUNDING.yml"
- ".github/actions/**"
- ".github/workflows/Android-Qt6.yml"
- ".github/workflows/iOS-Qt5.yml"
- ".github/workflows/iOS-Qt6.yml"
- ".github/workflows/Linux-Qt5.yml"
- ".github/workflows/Linux-Qt6.yml"
- ".github/workflows/macOS-Qt5.yml"
- ".github/workflows/macOS-Qt6.yml"
- ".github/workflows/Windows-Qt5.yml"
- ".github/workflows/Windows-Qt6.yml"
concurrency:
# cancel jobs on PRs only
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
QT_VERSION: 5.15.2
jobs:
build-core:
name: "Build maplibre-native for ${{ matrix.config.abi }}"
runs-on: ubuntu-22.04
strategy:
matrix:
config:
- abi: x86
- abi: x86_64
- abi: armeabi-v7a
- abi: arm64-v8a
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: source
submodules: recursive
fetch-depth: 0
- name: Download Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: ==3.0.*
version: ${{ env.QT_VERSION }}
target: "android"
arch: "android"
- name: Set up OpenJDK 11
uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: "11"
- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Set up ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: Android_maplibre-native_${{ matrix.config.abi }}_legacy
append-timestamp: false
- name: Build maplibre-native
env:
ANDROID_ABI: ${{ matrix.config.abi }}
run: |
mkdir build && cd build
cmake ../source/vendor/maplibre-native \
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
-DANDROID_ABI="${ANDROID_ABI}" \
-DANDROID_CCACHE=ccache \
-DANDROID_NATIVE_API_LEVEL=21 \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS_RELEASE=-g0 \
-DCMAKE_FIND_ROOT_PATH="${Qt5_Dir}" \
-DCMAKE_INSTALL_PREFIX=../install-maplibre \
-DCMAKE_PREFIX_PATH="${Qt5_Dir}" \
-DMLN_WITH_QT=ON \
-DMLN_QT_LIBRARY_ONLY=ON \
-DMLN_QT_STATIC=ON
ninja
ninja install
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: maplibre-native_Android_${{ matrix.config.abi }}
path: install-maplibre
prepare-core:
name: "Prepare maplibre-native"
runs-on: ubuntu-22.04
needs: build-core
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-native_Android_x86
path: install-x86
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-native_Android_x86_64
path: install-x86_64
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-native_Android_armeabi-v7a
path: install-armeabi-v7a
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-native_Android_arm64-v8a
path: install-arm64-v8a
- name: Prepare artifacts
run: |
cp -r install-arm64-v8a install-maplibre
cp -r install-armeabi-v7a/lib/* install-maplibre/lib/
cp -r install-x86/lib/* install-maplibre/lib/
cp -r install-x86_64/lib/* install-maplibre/lib/
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: maplibre-native_Android
path: install-maplibre
build-plugin:
name: "Build qt-geoservices-maplibre-gl"
runs-on: ubuntu-22.04
needs: prepare-core
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: source
fetch-depth: 0
- name: Download Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: ==3.0.*
version: ${{ env.QT_VERSION }}
target: android
arch: "android"
- name: Set up OpenJDK 11
uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: "11"
- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Set up ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: Android_qt-geoservices-maplibre-gl_legacy
append-timestamp: false
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-native_Android
path: install-maplibre
- name: Build qt-geoservices-maplibre-gl
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
mkdir build && cd build
qmake ../source/ MAPLIBRE_PATH=../install-maplibre
make -j2
INSTALL_ROOT=../install make install
- name: Create artifacts
run: |
pushd install/home/runner/work/maplibre-native-qt
tar cjvf ../../../../../qt-geoservices-maplibre-gl_Android.tar.bz2 Qt
popd
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: qt-geoservices-maplibre-gl_Android
path: qt-geoservices-maplibre-gl_Android.tar.bz2
release:
name: "Release qt-geoservices-maplibre-gl"
if: github.ref_type == 'tag'
runs-on: ubuntu-22.04
needs: build-plugin
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: qt-geoservices-maplibre-gl_Android
- name: Name tarball
env:
TAG_NAME: ${{ github.ref_name }}
run: |
mv qt-geoservices-maplibre-gl_Android.tar.bz2 qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_Android.tar.bz2
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_Android.tar.bz2
allowUpdates: true
draft: true