Qt build improvements and documentation (#277)
* Qt build improvements and documentation * Update include/mbgl/actor/actor_ref.hpp Co-authored-by: Oliver Wipfli <oliver.wipfli@leichteralsluft.ch>
This commit is contained in:
48
.github/workflows/qt-ci.yml
vendored
48
.github/workflows/qt-ci.yml
vendored
@@ -70,6 +70,11 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- name: Linux
|
||||
os: ubuntu-latest
|
||||
static: OFF
|
||||
qt: 5.15.2
|
||||
qt_target: desktop
|
||||
- name: macOS
|
||||
os: macos-latest
|
||||
static: OFF
|
||||
@@ -80,11 +85,11 @@ jobs:
|
||||
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: iOS_static
|
||||
os: macos-latest
|
||||
static: ON
|
||||
qt: 5.15.2
|
||||
qt_target: ios
|
||||
- name: macOS
|
||||
os: macos-latest
|
||||
static: ON
|
||||
@@ -97,7 +102,7 @@ jobs:
|
||||
qt_target: desktop
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
BUILD_TYPE: Debug
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
BUILD_MODE: ${{ matrix.static }}
|
||||
QT_VERSION: ${{ matrix.qt }}
|
||||
|
||||
@@ -109,7 +114,7 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install macOS dependencies
|
||||
if: runner.os == 'macOS'
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
@@ -120,6 +125,7 @@ jobs:
|
||||
brew list ninja || brew install ninja
|
||||
|
||||
- name: Setup Xcode
|
||||
if: runner.os == 'macOS'
|
||||
uses: maxim-lobanov/setup-xcode@v1
|
||||
with:
|
||||
xcode-version: latest-stable
|
||||
@@ -128,9 +134,11 @@ jobs:
|
||||
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
|
||||
@@ -148,6 +156,7 @@ jobs:
|
||||
${{ 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
|
||||
@@ -161,7 +170,6 @@ jobs:
|
||||
-G Ninja \
|
||||
-DMBGL_WITH_QT=ON \
|
||||
-DMBGL_QT_STATIC=${BUILD_MODE} \
|
||||
-DMBGL_QT_WITH_INTERNAL_SQLITE=OFF \
|
||||
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DCMAKE_INSTALL_PREFIX=../install \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
@@ -174,22 +182,25 @@ jobs:
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake ../source/ \
|
||||
-DCMAKE_TOOLCHAIN_FILE=../source/platform/ios/platform/ios/toolchain.cmake \
|
||||
-G XCode \
|
||||
-DPLATFORM=OS64COMBINED \
|
||||
-DDEPLOYMENT_TARGET=12.0 \
|
||||
-DENABLE_BITCODE=ON \
|
||||
-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_WITH_WERROR=OFF \
|
||||
-DMBGL_QT_LIBRARY_ONLY=ON \
|
||||
-DMBGL_QT_STATIC=${BUILD_MODE} \
|
||||
-DMBGL_QT_WITH_INTERNAL_SQLITE=OFF \
|
||||
-DMBGL_QT_LIBRARY_ONLY=ON \
|
||||
-DMBGL_QT_WITH_IOS_CCACHE=ON \
|
||||
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DCMAKE_INSTALL_PREFIX=../install
|
||||
-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:
|
||||
@@ -197,5 +208,6 @@ jobs:
|
||||
path: install
|
||||
|
||||
- name: Show ccache statistics
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
ccache --show-stats -v
|
||||
|
||||
Reference in New Issue
Block a user