Update Qt CI for desktop platforms (#468)

This commit is contained in:
Tadej Novak
2022-09-11 21:47:12 +02:00
committed by GitHub
parent e147b11fdf
commit 3cca1b255f
11 changed files with 90 additions and 101 deletions

View File

@@ -1,4 +1,4 @@
FROM ghcr.io/maplibre/linux-builder:centos7
FROM ghcr.io/maplibre/linux-builder:centos7-cmake3.10
# Copy and set the entry point
COPY entrypoint.sh /entrypoint.sh

View File

@@ -11,9 +11,11 @@ export PATH="$Qt5_Dir/bin:$PATH"
mkdir build && cd build
cmake ../source/ \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
-DCMAKE_INSTALL_PREFIX=../install \
-DMBGL_WITH_QT=ON \
-DMBGL_QT_LIBRARY_ONLY=ON \
-DCMAKE_INSTALL_PREFIX="../install/"
-DMBGL_QT_LIBRARY_ONLY=ON
ninja
ninja install

5
.github/actions/qt6-build/Dockerfile vendored Normal file
View File

@@ -0,0 +1,5 @@
FROM ghcr.io/maplibre/linux-builder:centos8-latest
# Copy and set the entry point
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

6
.github/actions/qt6-build/action.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
# action.yml
name: 'Qt6 Linux Builder'
description: 'Helper action to build in a specific Docker container'
runs:
using: 'docker'
image: 'Dockerfile'

19
.github/actions/qt6-build/entrypoint.sh vendored Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash -l
set -e
set -x
export CCACHE_DIR="$GITHUB_WORKSPACE/.ccache"
export PATH="$Qt6_DIR/bin:$PATH"
mkdir build && cd build
qt-cmake ../source/ \
-G Ninja \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
-DCMAKE_INSTALL_PREFIX=../install \
-DMBGL_WITH_QT=ON \
-DMBGL_QT_LIBRARY_ONLY=ON
ninja
ninja install