169 lines
5.2 KiB
YAML
169 lines
5.2 KiB
YAML
name: qt-ci
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- 'qt-**'
|
|
paths-ignore:
|
|
- ".gitignore"
|
|
- "README.md"
|
|
# ignore other platforms
|
|
- "platform/android/**"
|
|
- "platform/darwin/**"
|
|
- "platform/glfw/**"
|
|
- "platform/ios/**"
|
|
- "platform/macos/**"
|
|
# ignore CI for other platforms
|
|
- ".github/FUNDING.yml"
|
|
- ".github/workflows/android-ci.yml"
|
|
- ".github/workflows/android-ci-pull.yml"
|
|
- ".github/workflows/android-docker-base.yml"
|
|
- ".github/workflows/android-docker-ndk-r21b.yml"
|
|
- ".github/workflows/android-release.yml"
|
|
- ".github/workflows/gh-pages-android-api.yml"
|
|
- ".github/workflows/gh-pages-ios-api.yml"
|
|
- ".github/workflows/ios-ci.yml"
|
|
- ".github/workflows/ios-pre-release.yml"
|
|
- ".github/workflows/ios-release.yml"
|
|
- ".github/workflows/macos-ci.yml"
|
|
- ".github/workflows/macos-release.yml"
|
|
- ".github/workflows/node-ci.yml"
|
|
- ".github/workflows/node-release.yml"
|
|
- ".github/workflows/qt-ci-windows.yml"
|
|
- ".github/workflows/update-gl-js.yml"
|
|
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- ".gitignore"
|
|
- "README.md"
|
|
# ignore other platforms
|
|
- "platform/android/**"
|
|
- "platform/darwin/**"
|
|
- "platform/glfw/**"
|
|
- "platform/ios/**"
|
|
- "platform/macos/**"
|
|
# ignore CI for other platforms
|
|
- ".github/FUNDING.yml"
|
|
- ".github/workflows/android-ci.yml"
|
|
- ".github/workflows/android-ci-pull.yml"
|
|
- ".github/workflows/android-docker-base.yml"
|
|
- ".github/workflows/android-docker-ndk-r21b.yml"
|
|
- ".github/workflows/gh-pages-android-api.yml"
|
|
- ".github/workflows/gh-pages-ios-api.yml"
|
|
- ".github/workflows/ios-ci.yml"
|
|
- ".github/workflows/ios-pre-release.yml"
|
|
- ".github/workflows/ios-release.yml"
|
|
- ".github/workflows/macos-ci.yml"
|
|
- ".github/workflows/macos-release.yml"
|
|
- ".github/workflows/node-ci.yml"
|
|
- ".github/workflows/node-release.yml"
|
|
- ".github/workflows/qt-ci-windows.yml"
|
|
- ".github/workflows/update-gl-js.yml"
|
|
|
|
concurrency:
|
|
# cancel jobs on PRs only
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
build-core:
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- name: Linux
|
|
os: ubuntu-22.04
|
|
build_type: RelWithDebInfo
|
|
qt_version: 5.15.2
|
|
qt_target: desktop
|
|
- name: Linux
|
|
os: ubuntu-22.04
|
|
build_type: RelWithDebInfo
|
|
qt_version: 6.3.1
|
|
qt_target: desktop
|
|
- name: macOS
|
|
os: macos-12
|
|
build_type: RelWithDebInfo
|
|
qt_version: 5.15.2
|
|
qt_target: desktop
|
|
deployment_target: 10.13
|
|
deployment_arch: "x86_64"
|
|
- name: macOS
|
|
os: macos-12
|
|
build_type: RelWithDebInfo
|
|
qt_version: 6.3.1
|
|
qt_target: desktop
|
|
deployment_target: 10.14
|
|
deployment_arch: "x86_64;arm64"
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
BUILD_TYPE: ${{ matrix.build_type }}
|
|
DEPLOYMENT_TARGET: ${{ matrix.deployment_target }}
|
|
DEPLOYMENT_ARCH: ${{ matrix.deployment_arch }}
|
|
QT_VERSION: ${{ matrix.qt_version }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: source
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Xcode
|
|
if: runner.os == 'macOS'
|
|
uses: maxim-lobanov/setup-xcode@v1
|
|
with:
|
|
xcode-version: latest-stable
|
|
|
|
- name: Download Qt
|
|
uses: jurplel/install-qt-action@v3
|
|
with:
|
|
aqtversion: ==2.1.*
|
|
version: ${{ env.QT_VERSION }}
|
|
dir: ${{ github.workspace }}
|
|
target: ${{ matrix.qt_target }}
|
|
|
|
- name: Setup ninja
|
|
uses: seanmiddleditch/gha-setup-ninja@v3
|
|
|
|
- name: Set up ccache
|
|
uses: hendrikmuhs/ccache-action@v1
|
|
with:
|
|
key: ${{ matrix.name }}
|
|
|
|
- name: Build maplibre-gl-native (macOS)
|
|
if: runner.os == 'macOS' && matrix.qt_target == 'desktop'
|
|
run: |
|
|
mkdir build && cd build
|
|
cmake ../source/ \
|
|
-G Ninja \
|
|
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
|
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
|
|
-DCMAKE_INSTALL_PREFIX="../install" \
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET="${DEPLOYMENT_TARGET}" \
|
|
-DCMAKE_OSX_ARCHITECTURES="${DEPLOYMENT_ARCH}" \
|
|
-DMBGL_WITH_QT=ON \
|
|
-DMBGL_QT_LIBRARY_ONLY=ON
|
|
ninja
|
|
ninja install
|
|
|
|
- name: Build maplibre-gl-native (Linux, Qt5)
|
|
if: runner.os == 'Linux' && matrix.qt_version == '5.15.2'
|
|
uses: ./source/.github/actions/qt5-build
|
|
|
|
- name: Build maplibre-gl-native (Linux, Qt6)
|
|
if: runner.os == 'Linux' && matrix.qt_version != '5.15.2'
|
|
uses: ./source/.github/actions/qt6-build
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: maplibre-gl-native_${{ matrix.name }}_Qt${{ matrix.qt_version }}
|
|
path: install
|