Skip to content

Commit

Permalink
Prepare Qt release workflow (#477)
Browse files Browse the repository at this point in the history
Co-authored-by: Birk Skyum <74932975+birkskyum@users.noreply.github.com>
  • Loading branch information
ntadej and birkskyum committed Sep 13, 2022
1 parent 8d7995e commit a0d28ee
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/actions/qt5-build/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .github/actions/qt6-build/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
47 changes: 42 additions & 5 deletions .github/workflows/qt-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build-core:
build:
strategy:
matrix:
include:
Expand All @@ -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
Expand All @@ -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"
Expand All @@ -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: ''
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 9 additions & 0 deletions platform/qt/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)).
6 changes: 6 additions & 0 deletions platform/qt/qt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion platform/qt/scripts/configure_Qt5_Linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions platform/qt/scripts/configure_Qt5_iOS_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions platform/qt/scripts/configure_Qt5_macOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions platform/qt/scripts/configure_Qt5_macOS_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions platform/qt/scripts/configure_Qt6_macOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions platform/qt/scripts/configure_Qt6_macOS_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit a0d28ee

Please sign in to comment.