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: 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-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-native_legacy
append-timestamp: false
- name: Build maplibre-native
run: |
mkdir build && cd build
cmake ../source/vendor/maplibre-native/ \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=../install-maplibre \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
-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_macOS
path: install-maplibre
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-native_macOS
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/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