diff --git a/.github/actions/qt5-build/Dockerfile b/.github/actions/qt5-build/Dockerfile index b2556249cfa..d0446ae20d8 100644 --- a/.github/actions/qt5-build/Dockerfile +++ b/.github/actions/qt5-build/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/maplibre/linux-builder:centos7-cmake3.10 +FROM ghcr.io/maplibre/linux-builder:centos7-cmake3.19 # Copy and set the entry point COPY entrypoint.sh /entrypoint.sh diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index 8d350a1aae1..601c7fa2778 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -6,10 +6,10 @@ on: branches: - main tags: - - 'android-*' + - "android-*" paths: - CMakeLists.txt - - 'platform/android/**' + - "platform/android/**" - ".github/workflows/android-ci.yml" - "bin/**" - "expression-test/**" @@ -36,12 +36,18 @@ jobs: IS_LOCAL_DEVELOPMENT: false MLN_ANDROID_STL: c++_static steps: - - uses: actions/checkout@v3 with: submodules: recursive fetch-depth: 0 - + + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v1.13 + with: + cmake-version: "3.19.x" + + - run: echo "cmake.dir=$(dirname "$(dirname "$(command -v cmake)")")" >> local.properties + - name: Cache node modules uses: actions/cache@v3 env: @@ -108,7 +114,7 @@ jobs: else echo "No secrets.MAPLIBRE_DEVELOPER_CONFIG_XML variable set, not copying..." fi - + - name: Build UI tests run: make android-ui-test-arm-v8 diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index d018098bf75..ef90db12465 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -6,17 +6,17 @@ on: branches: - main tags: - - 'node-*' + - "node-*" paths: - CMakeLists.txt - "platform/linux/**" - "platform/default/**" - - 'platform/node/**' - - 'platform/windows/**' - - 'platform/darwin/**' - - 'platform/macos/**' - - 'platform/ios/platform/darwin/**' - - 'platform/ios/platform/macos/**' + - "platform/node/**" + - "platform/windows/**" + - "platform/darwin/**" + - "platform/macos/**" + - "platform/ios/platform/darwin/**" + - "platform/ios/platform/macos/**" - ".github/workflows/node-ci.yml" - "bin/**" - "expression-test/**" @@ -37,12 +37,12 @@ on: - CMakeLists.txt - "platform/linux/**" - "platform/default/**" - - 'platform/node/**' - - 'platform/windows/**' - - 'platform/darwin/**' - - 'platform/macos/**' - - 'platform/ios/platform/darwin/**' - - 'platform/ios/platform/macos/**' + - "platform/node/**" + - "platform/windows/**" + - "platform/darwin/**" + - "platform/macos/**" + - "platform/ios/platform/darwin/**" + - "platform/ios/platform/macos/**" - ".github/workflows/node-ci.yml" - "bin/**" - "expression-test/**" @@ -76,7 +76,7 @@ jobs: arch: x86_64 continue-on-error: true env: - BUILDTYPE: 'Release' + BUILDTYPE: "Release" defaults: run: @@ -121,7 +121,6 @@ jobs: sudo apt-get update sudo apt-get install -y \ ccache \ - cmake \ ninja-build \ pkg-config \ xvfb \ @@ -147,6 +146,12 @@ jobs: if: runner.os == 'Windows' uses: ilammy/msvc-dev-cmd@v1 + - name: Setup cmake (Linux) + if: runner.os == 'Linux' && runner.arch != 'arm64' + uses: jwlawson/actions-setup-cmake@v1.13 + with: + cmake-version: "3.19.x" + - name: Set up ccache (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' uses: hendrikmuhs/ccache-action@v1 @@ -161,7 +166,7 @@ jobs: if: runner.os == 'Windows' uses: hendrikmuhs/ccache-action@v1 with: - variant: 'sccache' + variant: "sccache" key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} restore-keys: | ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} @@ -179,6 +184,7 @@ jobs: - name: Configure maplibre-native (Linux) if: runner.os == 'Linux' + shell: bash -leo pipefail {0} run: | cmake . -B build \ -G Ninja \ @@ -260,4 +266,3 @@ jobs: if: github.ref != 'refs/heads/main' run: | npm pack --dry-run - diff --git a/CMakeLists.txt b/CMakeLists.txt index 20304a42340..2c8e7111853 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10 FATAL_ERROR) +cmake_minimum_required(VERSION 3.19 FATAL_ERROR) option(MLN_WITH_CORE_ONLY "Build only the core bits, no platform code" OFF) option(MLN_WITH_CLANG_TIDY "Build with clang-tidy checks enabled" OFF) @@ -124,7 +124,7 @@ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_MINSIZEREL ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) -if(MLN_WITH_QT AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0") +if(MLN_WITH_QT) add_library(mbgl-core OBJECT) else() add_library(mbgl-core STATIC)