Preliminary Qt 6.5 support #66
Workflow file for this run
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: macOS 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-Qt5.yml" | |
- ".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-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-Qt5.yml" | |
- ".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-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-gl-native" | |
runs-on: macos-12 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: source | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Setup Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Download Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
aqtversion: ==3.0.* | |
version: ${{ env.QT_VERSION }} | |
target: desktop | |
- name: Setup ninja | |
uses: seanmiddleditch/gha-setup-ninja@v3 | |
- name: Set up ccache | |
uses: hendrikmuhs/ccache-action@v1 | |
with: | |
key: macOS_maplibre-gl-native_legacy | |
append-timestamp: false | |
- name: Build maplibre-gl-native | |
run: | | |
mkdir build && cd build | |
cmake ../source/dependencies/maplibre-gl-native/ \ | |
-G Ninja \ | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_INSTALL_PREFIX=../install-qmaplibregl \ | |
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \ | |
-DMBGL_WITH_QT=ON \ | |
-DMBGL_QT_LIBRARY_ONLY=ON \ | |
-DMBGL_QT_STATIC=ON | |
ninja | |
ninja install | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: maplibre-gl-native_macOS | |
path: install-qmaplibregl | |
build-plugin: | |
name: "Build qt-geoservices-maplibre-gl" | |
runs-on: macos-12 | |
needs: build-core | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: source | |
fetch-depth: 0 | |
- name: Setup Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Download Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
aqtversion: ==3.0.* | |
version: ${{ env.QT_VERSION }} | |
target: desktop | |
- name: Setup ninja | |
uses: seanmiddleditch/gha-setup-ninja@v3 | |
- name: Set up ccache | |
uses: hendrikmuhs/ccache-action@v1 | |
with: | |
key: macOS_qt-geoservices-maplibre-gl_legacy | |
append-timestamp: false | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: maplibre-gl-native_macOS | |
path: install-qmaplibregl | |
- name: Build qt-geoservices-maplibre-gl | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
mkdir build && cd build | |
qmake ../source/ QMAPLIBREGL_PATH=../install-qmaplibregl | |
make -j2 | |
INSTALL_ROOT=../install make install | |
- name: Create artifacts | |
run: | | |
pushd install/Users/runner/work/maplibre-native-qt | |
tar cjvf ../../../../../qt-geoservices-maplibre-gl_macOS.tar.bz2 Qt | |
popd | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: qt-geoservices-maplibre-gl_macOS | |
path: qt-geoservices-maplibre-gl_macOS.tar.bz2 | |
release: | |
name: "Release qt-geoservices-maplibre-gl" | |
if: github.ref_type == 'tag' | |
runs-on: macos-12 | |
needs: build-plugin | |
permissions: | |
contents: write | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: qt-geoservices-maplibre-gl_macOS | |
- name: Name tarball | |
env: | |
TAG_NAME: ${{ github.ref_name }} | |
run: | | |
mv qt-geoservices-maplibre-gl_macOS.tar.bz2 qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_macOS.tar.bz2 | |
- name: Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_macOS.tar.bz2 | |
allowUpdates: true | |
draft: true |