* Qt build improvements and documentation * Update include/mbgl/actor/actor_ref.hpp Co-authored-by: Oliver Wipfli <oliver.wipfli@leichteralsluft.ch>
214 lines
6.7 KiB
YAML
214 lines
6.7 KiB
YAML
name: qt-ci
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags-ignore:
|
|
- '**'
|
|
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/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/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-latest
|
|
static: OFF
|
|
qt: 5.15.2
|
|
qt_target: desktop
|
|
- name: macOS
|
|
os: macos-latest
|
|
static: OFF
|
|
qt: 5.15.2
|
|
qt_target: desktop
|
|
- name: macOS_static
|
|
os: macos-latest
|
|
static: ON
|
|
qt: 5.15.2
|
|
qt_target: desktop
|
|
- name: iOS_static
|
|
os: macos-latest
|
|
static: ON
|
|
qt: 5.15.2
|
|
qt_target: ios
|
|
- name: macOS
|
|
os: macos-latest
|
|
static: ON
|
|
qt: 6.2.2
|
|
qt_target: desktop
|
|
- name: macOS_static
|
|
os: macos-latest
|
|
static: OFF
|
|
qt: 6.2.2
|
|
qt_target: desktop
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
BUILD_TYPE: RelWithDebInfo
|
|
BUILD_MODE: ${{ matrix.static }}
|
|
QT_VERSION: ${{ matrix.qt }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: source
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: Install macOS dependencies
|
|
if: runner.os == 'macOS'
|
|
env:
|
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
|
run: |
|
|
brew list cmake || brew install cmake
|
|
brew list ccache || brew install ccache
|
|
brew list ninja || brew install ninja
|
|
|
|
- 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@v2
|
|
with:
|
|
version: ${{ env.QT_VERSION }}
|
|
dir: ${{ github.workspace }}
|
|
target: ${{ matrix.qt_target }}
|
|
|
|
- name: Prepare ccache
|
|
if: runner.os == 'macOS'
|
|
run: |
|
|
ccache --clear
|
|
ccache --set-config cache_dir=~/.ccache
|
|
|
|
- name: Cache ccache
|
|
uses: actions/cache@v2
|
|
env:
|
|
cache-name: ccache-v1
|
|
with:
|
|
path: ~/.ccache
|
|
key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.name }}-${{ matrix.qt }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }}
|
|
restore-keys: |
|
|
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.name }}-${{ matrix.qt }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}
|
|
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.name }}-${{ matrix.qt }}-${{ github.job }}-${{ github.ref }}
|
|
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.name }}-${{ matrix.qt }}-${{ github.job }}
|
|
|
|
- name: Clear ccache statistics
|
|
if: runner.os == 'macOS'
|
|
run: |
|
|
ccache --zero-stats
|
|
ccache --max-size=2G
|
|
ccache --show-stats -v
|
|
|
|
- name: Build maplibre-gl-native (macOS)
|
|
if: runner.os == 'macOS' && matrix.qt_target == 'desktop'
|
|
run: |
|
|
mkdir build && cd build
|
|
cmake ../source/ \
|
|
-G Ninja \
|
|
-DMBGL_WITH_QT=ON \
|
|
-DMBGL_QT_STATIC=${BUILD_MODE} \
|
|
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
|
-DCMAKE_INSTALL_PREFIX=../install \
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
|
ninja
|
|
ninja install
|
|
|
|
- name: Build maplibre-gl-native (iOS)
|
|
if: runner.os == 'macOS' && matrix.qt_target == 'ios'
|
|
run: |
|
|
mkdir build && cd build
|
|
cmake ../source/ \
|
|
-G"Ninja Multi-Config" \
|
|
-DCMAKE_SYSTEM_NAME=iOS \
|
|
-DCMAKE_CONFIGURATION_TYPES="Release;Debug" \
|
|
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \
|
|
-DMBGL_WITH_QT=ON \
|
|
-DMBGL_QT_STATIC=${BUILD_MODE} \
|
|
-DMBGL_QT_LIBRARY_ONLY=ON \
|
|
-DMBGL_QT_WITH_IOS_CCACHE=ON \
|
|
-DCMAKE_INSTALL_PREFIX=../install \
|
|
-DCMAKE_FIND_ROOT_PATH="$Qt5_Dir" \
|
|
-DCMAKE_PREFIX_PATH="$Qt5_Dir"
|
|
cmake --build . --config Release
|
|
cmake --install . --config Release
|
|
|
|
- name: Build maplibre-gl-native (Linux)
|
|
if: runner.os == 'Linux'
|
|
uses: ./source/.github/actions/qt5-build
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: maplibre-gl-native_${{ matrix.name }}_Qt${{ matrix.qt }}
|
|
path: install
|
|
|
|
- name: Show ccache statistics
|
|
if: runner.os == 'macOS'
|
|
run: |
|
|
ccache --show-stats -v
|