Prepare Qt release workflow (#477)

Co-authored-by: Birk Skyum <74932975+birkskyum@users.noreply.github.com>
This commit is contained in:
Tadej Novak
2022-09-13 21:55:16 +02:00
committed by GitHub
parent 8d7995e783
commit a0d28ee958
12 changed files with 70 additions and 17 deletions

View File

@@ -16,6 +16,7 @@ cmake ../source/ \
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
-DCMAKE_INSTALL_PREFIX=../install \
-DMBGL_WITH_QT=ON \
-DMBGL_QT_DEPLOYMENT=ON \
-DMBGL_QT_LIBRARY_ONLY=ON
ninja
ninja install

View File

@@ -14,6 +14,7 @@ qt-cmake ../source/ \
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
-DCMAKE_INSTALL_PREFIX=../install \
-DMBGL_WITH_QT=ON \
-DMBGL_QT_DEPLOYMENT=ON \
-DMBGL_QT_LIBRARY_ONLY=ON
ninja
ninja install

View File

@@ -71,7 +71,7 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build-core:
build:
strategy:
matrix:
include:
@@ -83,7 +83,7 @@ jobs:
- name: Linux
os: ubuntu-22.04
build_type: RelWithDebInfo
qt_version: 6.3.1
qt_version: 6.3.2
qt_target: desktop
- name: macOS
os: macos-12
@@ -95,7 +95,7 @@ jobs:
- name: macOS
os: macos-12
build_type: RelWithDebInfo
qt_version: 6.3.1
qt_version: 6.3.2
qt_target: desktop
deployment_target: 10.14
deployment_arch: "x86_64;arm64"
@@ -113,7 +113,7 @@ jobs:
build_type: "RelWithDebInfo;Debug"
compiler_type: x64
compiler_version: 14.29
qt_version: 6.3.1
qt_version: 6.3.2
qt_target: desktop
qt_arch: win64_msvc2019_64
qt_tools: ''
@@ -131,7 +131,7 @@ jobs:
build_type: RelWithDebInfo
compiler_type: mingw1120_64
compiler_version: 11.2.0
qt_version: 6.3.1
qt_version: 6.3.2
qt_target: desktop
qt_arch: win64_mingw
qt_tools: tools_mingw90
@@ -210,6 +210,7 @@ jobs:
-DCMAKE_OSX_DEPLOYMENT_TARGET="${DEPLOYMENT_TARGET}" \
-DCMAKE_OSX_ARCHITECTURES="${DEPLOYMENT_ARCH}" \
-DMBGL_WITH_QT=ON \
-DMBGL_QT_DEPLOYMENT=ON \
-DMBGL_QT_LIBRARY_ONLY=ON
ninja
ninja install
@@ -236,6 +237,7 @@ jobs:
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache.exe" \
-DCMAKE_INSTALL_PREFIX="../install" \
-DMBGL_WITH_QT=ON \
-DMBGL_QT_DEPLOYMENT=ON \
-DMBGL_QT_LIBRARY_ONLY=ON
ninja.exe
ninja.exe install
@@ -245,3 +247,38 @@ jobs:
with:
name: maplibre-gl-native_${{ matrix.name }}_Qt${{ matrix.qt_version }}
path: install
release:
name: Release QMapLibreGL
if: github.ref_type == 'tag'
runs-on: ubuntu-22.04
needs: build
strategy:
matrix:
name: [Linux, macOS, win64_msvc2019, win64_mingw]
qt_version: [5.15.2, 6.3.2]
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-gl-native_${{ matrix.name }}_Qt${{ matrix.qt_version }}
path: install
- name: Make tarball
env:
TAG_NAME: ${{ github.ref_name }}
TAG_PLATFORM: ${{ matrix.name }}
QT_VERSION: ${{ matrix.qt_version }}
run: |
cd install
tar cjvf ../QMapLibreGL_${TAG_NAME//qt-/}_Qt${QT_VERSION}_${TAG_PLATFORM}.tar.bz2 *
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: QMapLibreGL_*.tar.bz2
allowUpdates: true
draft: true

View File

@@ -6,7 +6,6 @@
- *...Add new stuff here...*
- [core] Add `ClientOptions` to configure client information [#365](https://github.com/maplibre/maplibre-gl-native/pull/365).
- [qt] Build user agent based on `ClientOptions`, if available [#365](https://github.com/maplibre/maplibre-gl-native/pull/365).
### ✨ Technical Improvements

9
platform/qt/CHANGELOG.md Normal file
View File

@@ -0,0 +1,9 @@
# Changelog
## v2.0
### ✨ New features
- Full Qt5 and Qt6 support for macOS, Linux, Windows, iOS and Android.
- Rename to `QMapLibreGL` ([#338](https://github.com/maplibre/maplibre-gl-native/pull/338)).
- Build user agent based on `ClientOptions`, if available ([#365](https://github.com/maplibre/maplibre-gl-native/pull/365)).

View File

@@ -10,6 +10,7 @@ option(MBGL_QT_STATIC "Build MapLibre GL Qt bindings staticly" OFF)
option(MBGL_QT_INSIDE_PLUGIN "Build QMapLibreGL as OBJECT library, so it can be bundled into separate single plugin lib." OFF)
option(MBGL_QT_WITH_HEADLESS "Build MapLibre GL Qt with headless support" ON)
option(MBGL_QT_WITH_INTERNAL_SQLITE "Build MapLibre GL Qt bindings with internal sqlite" OFF)
option(MBGL_QT_DEPLOYMENT "Autogenerate files necessary for deployment" OFF)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR}
@@ -248,6 +249,11 @@ install(
COMPONENT development
)
if(MBGL_QT_DEPLOYMENT)
install(FILES ${PROJECT_SOURCE_DIR}/LICENSE.md
DESTINATION .)
endif()
# FIXME: Because of rapidjson conversion
target_include_directories(
qmaplibregl

View File

@@ -12,6 +12,6 @@ fi
cmake "$1" \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DMBGL_WITH_QT=ON \
-DCMAKE_INSTALL_PREFIX="$2"

View File

@@ -17,10 +17,10 @@ fi
cmake "$1" \
-G"Ninja Multi-Config" \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_SYSTEM_NAME="iOS" \
-DCMAKE_CONFIGURATION_TYPES="Release;Debug" \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \
-DCMAKE_OSX_DEPLOYMENT_TARGET="12.0" \
-DMBGL_WITH_QT=ON \
-DMBGL_QT_STATIC=ON \
-DMBGL_QT_LIBRARY_ONLY=ON \

View File

@@ -12,7 +12,7 @@ fi
cmake "$1" \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.13" \
-DMBGL_WITH_QT=ON \
-DCMAKE_INSTALL_PREFIX="$2"

View File

@@ -12,8 +12,8 @@ fi
cmake "$1" \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.13" \
-DMBGL_WITH_QT=ON \
-DMBGL_QT_STATIC=ON \
-DMBGL_QT_LIBRARY_ONLY=ON \

View File

@@ -12,8 +12,8 @@ fi
qt-cmake "$1" \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" \
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
-DMBGL_WITH_QT=ON \
-DCMAKE_INSTALL_PREFIX="$2"

View File

@@ -12,8 +12,8 @@ fi
qt-cmake "$1" \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" \
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
-DMBGL_WITH_QT=ON \
-DMBGL_QT_STATIC=ON \