Skip to content

Bump version to 4.0.0 #457

Bump version to 4.0.0

Bump version to 4.0.0 #457

Workflow file for this run

name: Android CI
on:
workflow_dispatch:
push:
branches:
- main
tags:
- "**"
paths-ignore:
- ".gitignore"
- "README.md"
- "docs/**"
# ignore CI for other platforms
- ".github/FUNDING.yml"
- ".github/actions/qt6-build**"
- ".github/workflows/CI-cache-cleanup.yml"
- ".github/workflows/docs-test.yml"
- ".github/workflows/gh-pages-docs.yml"
- ".github/workflows/iOS.yml"
- ".github/workflows/Linux.yml"
- ".github/workflows/macOS.yml"
- ".github/workflows/source-tarball.yml"
- ".github/workflows/WASM.yml"
- ".github/workflows/Windows.yml"
- "cmake/presets/iOS.json"
- "cmake/presets/Linux.json"
- "cmake/presets/macOS.json"
- "cmake/presets/WASM.json"
- "cmake/presets/Windows.json"
pull_request:
branches:
- main
paths-ignore:
- ".gitignore"
- "README.md"
- "docs/**"
# ignore CI for other platforms
- ".github/FUNDING.yml"
- ".github/actions/qt6-build**"
- ".github/workflows/CI-cache-cleanup.yml"
- ".github/workflows/docs-test.yml"
- ".github/workflows/gh-pages-docs.yml"
- ".github/workflows/iOS.yml"
- ".github/workflows/Linux.yml"
- ".github/workflows/macOS.yml"
- ".github/workflows/source-tarball.yml"
- ".github/workflows/WASM.yml"
- ".github/workflows/Windows.yml"
- "cmake/presets/iOS.json"
- "cmake/presets/Linux.json"
- "cmake/presets/macOS.json"
- "cmake/presets/WASM.json"
- "cmake/presets/Windows.json"
concurrency:
# cancel jobs on PRs only
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
id-token: write # needed for AWS
jobs:
build:
name: Build (Qt${{ matrix.qt_version}}, ${{ matrix.renderer }}, ${{ matrix.abi }})
runs-on: ubuntu-24.04
strategy:
matrix:
include:
- qt_version: 6.9.3
abi: x86
arch: android_x86
renderer: OpenGL
- qt_version: 6.9.3
abi: x86_64
arch: android_x86_64
renderer: OpenGL
- qt_version: 6.9.3
abi: armeabi-v7a
arch: android_armv7
renderer: OpenGL
- qt_version: 6.9.3
abi: arm64-v8a
arch: android_arm64_v8a
renderer: OpenGL
- qt_version: 6.9.3
abi: x86
arch: android_x86
renderer: Vulkan
- qt_version: 6.9.3
abi: x86_64
arch: android_x86_64
renderer: Vulkan
- qt_version: 6.9.3
abi: armeabi-v7a
arch: android_armv7
renderer: Vulkan
- qt_version: 6.9.3
abi: arm64-v8a
arch: android_arm64_v8a
renderer: Vulkan
- qt_version: 6.10.0
abi: x86
arch: android_x86
renderer: OpenGL
- qt_version: 6.10.0
abi: x86_64
arch: android_x86_64
renderer: OpenGL
- qt_version: 6.10.0
abi: armeabi-v7a
arch: android_armv7
renderer: OpenGL
- qt_version: 6.10.0
abi: arm64-v8a
arch: android_arm64_v8a
renderer: OpenGL
- qt_version: 6.10.0
abi: x86
arch: android_x86
renderer: Vulkan
- qt_version: 6.10.0
abi: x86_64
arch: android_x86_64
renderer: Vulkan
- qt_version: 6.10.0
abi: armeabi-v7a
arch: android_armv7
renderer: Vulkan
- qt_version: 6.10.0
abi: arm64-v8a
arch: android_arm64_v8a
renderer: Vulkan
steps:
- name: Configure AWS Credentials
if: vars.OIDC_AWS_ROLE_TO_ASSUME
uses: aws-actions/configure-aws-credentials@v5
with:
aws-region: us-west-2
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ github.run_id }}
- name: Checkout
uses: actions/checkout@v5
with:
path: source
submodules: recursive
fetch-depth: 0
- name: Install sccache
uses: ./source/.github/actions/install-sccache
with:
arch: linux
- name: Configure sccache
run: |
{
echo "SCCACHE_BUCKET=maplibre-native-sccache"
echo "SCCACHE_REGION=eu-central-1"
} >> "$GITHUB_ENV"
if [ -z "${AWS_SECRET_ACCESS_KEY}" ]; then
echo "AWS_SECRET_ACCESS_KEY not set; not uploading sccache cache to S3"
echo "SCCACHE_S3_NO_CREDENTIALS=1" >> "$GITHUB_ENV"
fi
- name: Download Qt
id: qt-android
uses: jurplel/install-qt-action@v4
with:
aqtversion: ==3.3.*
version: ${{ matrix.qt_version }}
target: android
arch: ${{ matrix.arch }}
modules: qtlocation qtpositioning
- name: Fix Qt release
if: ${{ matrix.abi }} == 'armeabi-v7a'
run: |
chmod +x "$QT_ROOT_DIR/bin/qt-cmake"
sed -i "s/C:\/Qt\/Qt-${QT_VERSION}/\/usr\/local\/Qt-${QT_VERSION}/g" "$QT_ROOT_DIR/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake"
- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: 3.30.x
- name: Set up OpenJDK 17
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@v6
- name: Build
env:
ANDROID_ABI: ${{ matrix.abi }}
RENDERER: ${{ matrix.renderer }}
working-directory: source
run: |
export QT_HOST_PATH="$(readlink -f "$QT_ROOT_DIR/../gcc_64")"
cmake --workflow --preset Android-${RENDERER}-sccache
- name: Show sccache stats
run: sccache --show-stats
- name: Upload artifacts
uses: actions/upload-artifact@v5
with:
name: Android_${{ matrix.qt_version }}_${{ matrix.renderer }}_${{ matrix.abi }}
path: build/qt6-Android-${{ matrix.renderer }}/maplibre-native-qt_*_Android_${{ matrix.renderer }}.tar.bz2
combine:
name: Combine
runs-on: ubuntu-24.04
needs: build
strategy:
matrix:
qt_version: [6.9.3, 6.10.0]
renderer: [OpenGL, Vulkan]
steps:
- name: Download artifacts for x86
uses: actions/download-artifact@v6
with:
name: Android_${{ matrix.qt_version}}_${{ matrix.renderer }}_x86
path: install/x86
- name: Download artifacts for x86_64
uses: actions/download-artifact@v6
with:
name: Android_${{ matrix.qt_version}}_${{ matrix.renderer }}_x86_64
path: install/x86_64
- name: Download artifacts for armeabi-v7a
uses: actions/download-artifact@v6
with:
name: Android_${{ matrix.qt_version}}_${{ matrix.renderer }}_armeabi-v7a
path: install/armeabi-v7a
- name: Download artifacts for arm64-v8a
uses: actions/download-artifact@v6
with:
name: Android_${{ matrix.qt_version}}_${{ matrix.renderer }}_arm64-v8a
path: install/arm64-v8a
- name: Combine artifacts
run: |
pushd install
tar xf x86/*.tar.bz2 -C x86/
rm x86/*.tar.bz2
mv x86/maplibre-native-qt_*/* x86/
mv x86/maplibre-native-qt_*/ .
tar xf x86_64/*.tar.bz2 -C x86_64/
mv x86_64/maplibre-native-qt_*/* x86_64/
rm -r x86_64/maplibre-native-qt_*
tar xf armeabi-v7a/*.tar.bz2 -C armeabi-v7a/
mv armeabi-v7a/maplibre-native-qt_*/* armeabi-v7a/
rm -r armeabi-v7a/maplibre-native-qt_*
tar xf arm64-v8a/*.tar.bz2 -C arm64-v8a/
mv arm64-v8a/maplibre-native-qt_*/* arm64-v8a/
rm -r arm64-v8a/maplibre-native-qt_*
mv x86 x86_64 armeabi-v7a arm64-v8a maplibre-native-qt_*
popd
- name: Create artifacts
env:
RENDERER: ${{ matrix.renderer }}
run: |
pushd install
tar cjvf ../maplibre-native-qt_Android_${RENDERER}.tar.bz2 *
popd
- name: Upload artifacts
uses: actions/upload-artifact@v5
with:
name: Android_${{ matrix.qt_version }}_${{ matrix.renderer }}
path: maplibre-native-qt_Android_${{ matrix.renderer }}.tar.bz2
release:
name: Release
if: github.ref_type == 'tag'
runs-on: ubuntu-24.04
needs: combine
permissions:
contents: write
strategy:
matrix:
qt_version: [6.9.3, 6.10.0]
renderer: [OpenGL, Vulkan]
steps:
- name: Download artifacts
uses: actions/download-artifact@v6
with:
name: Android_${{ matrix.qt_version }}_${{ matrix.renderer }}
- name: Rename tarball
env:
TAG_NAME: ${{ github.ref_name }}
QT_VERSION: ${{ matrix.qt_version }}
RENDERER: ${{ matrix.renderer }}
run: |
mv maplibre-native-qt_Android_${RENDERER}.tar.bz2 maplibre-native-qt_${TAG_NAME}_Qt${QT_VERSION}_Android_${RENDERER}.tar.bz2
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: maplibre-native-qt_${{ github.ref_name }}_Qt${{ matrix.qt_version }}_Android_${{ matrix.renderer }}.tar.bz2
allowUpdates: true
draft: true