diff --git a/.github/actions/qt5-build/action.yml b/.github/actions/qt5-build/action.yml index 4e3ba80..0499f6e 100644 --- a/.github/actions/qt5-build/action.yml +++ b/.github/actions/qt5-build/action.yml @@ -1,13 +1,8 @@ # action.yml -name: 'Qt5 Linux Builder' -description: 'Helper action to build in a specific Docker container' -inputs: - build-type: - description: 'Build type' - required: true - default: 'plugin' # or 'library' +name: "Qt5 Linux Builder" +description: "Helper action to build in a specific Docker container" runs: - using: 'docker' - image: 'Dockerfile' + using: "docker" + image: "Dockerfile" args: - ${{ inputs.build-type }} diff --git a/.github/actions/qt5-build/entrypoint.sh b/.github/actions/qt5-build/entrypoint.sh index ff63390..19a2eca 100755 --- a/.github/actions/qt5-build/entrypoint.sh +++ b/.github/actions/qt5-build/entrypoint.sh @@ -6,26 +6,16 @@ set -e set -x export CCACHE_DIR="$GITHUB_WORKSPACE/.ccache" -export PATH=$Qt5_Dir/bin:$PATH +export PATH="$Qt5_Dir/bin:$PATH" qmake --version -if [[ "$1" = "library" ]]; then - mkdir build && cd build - cmake ../source/vendor/maplibre-native/ \ - -G Ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_INSTALL_PREFIX=../install-maplibre \ - -DMLN_WITH_QT=ON \ - -DMLN_QT_LIBRARY_ONLY=ON - ninja - ninja install -elif [[ "$1" = "plugin" ]]; then - mkdir build && cd build - qmake ../source/ MAPLIBRE_PATH=../install-maplibre - make -j2 - INSTALL_ROOT=../install make install -else - exit 1 -fi +mkdir build && cd build +cmake ../source/ \ + -G Ninja \ + -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_INSTALL_PREFIX="../install" +ninja +ninja test +ninja install diff --git a/.github/actions/qt6-build/action.yml b/.github/actions/qt6-build/action.yml index 10a69a2..80b54aa 100644 --- a/.github/actions/qt6-build/action.yml +++ b/.github/actions/qt6-build/action.yml @@ -1,13 +1,8 @@ # action.yml -name: 'Qt6 Linux Builder' -description: 'Helper action to build in a specific Docker container' -inputs: - build-type: - description: 'Build type' - required: true - default: 'plugin' # or 'library' +name: "Qt6 Linux Builder" +description: "Helper action to build in a specific Docker container" runs: - using: 'docker' - image: 'Dockerfile' + using: "docker" + image: "Dockerfile" args: - ${{ inputs.build-type }} diff --git a/.github/actions/qt6-build/entrypoint.sh b/.github/actions/qt6-build/entrypoint.sh index 2dfc209..f8d8d51 100755 --- a/.github/actions/qt6-build/entrypoint.sh +++ b/.github/actions/qt6-build/entrypoint.sh @@ -4,15 +4,16 @@ set -e set -x export CCACHE_DIR="$GITHUB_WORKSPACE/.ccache" -export PATH=$Qt6_DIR/bin:$PATH +export PATH="$Qt6_DIR/bin:$PATH" qmake --version mkdir build && cd build qt-cmake ../source/ \ -G Ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DQT_USE_CCACHE=ON + -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_INSTALL_PREFIX="../install" ninja -DESTDIR=../install ninja install +ninja test +ninja install diff --git a/.github/workflows/Android-Qt5.yml b/.github/workflows/Android-Qt5.yml deleted file mode 100644 index 2b7db71..0000000 --- a/.github/workflows/Android-Qt5.yml +++ /dev/null @@ -1,254 +0,0 @@ -name: Android Qt5 CI - -on: - workflow_dispatch: - push: - branches: - - main - tags: - - "**" - paths-ignore: - - ".gitignore" - - "README.md" - # ignore CI for other platforms - - ".github/FUNDING.yml" - - ".github/actions/**" - - ".github/workflows/Android-Qt6.yml" - - ".github/workflows/iOS-Qt5.yml" - - ".github/workflows/iOS-Qt6.yml" - - ".github/workflows/Linux-Qt5.yml" - - ".github/workflows/Linux-Qt6.yml" - - ".github/workflows/macOS-Qt5.yml" - - ".github/workflows/macOS-Qt6.yml" - - ".github/workflows/Windows-Qt5.yml" - - ".github/workflows/Windows-Qt6.yml" - - pull_request: - branches: - - main - paths-ignore: - - ".gitignore" - - "README.md" - # ignore CI for other platforms - - ".github/FUNDING.yml" - - ".github/actions/**" - - ".github/workflows/Android-Qt6.yml" - - ".github/workflows/iOS-Qt5.yml" - - ".github/workflows/iOS-Qt6.yml" - - ".github/workflows/Linux-Qt5.yml" - - ".github/workflows/Linux-Qt6.yml" - - ".github/workflows/macOS-Qt5.yml" - - ".github/workflows/macOS-Qt6.yml" - - ".github/workflows/Windows-Qt5.yml" - - ".github/workflows/Windows-Qt6.yml" - -concurrency: - # cancel jobs on PRs only - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -env: - QT_VERSION: 5.15.2 - -jobs: - build-core: - name: "Build maplibre-native for ${{ matrix.config.abi }}" - runs-on: ubuntu-22.04 - strategy: - matrix: - config: - - abi: x86 - - abi: x86_64 - - abi: armeabi-v7a - - abi: arm64-v8a - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: source - submodules: recursive - fetch-depth: 0 - - - name: Download Qt - uses: jurplel/install-qt-action@v3 - with: - aqtversion: ==3.0.* - version: ${{ env.QT_VERSION }} - target: "android" - arch: "android" - - - name: Set up OpenJDK 11 - uses: actions/setup-java@v3 - with: - distribution: "adopt" - java-version: "11" - - - name: Setup ninja - uses: seanmiddleditch/gha-setup-ninja@v3 - - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: Android_maplibre-native_${{ matrix.config.abi }}_legacy - append-timestamp: false - - - name: Build maplibre-native - env: - ANDROID_ABI: ${{ matrix.config.abi }} - run: | - mkdir build && cd build - cmake ../source/vendor/maplibre-native \ - -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \ - -DANDROID_ABI="${ANDROID_ABI}" \ - -DANDROID_CCACHE=ccache \ - -DANDROID_NATIVE_API_LEVEL=21 \ - -G Ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_FLAGS_RELEASE=-g0 \ - -DCMAKE_FIND_ROOT_PATH="${Qt5_Dir}" \ - -DCMAKE_INSTALL_PREFIX=../install-maplibre \ - -DCMAKE_PREFIX_PATH="${Qt5_Dir}" \ - -DMLN_WITH_QT=ON \ - -DMLN_QT_LIBRARY_ONLY=ON - ninja - ninja install - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: maplibre-native_Android_${{ matrix.config.abi }} - path: install-maplibre - - prepare-core: - name: "Prepare maplibre-native" - runs-on: ubuntu-22.04 - needs: build-core - - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: maplibre-native_Android_x86 - path: install-x86 - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: maplibre-native_Android_x86_64 - path: install-x86_64 - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: maplibre-native_Android_armeabi-v7a - path: install-armeabi-v7a - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: maplibre-native_Android_arm64-v8a - path: install-arm64-v8a - - - name: Prepare artifacts - run: | - cp -r install-arm64-v8a install-maplibre - cp -r install-armeabi-v7a/lib/* install-maplibre/lib/ - cp -r install-x86/lib/* install-maplibre/lib/ - cp -r install-x86_64/lib/* install-maplibre/lib/ - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: maplibre-native_Android - path: install-maplibre - - build-plugin: - name: "Build qt-geoservices-maplibre-gl" - runs-on: ubuntu-22.04 - needs: prepare-core - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: source - fetch-depth: 0 - - - name: Download Qt - uses: jurplel/install-qt-action@v3 - with: - aqtversion: ==3.0.* - version: ${{ env.QT_VERSION }} - target: android - arch: "android" - - - name: Set up OpenJDK 11 - uses: actions/setup-java@v3 - with: - distribution: "adopt" - java-version: "11" - - - name: Setup ninja - uses: seanmiddleditch/gha-setup-ninja@v3 - - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: Android_qt-geoservices-maplibre-gl_legacy - append-timestamp: false - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: maplibre-native_Android - path: install-maplibre - - - name: Build qt-geoservices-maplibre-gl - run: | - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - mkdir build && cd build - qmake ../source/ MAPLIBRE_PATH=../install-maplibre - make -j2 - INSTALL_ROOT=../install make install - - - name: Create artifacts - run: | - pushd install/home/runner/work/maplibre-native-qt - tar cjvf ../../../../../qt-geoservices-maplibre-gl_Android.tar.bz2 Qt - popd - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_Android - path: qt-geoservices-maplibre-gl_Android.tar.bz2 - - release: - name: "Release qt-geoservices-maplibre-gl" - if: github.ref_type == 'tag' - runs-on: ubuntu-22.04 - needs: build-plugin - permissions: - contents: write - - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_Android - - - name: Name tarball - env: - TAG_NAME: ${{ github.ref_name }} - run: | - mv qt-geoservices-maplibre-gl_Android.tar.bz2 qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_Android.tar.bz2 - - - name: Release - uses: ncipollo/release-action@v1 - with: - artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_Android.tar.bz2 - allowUpdates: true - draft: true diff --git a/.github/workflows/Android-Qt6.yml b/.github/workflows/Android.yml similarity index 55% rename from .github/workflows/Android-Qt6.yml rename to .github/workflows/Android.yml index 4cda3f6..a43d5e8 100644 --- a/.github/workflows/Android-Qt6.yml +++ b/.github/workflows/Android.yml @@ -13,15 +13,10 @@ on: # # ignore CI for other platforms # - ".github/FUNDING.yml" # - ".github/actions/**" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/iOS-Qt5.yml" - # - ".github/workflows/iOS-Qt6.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/Linux-Qt6.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/macOS-Qt6.yml" - # - ".github/workflows/Windows-Qt5.yml" - # - ".github/workflows/Windows-Qt6.yml" + # - ".github/workflows/iOS.yml" + # - ".github/workflows/Linux.yml" + # - ".github/workflows/macOS.yml" + # - ".github/workflows/Windows.yml" # pull_request: # branches: @@ -32,15 +27,10 @@ on: # # ignore CI for other platforms # - ".github/FUNDING.yml" # - ".github/actions/**" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/iOS-Qt5.yml" - # - ".github/workflows/iOS-Qt6.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/Linux-Qt6.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/macOS-Qt6.yml" - # - ".github/workflows/Windows-Qt5.yml" - # - ".github/workflows/Windows-Qt6.yml" + # - ".github/workflows/iOS.yml" + # - ".github/workflows/Linux.yml" + # - ".github/workflows/macOS.yml" + # - ".github/workflows/Windows.yml" concurrency: # cancel jobs on PRs only @@ -48,11 +38,11 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: - QT_VERSION: 6.5.0 + QT_VERSION: 6.5.3 jobs: - build-plugin: - name: "Build qt-geoservices-maplibre-gl for ${{ matrix.config.abi }}" + build: + name: Build QMapLibre for ${{ matrix.config.abi }} runs-on: ubuntu-22.04 strategy: matrix: @@ -78,20 +68,20 @@ jobs: id: qt-desktop uses: jurplel/install-qt-action@v3 with: - aqtversion: ==3.0.* + aqtversion: ==3.1.* version: ${{ env.QT_VERSION }} - modules: qtlocation qtpositioning qtshadertools + modules: qtlocation qtpositioning set-env: false - name: Download Qt (Android) id: qt-android uses: jurplel/install-qt-action@v3 with: - aqtversion: ==3.0.* + aqtversion: ==3.1.* version: ${{ env.QT_VERSION }} target: android arch: ${{ matrix.config.arch }} - modules: qtlocation qtpositioning qtshadertools + modules: qtlocation qtpositioning - name: Fix Qt release if: ${{ matrix.config.abi }} == 'armeabi-v7a' @@ -102,8 +92,8 @@ jobs: - name: Set up OpenJDK 11 uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: '11' + distribution: adopt + java-version: 11 - name: Setup ninja uses: seanmiddleditch/gha-setup-ninja@v3 @@ -111,58 +101,65 @@ jobs: - name: Set up ccache uses: hendrikmuhs/ccache-action@v1 with: - key: Android_qt-geoservices-maplibre-gl_${{ matrix.config.abi }} + key: Android_QMapLibre_${{ matrix.config.abi }} append-timestamp: false - - name: Build qt-geoservices-maplibre-gl + - name: Build QMapLibre env: ANDROID_ABI: ${{ matrix.config.abi }} run: | mkdir build && cd build qt-cmake ../source/ \ -G Ninja \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DQT_HOST_PATH=$(readlink -f $Qt6_DIR/../gcc_64) \ - -DQT_USE_CCACHE=ON + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_INSTALL_PREFIX="../install" \ + -DQT_HOST_PATH="$(readlink -f "$Qt6_DIR/../gcc_64")" ninja - DESTDIR=../install ninja install + ninja test + ninja install + + - name: Create artifacts + run: | + pushd install + tar cjvf ../QMapLibre_Android.tar.bz2 * + popd - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: qt-geoservices-maplibre-gl_Android_${{ matrix.config.abi }} - path: install/home/runner/work/qt-geoservices-maplibre-gl + name: QMapLibre_Android_${{ matrix.config.abi }} + path: install/home/runner/work/QMapLibre - combine-plugin: - name: "Combine qt-geoservices-maplibre-gl" + combine: + name: Combine QMapLibre runs-on: ubuntu-22.04 - needs: build-plugin + needs: build steps: - name: Download artifacts for x86 uses: actions/download-artifact@v3 with: - name: qt-geoservices-maplibre-gl_Android_x86 + name: QMapLibre_Android_x86 path: install-x86 - name: Download artifacts for x86_64 uses: actions/download-artifact@v3 with: - name: qt-geoservices-maplibre-gl_Android_x86_64 + name: QMapLibre_Android_x86_64 path: install-x86_64 - name: Download artifacts for armeabi-v7a uses: actions/download-artifact@v3 with: - name: qt-geoservices-maplibre-gl_Android_armeabi-v7a + name: QMapLibre_Android_armeabi-v7a path: install-armeabi-v7a - name: Download artifacts for arm64-v8a uses: actions/download-artifact@v3 with: - name: qt-geoservices-maplibre-gl_Android_arm64-v8a + name: QMapLibre_Android_arm64-v8a path: install-arm64-v8a - name: Combine artifacts @@ -175,39 +172,38 @@ jobs: - name: Create artifacts run: | pushd install - tar cjvf ../qt-geoservices-maplibre-gl_Android.tar.bz2 Qt + tar cjvf ../QMapLibre_Android.tar.bz2 Qt popd - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: qt-geoservices-maplibre-gl_Android - path: qt-geoservices-maplibre-gl_Android.tar.bz2 + name: QMapLibre_Android + path: QMapLibre_Android.tar.bz2 release: - name: "Release qt-geoservices-maplibre-gl" + name: Release QMapLibre if: github.ref_type == 'tag' runs-on: ubuntu-22.04 - needs: combine-plugin + needs: combine permissions: contents: write steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_Android - - - name: Make tarball - env: - TAG_NAME: ${{ github.ref_name }} - run: | - tar xvf qt-geoservices-maplibre-gl_Android.tar.bz2 - tar cjvf qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_Android.tar.bz2 Qt - - - name: Release - uses: ncipollo/release-action@v1 - with: - artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_Android.tar.bz2 - allowUpdates: true - draft: true + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: QMapLibre_Android + + - name: Make tarball + env: + TAG_NAME: ${{ github.ref_name }} + run: | + mv QMapLibre_Android.tar.bz2 QMapLibre_${TAG_NAME}_Qt${QT_VERSION}_Android.tar.bz2 + + - name: Release + uses: ncipollo/release-action@v1 + with: + artifacts: QMapLibre_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_Android.tar.bz2 + allowUpdates: true + draft: true diff --git a/.github/workflows/Linux-Qt5.yml b/.github/workflows/Linux-Qt5.yml deleted file mode 100644 index 9a6e2ed..0000000 --- a/.github/workflows/Linux-Qt5.yml +++ /dev/null @@ -1,163 +0,0 @@ -name: Linux Qt5 CI - -on: - workflow_dispatch: - push: - branches: - - main - tags: - - "**" - paths-ignore: - - ".gitignore" - - "README.md" - # ignore CI for other platforms - - ".github/FUNDING.yml" - - ".github/workflows/Android-Qt5.yml" - - ".github/workflows/Android-Qt6.yml" - - ".github/workflows/iOS-Qt5.yml" - - ".github/workflows/iOS-Qt6.yml" - - ".github/workflows/Linux-Qt6.yml" - - ".github/workflows/macOS-Qt5.yml" - - ".github/workflows/macOS-Qt6.yml" - - ".github/workflows/Windows-Qt5.yml" - - ".github/workflows/Windows-Qt6.yml" - - pull_request: - branches: - - main - paths-ignore: - - ".gitignore" - - "README.md" - # ignore CI for other platforms - - ".github/FUNDING.yml" - - ".github/workflows/Android-Qt5.yml" - - ".github/workflows/Android-Qt6.yml" - - ".github/workflows/iOS-Qt5.yml" - - ".github/workflows/iOS-Qt6.yml" - - ".github/workflows/Linux-Qt6.yml" - - ".github/workflows/macOS-Qt5.yml" - - ".github/workflows/macOS-Qt6.yml" - - ".github/workflows/Windows-Qt5.yml" - - ".github/workflows/Windows-Qt6.yml" - -concurrency: - # cancel jobs on PRs only - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -env: - QT_VERSION: 5.15.2 - -jobs: - build-core: - name: "Build maplibre-native" - runs-on: ubuntu-22.04 - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: source - submodules: recursive - fetch-depth: 0 - - - name: Download Qt - uses: jurplel/install-qt-action@v3 - with: - aqtversion: ==3.0.* - version: ${{ env.QT_VERSION }} - dir: ${{ github.workspace }} - target: desktop - - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: Linux_maplibre-native_legacy - append-timestamp: false - - - name: Build maplibre-native - uses: ./source/.github/actions/qt5-build - with: - build-type: library - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: maplibre-native_Linux - path: install-maplibre - - build-plugin: - name: "Build qt-geoservices-maplibre-gl" - runs-on: ubuntu-22.04 - needs: build-core - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: source - fetch-depth: 0 - - - name: Download Qt - uses: jurplel/install-qt-action@v3 - with: - aqtversion: ==3.0.* - version: ${{ env.QT_VERSION }} - dir: ${{ github.workspace }} - target: desktop - - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: Linux_qt-geoservices-maplibre-gl_legacy - append-timestamp: false - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: maplibre-native_Linux - path: install-maplibre - - - name: Build qt-geoservices-maplibre-gl - uses: ./source/.github/actions/qt5-build - with: - build-type: plugin - - - name: Create artifacts - run: | - pushd install/github/workspace - tar cjvf ../../../qt-geoservices-maplibre-gl_Linux.tar.bz2 Qt - popd - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_Linux - path: qt-geoservices-maplibre-gl_Linux.tar.bz2 - - release: - name: "Release qt-geoservices-maplibre-gl" - if: github.ref_type == 'tag' - runs-on: ubuntu-22.04 - needs: build-plugin - permissions: - contents: write - - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_Linux - - - name: Name tarball - env: - TAG_NAME: ${{ github.ref_name }} - run: | - mv qt-geoservices-maplibre-gl_Linux.tar.bz2 qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_Linux.tar.bz2 - - - name: Release - uses: ncipollo/release-action@v1 - with: - artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_Linux.tar.bz2 - allowUpdates: true - draft: true diff --git a/.github/workflows/Linux-Qt6.yml b/.github/workflows/Linux-Qt6.yml deleted file mode 100644 index 8da0013..0000000 --- a/.github/workflows/Linux-Qt6.yml +++ /dev/null @@ -1,120 +0,0 @@ -name: Linux Qt6 CI - -on: - workflow_dispatch: - # push: - # branches: - # - main - # tags: - # - '**' - # paths-ignore: - # - ".gitignore" - # - "README.md" - # # ignore CI for other platforms - # - ".github/FUNDING.yml" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/Android-Qt6.yml" - # - ".github/workflows/iOS-Qt5.yml" - # - ".github/workflows/iOS-Qt6.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/macOS-Qt6.yml" - # - ".github/workflows/Windows-Qt5.yml" - # - ".github/workflows/Windows-Qt6.yml" - - # pull_request: - # branches: - # - main - # paths-ignore: - # - ".gitignore" - # - "README.md" - # # ignore CI for other platforms - # - ".github/FUNDING.yml" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/Android-Qt6.yml" - # - ".github/workflows/iOS-Qt5.yml" - # - ".github/workflows/iOS-Qt6.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/macOS-Qt6.yml" - # - ".github/workflows/Windows-Qt5.yml" - # - ".github/workflows/Windows-Qt6.yml" - -concurrency: - # cancel jobs on PRs only - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -env: - QT_VERSION: 6.5.0 - -jobs: - build-plugin: - name: "Build qt-geoservices-maplibre-gl" - runs-on: ubuntu-22.04 - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: source - submodules: recursive - fetch-depth: 0 - - - name: Download Qt - uses: jurplel/install-qt-action@v3 - with: - aqtversion: ==3.0.* - version: ${{ env.QT_VERSION }} - dir: ${{ github.workspace }} - target: desktop - modules: qtlocation qtpositioning qtshadertools - - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: Linux_qt-geoservices-maplibre-gl - append-timestamp: false - - - name: Build qt-geoservices-maplibre-gl - uses: ./source/.github/actions/qt6-build - - - name: Create artifacts - run: | - pushd install/github/workspace - tar cjvf ../../../qt-geoservices-maplibre-gl_Linux.tar.bz2 Qt - popd - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_Linux - path: qt-geoservices-maplibre-gl_Linux.tar.bz2 - - release: - name: "Release qt-geoservices-maplibre-gl" - if: github.ref_type == 'tag' - runs-on: ubuntu-22.04 - needs: build-plugin - permissions: - contents: write - - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_Linux - - - name: Make tarball - env: - TAG_NAME: ${{ github.ref_name }} - run: | - tar xvf qt-geoservices-maplibre-gl_Linux.tar.bz2 - tar cjvf qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_Linux.tar.bz2 Qt - - - name: Release - uses: ncipollo/release-action@v1 - with: - artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_Linux.tar.bz2 - allowUpdates: true - draft: true diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml new file mode 100644 index 0000000..82b425b --- /dev/null +++ b/.github/workflows/Linux.yml @@ -0,0 +1,124 @@ +name: Linux CI + +on: + workflow_dispatch: + push: + branches: + - main + tags: + - "**" + paths-ignore: + - ".gitignore" + - "README.md" + # ignore CI for other platforms + - ".github/FUNDING.yml" + - ".github/workflows/Android.yml" + - ".github/workflows/iOS.yml" + - ".github/workflows/macOS.yml" + - ".github/workflows/Windows.yml" + + pull_request: + branches: + - main + paths-ignore: + - ".gitignore" + - "README.md" + # ignore CI for other platforms + - ".github/FUNDING.yml" + - ".github/workflows/Android.yml" + - ".github/workflows/iOS.yml" + - ".github/workflows/macOS.yml" + - ".github/workflows/Windows.yml" + +concurrency: + # cancel jobs on PRs only + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + build-and-test: + name: Build QMapLibre (Qt ${{ matrix.qt_version}}) + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - qt_series: 5 + qt_version: 5.15.2 + qt_modules: "" + - qt_series: 6 + qt_version: 6.5.3 + qt_modules: qtlocation qtpositioning + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + path: source + submodules: recursive + fetch-depth: 0 + + - name: Download Qt + uses: jurplel/install-qt-action@v3 + with: + aqtversion: ==3.1.* + version: ${{ matrix.qt_version }} + dir: ${{ github.workspace }} + target: desktop + modules: ${{ matrix.qt_modules }} + + - name: Set up ccache + uses: hendrikmuhs/ccache-action@v1 + with: + key: Linux_QMapLibre_${{ matrix.qt_version }} + append-timestamp: false + + - name: Build QMapLibre (Qt5) + if: matrix.qt_series == 5 + uses: ./source/.github/actions/qt5-build + + - name: Build QMapLibre (Qt6) + if: matrix.qt_series == 6 + uses: ./source/.github/actions/qt6-build + + - name: Create artifacts + run: | + pushd install + tar cjvf ../QMapLibre_Linux.tar.bz2 * + popd + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: QMapLibre_Linux_${{ matrix.qt_version }} + path: QMapLibre_Linux.tar.bz2 + + release: + name: Release QMapLibre + if: github.ref_type == 'tag' + runs-on: ubuntu-22.04 + needs: build-and-test + permissions: + contents: write + strategy: + matrix: + qt_version: [5.15.2, 6.5.3] + + steps: + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: QMapLibre_Linux_${{ matrix.qt_version }} + + - name: Make tarball + env: + TAG_NAME: ${{ github.ref_name }} + QT_VERSION: ${{ matrix.qt_version }} + run: | + mv QMapLibre_Linux.tar.bz2 QMapLibre_${TAG_NAME}_Qt${QT_VERSION}_Linux.tar.bz2 + + - name: Release + uses: ncipollo/release-action@v1 + with: + artifacts: QMapLibre_${{ github.ref_name }}_Qt${{ matrix.qt_version }}_Linux.tar.bz2 + allowUpdates: true + draft: true diff --git a/.github/workflows/Windows-Qt5.yml b/.github/workflows/Windows-Qt5.yml deleted file mode 100644 index 74ae0da..0000000 --- a/.github/workflows/Windows-Qt5.yml +++ /dev/null @@ -1,317 +0,0 @@ -name: Windows Qt5 CI - -on: - workflow_dispatch: - # push: - # branches: - # - main - # tags: - # - '**' - # paths-ignore: - # - ".gitignore" - # - "README.md" - # # ignore CI for other platforms - # - ".github/FUNDING.yml" - # - ".github/actions/**" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/Android-Qt6.yml" - # - ".github/workflows/iOS-Qt5.yml" - # - ".github/workflows/iOS-Qt6.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/Linux-Qt6.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/macOS-Qt6.yml" - # - ".github/workflows/Windows-Qt6.yml" - - # pull_request: - # branches: - # - main - # paths-ignore: - # - ".gitignore" - # - "README.md" - # # ignore CI for other platforms - # - ".github/FUNDING.yml" - # - ".github/actions/**" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/Android-Qt6.yml" - # - ".github/workflows/iOS-Qt5.yml" - # - ".github/workflows/iOS-Qt6.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/Linux-Qt6.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/macOS-Qt6.yml" - # - ".github/workflows/Windows-Qt6.yml" - -concurrency: - # cancel jobs on PRs only - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -env: - QT_VERSION: 5.15.2 - CCACHE_CONFIGPATH: C:/Users/runneradmin/AppData/Roaming/ccache/ccache.conf - -jobs: - build-core: - name: "Build maplibre-native for ${{ matrix.config.qtarch }} (${{ matrix.config.build }})" - runs-on: windows-2022 - strategy: - matrix: - config: - - arch: win64_msvc2019_64 - qtarch: msvc2019_64 - compiler: x64 - compiler_version: 14.29 - tools: "" - build: Release - - arch: win64_msvc2019_64 - qtarch: msvc2019_64 - compiler: x64 - compiler_version: 14.29 - tools: "" - build: Debug - - arch: win64_mingw81 - qtarch: mingw81_64 - compiler: mingw810_64 - compiler_version: 8.10.0 - tools: tools_mingw,qt.tools.win64_mingw810 - build: Release - - arch: win64_mingw81 - qtarch: mingw81_64 - compiler: mingw810_64 - compiler_version: 8.10.0 - tools: tools_mingw,qt.tools.win64_mingw810 - build: Debug - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: source - fetch-depth: 0 - - - name: Setup submodules - shell: bash - run: | - cd source - auth_header="$(git config --local --get http.https://github.com/.extraheader)" - git submodule sync --recursive - git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 || true - - - name: Download Qt - uses: jurplel/install-qt-action@v3 - with: - aqtversion: "==2.1.*" - version: ${{ env.QT_VERSION }} - target: desktop - arch: ${{ matrix.config.arch }} - tools: ${{ matrix.config.tools }} - - - name: Setup ninja - uses: seanmiddleditch/gha-setup-ninja@v3 - - - name: Setup MSVC - if: matrix.config.arch == 'win64_msvc2019_64' - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: ${{ matrix.config.compiler }} - toolset: ${{ matrix.config.compiler_version }} - - - name: Update ccache - run: | - choco upgrade ccache - ccache --version - - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: Windows_qt-geoservices-maplibre-gl_${{ matrix.config.qtarch }}_${{ matrix.config.build }}_legacy - append-timestamp: false - - - name: Build maplibre-native - shell: bash - env: - BUILD_TYPE: ${{ matrix.config.build }} - COMPILER_TYPE: ${{ matrix.config.compiler }} - run: | - export PATH=$IQTA_TOOLS/$COMPILER_TYPE/bin:$PATH - echo "$PATH" - mkdir build && cd build - cmake.exe ../source/vendor/maplibre-native \ - -G Ninja \ - -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \ - -DCMAKE_C_COMPILER_LAUNCHER="ccache.exe" \ - -DCMAKE_CXX_COMPILER_LAUNCHER="ccache.exe" \ - -DCMAKE_INSTALL_PREFIX="../install-maplibre" \ - -DMLN_WITH_QT=ON \ - -DMLN_QT_LIBRARY_ONLY=ON - ninja.exe - ninja.exe install - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: maplibre-native_Windows_${{ matrix.config.qtarch }}_${{ matrix.config.build }} - path: install-maplibre - - prepare-core: - name: "Prepare maplibre-native" - runs-on: windows-latest - needs: build-core - strategy: - matrix: - config: - - qtarch: msvc2019_64 - - qtarch: mingw81_64 - - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: maplibre-native_Windows_${{ matrix.config.qtarch }}_Release - path: install-Release - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: maplibre-native_Windows_${{ matrix.config.qtarch }}_Debug - path: install-Debug - - - name: Prepare artifacts - run: | - cp -r install-Release install-maplibre - cp -r install-Debug/lib/* install-maplibre/lib - shell: bash - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: maplibre-native_Windows_${{ matrix.config.qtarch }} - path: install-maplibre - - build-plugin: - name: "Build qt-geoservices-maplibre-gl for ${{ matrix.config.qtarch }}" - runs-on: windows-latest - needs: prepare-core - strategy: - matrix: - config: - - arch: win64_msvc2019_64 - qtarch: msvc2019_64 - compiler: x64 - compiler_version: 14.29 - tools: "" - - arch: win64_mingw81 - qtarch: mingw81_64 - compiler: mingw810_64 - compiler_version: 8.10.0 - tools: tools_mingw,qt.tools.win64_mingw810 - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: source - fetch-depth: 0 - - - name: Download Qt - uses: jurplel/install-qt-action@v3 - with: - aqtversion: "==2.1.*" - version: ${{ env.QT_VERSION }} - target: desktop - arch: ${{ matrix.config.arch }} - tools: ${{ matrix.config.tools }} - - - name: Setup ninja - uses: seanmiddleditch/gha-setup-ninja@v3 - - - name: Setup MSVC - if: matrix.config.arch == 'win64_msvc2019_64' - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: ${{ matrix.config.compiler }} - toolset: ${{ matrix.config.compiler_version }} - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: maplibre-native_Windows_${{ matrix.config.qtarch }} - path: install-maplibre - - - name: Build qt-geoservices-maplibre-gl (MSVC) - if: matrix.config.arch == 'win64_msvc2019_64' - run: | - mkdir build - mkdir install - cd build - qmake ../source MAPLIBRE_PATH=../install-maplibre - nmake - $env:INSTALL_ROOT = "..\install" - nmake install - - - name: Build qt-geoservices-maplibre-gl (MinGW) - if: matrix.config.arch == 'win64_mingw81' - shell: bash - env: - COMPILER_TYPE: ${{ matrix.config.compiler }} - run: | - export PATH=$IQTA_TOOLS/$COMPILER_TYPE/bin:$PATH - echo "$PATH" - mkdir install - mkdir build && cd build - qmake.exe ../source MAPLIBRE_PATH=../install-maplibre - mingw32-make.exe - INSTALL_ROOT=../install mingw32-make.exe install - - - name: Create artifacts - shell: bash - env: - TAG_ARCH: ${{ matrix.config.qtarch }} - run: | - pushd install/a/maplibre-native-qt - tar cjvf ../../../qt-geoservices-maplibre-gl_Windows_${TAG_ARCH}.tar.bz2 Qt - popd - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_Windows_${{ matrix.config.qtarch }} - path: qt-geoservices-maplibre-gl_Windows_${{ matrix.config.qtarch }}.tar.bz2 - - release: - name: "Release qt-geoservices-maplibre-gl" - if: github.ref_type == 'tag' - runs-on: windows-2022 - needs: build-plugin - strategy: - matrix: - config: - - qtarch: msvc2019_64 - outarch: msvc2019 - - qtarch: mingw81_64 - outarch: mingw - permissions: - contents: write - - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_Windows_${{ matrix.config.qtarch }} - - - name: Make tarball - shell: bash - env: - TAG_NAME: ${{ github.ref_name }} - QT_ARCH: ${{ matrix.config.qtarch }} - TAG_ARCH: ${{ matrix.config.outarch }} - run: | - mv qt-geoservices-maplibre-gl_Windows_${QT_ARCH}.tar.bz2 qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_win64_${TAG_ARCH}.tar.bz2 - - - name: Release - uses: ncipollo/release-action@v1 - with: - artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_win64_${{ matrix.config.outarch }}.tar.bz2 - allowUpdates: true - draft: true diff --git a/.github/workflows/Windows-Qt6.yml b/.github/workflows/Windows.yml similarity index 61% rename from .github/workflows/Windows-Qt6.yml rename to .github/workflows/Windows.yml index 7828faf..37c97e1 100644 --- a/.github/workflows/Windows-Qt6.yml +++ b/.github/workflows/Windows.yml @@ -1,4 +1,4 @@ -name: Windows Qt6 CI +name: Windows CI on: workflow_dispatch: @@ -13,15 +13,10 @@ on: # # ignore CI for other platforms # - ".github/FUNDING.yml" # - ".github/actions/**" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/Android-Qt6.yml" - # - ".github/workflows/iOS-Qt5.yml" - # - ".github/workflows/iOS-Qt6.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/Linux-Qt6.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/macOS-Qt6.yml" - # - ".github/workflows/Windows-Qt5.yml" + # - ".github/workflows/Android.yml" + # - ".github/workflows/iOS.yml" + # - ".github/workflows/Linux.yml" + # - ".github/workflows/macOS.yml" # pull_request: # branches: @@ -32,15 +27,10 @@ on: # # ignore CI for other platforms # - ".github/FUNDING.yml" # - ".github/actions/**" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/Android-Qt6.yml" - # - ".github/workflows/iOS-Qt5.yml" - # - ".github/workflows/iOS-Qt6.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/Linux-Qt6.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/macOS-Qt6.yml" - # - ".github/workflows/Windows-Qt5.yml" + # - ".github/workflows/Android.yml" + # - ".github/workflows/iOS.yml" + # - ".github/workflows/Linux.yml" + # - ".github/workflows/macOS.yml" concurrency: # cancel jobs on PRs only @@ -53,7 +43,7 @@ env: jobs: build-plugin: - name: "Build qt-geoservices-maplibre-gl for ${{ matrix.config.qtarch }}" + name: Build QMapLibre for ${{ matrix.config.qtarch }} runs-on: windows-2022 strategy: matrix: @@ -62,7 +52,7 @@ jobs: qtarch: msvc2019_64 compiler: x64 compiler_version: 14.29 - tools: '' + tools: "" - arch: win64_mingw qtarch: mingw_64 compiler: mingw1120_64 @@ -87,11 +77,11 @@ jobs: - name: Download Qt uses: jurplel/install-qt-action@v3 with: - aqtversion: '==2.1.*' + aqtversion: ==3.1.* version: ${{ env.QT_VERSION }} target: desktop arch: ${{ matrix.config.arch }} - modules: qtlocation qtpositioning qtshadertools + modules: qtlocation qtpositioning tools: ${{ matrix.config.tools }} - name: Setup ninja @@ -112,10 +102,10 @@ jobs: - name: Set up ccache uses: hendrikmuhs/ccache-action@v1 with: - key: Windows_qt-geoservices-maplibre-gl_${{ matrix.config.qtarch }} + key: Windows_QMapLibre_${{ matrix.config.qtarch }} append-timestamp: false - - name: Build qt-geoservices-maplibre-gl + - name: Build QMapLibre shell: bash env: COMPILER_TYPE: ${{ matrix.config.compiler }} @@ -138,17 +128,17 @@ jobs: TAG_ARCH: ${{ matrix.config.qtarch }} run: | pushd install/a/maplibre-native-qt - tar cjvf ../../../qt-geoservices-maplibre-gl_Windows_${TAG_ARCH}.tar.bz2 Qt + tar cjvf ../../../QMapLibre_Windows_${TAG_ARCH}.tar.bz2 Qt popd - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: qt-geoservices-maplibre-gl_Windows_${{ matrix.config.qtarch }} - path: qt-geoservices-maplibre-gl_Windows_${{ matrix.config.qtarch }}.tar.bz2 + name: QMapLibre_Windows_${{ matrix.config.qtarch }} + path: QMapLibre_Windows_${{ matrix.config.qtarch }}.tar.bz2 release: - name: "Release qt-geoservices-maplibre-gl" + name: Release QMapLibre if: github.ref_type == 'tag' runs-on: windows-2022 needs: build-plugin @@ -163,24 +153,23 @@ jobs: contents: write steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_Windows_${{ matrix.config.qtarch }} - - - name: Make tarball - shell: bash - env: - TAG_NAME: ${{ github.ref_name }} - QT_ARCH: ${{ matrix.config.qtarch }} - TAG_ARCH: ${{ matrix.config.outarch }} - run: | - tar xvf qt-geoservices-maplibre-gl_Windows_${QT_ARCH}.tar.bz2 - tar cjvf qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_win64_${TAG_ARCH}.tar.bz2 Qt - - - name: Release - uses: ncipollo/release-action@v1 - with: - artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_win64_${{ matrix.config.outarch }}.tar.bz2 - allowUpdates: true - draft: true + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: QMapLibre_Windows_${{ matrix.config.qtarch }} + + - name: Make tarball + shell: bash + env: + TAG_NAME: ${{ github.ref_name }} + QT_ARCH: ${{ matrix.config.qtarch }} + TAG_ARCH: ${{ matrix.config.outarch }} + run: | + mv QMapLibre_Windows_${QT_ARCH}.tar.bz2 QMapLibre_${TAG_NAME}_Qt${QT_VERSION}_win64_${TAG_ARCH}.tar.bz2 + + - name: Release + uses: ncipollo/release-action@v1 + with: + artifacts: QMapLibre_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_win64_${{ matrix.config.outarch }}.tar.bz2 + allowUpdates: true + draft: true diff --git a/.github/workflows/iOS-Qt5.yml b/.github/workflows/iOS-Qt5.yml deleted file mode 100644 index 3c8e724..0000000 --- a/.github/workflows/iOS-Qt5.yml +++ /dev/null @@ -1,222 +0,0 @@ -name: iOS Qt5 CI - -on: - workflow_dispatch: - # push: - # branches: - # - main - # tags: - # - '**' - # paths-ignore: - # - ".gitignore" - # - "README.md" - # # ignore CI for other platforms - # - ".github/FUNDING.yml" - # - ".github/actions/**" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/Android-Qt6.yml" - # - ".github/workflows/iOS-Qt6.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/Linux-Qt6.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/macOS-Qt6.yml" - # - ".github/workflows/Windows-Qt5.yml" - # - ".github/workflows/Windows-Qt6.yml" - - # pull_request: - # branches: - # - main - # paths-ignore: - # - ".gitignore" - # - "README.md" - # # ignore CI for other platforms - # - ".github/FUNDING.yml" - # - ".github/actions/**" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/Android-Qt6.yml" - # - ".github/workflows/iOS-Qt6.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/Linux-Qt6.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/macOS-Qt6.yml" - # - ".github/workflows/Windows-Qt5.yml" - # - ".github/workflows/Windows-Qt6.yml" - -concurrency: - # cancel jobs on PRs only - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -env: - QT_VERSION: 5.15.2 - -jobs: - build-core: - name: "Build maplibre-native" - runs-on: macos-12 - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: source - submodules: recursive - fetch-depth: 0 - - - name: Setup Xcode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - - name: Download Qt - uses: jurplel/install-qt-action@v3 - with: - aqtversion: ==3.0.* - version: ${{ env.QT_VERSION }} - target: ios - - - name: Setup ninja - uses: seanmiddleditch/gha-setup-ninja@v3 - - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: iOS_maplibre-native_legacy - append-timestamp: false - - - name: Use custom version of ccache - run: | - sed -i.bak -e 's/ccache\/ccache\.git/ntadej\/ccache.git/' -e 's/master/xarch/' /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ccache.rb - brew unlink ccache - brew install ccache --HEAD - - - name: Build maplibre-native - run: | - export CCACHE_LOGFILE=../ccache.log - mkdir build && cd build - cmake ../source/vendor/maplibre-native/ \ - -G"Ninja Multi-Config" \ - -DCMAKE_CONFIGURATION_TYPES="Release;Debug" \ - -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ - -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ - -DCMAKE_FIND_ROOT_PATH="$Qt5_Dir" \ - -DCMAKE_INSTALL_PREFIX="${Qt5_Dir//\/bin/}" \ - -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \ - -DCMAKE_PREFIX_PATH="$Qt5_Dir" \ - -DCMAKE_SYSTEM_NAME=iOS \ - -DMLN_WITH_QT=ON \ - -DMLN_QT_LIBRARY_ONLY=ON - ninja - DESTDIR=../install ninja install - - - name: Upload ccache.log - uses: actions/upload-artifact@v3 - with: - name: ccache_iOS - path: ccache.log - - - name: Create artifacts - run: | - pushd install/Users/runner/work/maplibre-native-qt - tar cjvf ../../../../../QMapLibreGL_iOS.tar.bz2 Qt - popd - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: maplibre-native_iOS - path: QMapLibreGL_iOS.tar.bz2 - - build-plugin: - name: "Build qt-geoservices-maplibre-gl" - runs-on: macos-12 - needs: build-core - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: source - fetch-depth: 0 - - - name: Setup Xcode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - - name: Download Qt - uses: jurplel/install-qt-action@v3 - with: - aqtversion: ==3.0.* - version: ${{ env.QT_VERSION }} - target: ios - - - name: Setup ninja - uses: seanmiddleditch/gha-setup-ninja@v3 - - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: iOS_qt-geoservices-maplibre-gl_legacy - append-timestamp: false - - - name: Use custom version of ccache - run: | - sed -i.bak -e 's/ccache\/ccache\.git/ntadej\/ccache.git/' -e 's/master/xarch/' /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ccache.rb - brew unlink ccache - brew install ccache --HEAD - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: maplibre-native_iOS - - - name: Build qt-geoservices-maplibre-gl - run: | - tar xvf QMapLibreGL_iOS.tar.bz2 -C .. - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - mkdir build && cd build - qmake ../source/ - make -j2 - INSTALL_ROOT=../install make install - - - name: Create artifacts - run: | - pushd install/Users/runner/work/maplibre-native-qt - tar xvf ../../../../../QMapLibreGL_iOS.tar.bz2 - tar cjvf ../../../../../qt-geoservices-maplibre-gl_iOS.tar.bz2 Qt - popd - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_iOS - path: qt-geoservices-maplibre-gl_iOS.tar.bz2 - - release: - name: "Release qt-geoservices-maplibre-gl" - if: github.ref_type == 'tag' - runs-on: macos-12 - needs: build-plugin - permissions: - contents: write - - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_iOS - - - name: Make tarball - env: - TAG_NAME: ${{ github.ref_name }} - run: | - mv qt-geoservices-maplibre-gl_iOS.tar.bz2 qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_iOS.tar.bz2 - - - name: Release - uses: ncipollo/release-action@v1 - with: - artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_iOS.tar.bz2 - allowUpdates: true - draft: true diff --git a/.github/workflows/iOS-Qt6.yml b/.github/workflows/iOS.yml similarity index 54% rename from .github/workflows/iOS-Qt6.yml rename to .github/workflows/iOS.yml index 7ecff7e..5799270 100644 --- a/.github/workflows/iOS-Qt6.yml +++ b/.github/workflows/iOS.yml @@ -13,15 +13,10 @@ on: # # ignore CI for other platforms # - ".github/FUNDING.yml" # - ".github/actions/**" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/Android-Qt6.yml" - # - ".github/workflows/iOS-Qt5.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/Linux-Qt6.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/macOS-Qt6.yml" - # - ".github/workflows/Windows-Qt5.yml" - # - ".github/workflows/Windows-Qt6.yml" + # - ".github/workflows/Android.yml" + # - ".github/workflows/Linux.yml" + # - ".github/workflows/macOS.yml" + # - ".github/workflows/Windows.yml" # pull_request: # branches: @@ -32,15 +27,10 @@ on: # # ignore CI for other platforms # - ".github/FUNDING.yml" # - ".github/actions/**" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/Android-Qt6.yml" - # - ".github/workflows/iOS-Qt5.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/Linux-Qt6.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/macOS-Qt6.yml" - # - ".github/workflows/Windows-Qt5.yml" - # - ".github/workflows/Windows-Qt6.yml" + # - ".github/workflows/Android.yml" + # - ".github/workflows/Linux.yml" + # - ".github/workflows/macOS.yml" + # - ".github/workflows/Windows.yml" concurrency: # cancel jobs on PRs only @@ -48,12 +38,12 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: - QT_VERSION: 6.5.0 + QT_VERSION: 6.5.3 jobs: build-plugin: - name: "Build qt-geoservices-maplibre-gl" - runs-on: macos-12 + name: Build QMapLibre + runs-on: macos-13 steps: - name: Checkout @@ -71,19 +61,19 @@ jobs: - name: Download Qt (desktop) uses: jurplel/install-qt-action@v3 with: - aqtversion: ==3.0.* + aqtversion: ==3.1.* version: ${{ env.QT_VERSION }} target: desktop - modules: qtlocation qtpositioning qtshadertools + modules: qtlocation qtpositioning set-env: false - name: Download Qt (iOS) uses: jurplel/install-qt-action@v3 with: - aqtversion: ==3.0.* + aqtversion: ==3.1.* version: ${{ env.QT_VERSION }} target: ios - modules: qtlocation qtpositioning qtshadertools + modules: qtlocation qtpositioning - name: Setup ninja uses: seanmiddleditch/gha-setup-ninja@v3 @@ -91,7 +81,7 @@ jobs: - name: Set up ccache uses: hendrikmuhs/ccache-action@v1 with: - key: iOS_qt-geoservices-maplibre-gl + key: iOS_QMapLibre append-timestamp: false - name: Use custom version of ccache @@ -100,21 +90,22 @@ jobs: brew unlink ccache brew install ccache --HEAD - - name: Build qt-geoservices-maplibre-gl + - name: Build QMapLibre run: | - export CCACHE_LOGFILE=../ccache.log + export CCACHE_LOGFILE="../ccache.log" mkdir build && cd build qt-cmake ../source/ \ -G"Ninja Multi-Config" \ -DCMAKE_CONFIGURATION_TYPES="Release;Debug" \ -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_INSTALL_PREFIX="../install" \ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ -DCMAKE_OSX_DEPLOYMENT_TARGET=13.0 \ - -DQT_HOST_PATH=$(readlink -f $Qt6_DIR/../macos) \ - -DQT_USE_CCACHE=ON + -DQT_HOST_PATH="$(readlink -f "$Qt6_DIR/../macos")" ninja - DESTDIR=../install ninja install + ninja test + ninja install - name: Upload ccache.log uses: actions/upload-artifact@v3 @@ -124,18 +115,18 @@ jobs: - name: Create artifacts run: | - pushd install/Users/runner/work/maplibre-native-qt - tar cjvf ../../../../../qt-geoservices-maplibre-gl_iOS.tar.bz2 Qt + pushd install + tar cjvf ../QMapLibre_iOS.tar.bz2 * popd - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: qt-geoservices-maplibre-gl_iOS - path: qt-geoservices-maplibre-gl_iOS.tar.bz2 + name: QMapLibre_iOS + path: QMapLibre_iOS.tar.bz2 release: - name: "Release qt-geoservices-maplibre-gl" + name: Release QMapLibre if: github.ref_type == 'tag' runs-on: macos-12 needs: build-plugin @@ -143,21 +134,20 @@ jobs: contents: write steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_iOS - - - name: Make tarball - env: - TAG_NAME: ${{ github.ref_name }} - run: | - tar xvf qt-geoservices-maplibre-gl_iOS.tar.bz2 - tar cjvf qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_iOS.tar.bz2 Qt - - - name: Release - uses: ncipollo/release-action@v1 - with: - artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_iOS.tar.bz2 - allowUpdates: true - draft: true + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: QMapLibre_iOS + + - name: Make tarball + env: + TAG_NAME: ${{ github.ref_name }} + run: | + mv QMapLibre_iOS.tar.bz2 QMapLibre_${TAG_NAME}_Qt${QT_VERSION}_iOS.tar.bz2 + + - name: Release + uses: ncipollo/release-action@v1 + with: + artifacts: QMapLibre_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_iOS.tar.bz2 + allowUpdates: true + draft: true diff --git a/.github/workflows/macOS-Qt5.yml b/.github/workflows/macOS-Qt5.yml deleted file mode 100644 index 67acb80..0000000 --- a/.github/workflows/macOS-Qt5.yml +++ /dev/null @@ -1,192 +0,0 @@ -name: macOS Qt5 CI - -on: - workflow_dispatch: - push: - branches: - - main - tags: - - "**" - paths-ignore: - - ".gitignore" - - "README.md" - # ignore CI for other platforms - - ".github/FUNDING.yml" - - ".github/actions/**" - - ".github/workflows/Android-Qt5.yml" - - ".github/workflows/Android-Qt6.yml" - - ".github/workflows/iOS-Qt5.yml" - - ".github/workflows/iOS-Qt6.yml" - - ".github/workflows/Linux-Qt5.yml" - - ".github/workflows/Linux-Qt6.yml" - - ".github/workflows/macOS-Qt6.yml" - - ".github/workflows/Windows-Qt5.yml" - - ".github/workflows/Windows-Qt6.yml" - - pull_request: - branches: - - main - paths-ignore: - - ".gitignore" - - "README.md" - # ignore CI for other platforms - - ".github/FUNDING.yml" - - ".github/actions/**" - - ".github/workflows/Android-Qt5.yml" - - ".github/workflows/Android-Qt6.yml" - - ".github/workflows/iOS-Qt5.yml" - - ".github/workflows/iOS-Qt6.yml" - - ".github/workflows/Linux-Qt5.yml" - - ".github/workflows/Linux-Qt6.yml" - - ".github/workflows/macOS-Qt6.yml" - - ".github/workflows/Windows-Qt5.yml" - - ".github/workflows/Windows-Qt6.yml" - -concurrency: - # cancel jobs on PRs only - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -env: - QT_VERSION: 5.15.2 - -jobs: - build-core: - name: "Build maplibre-native" - runs-on: macos-12 - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: source - submodules: recursive - fetch-depth: 0 - - - name: Setup Xcode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - - name: Download Qt - uses: jurplel/install-qt-action@v3 - with: - aqtversion: ==3.0.* - version: ${{ env.QT_VERSION }} - target: desktop - - - name: Setup ninja - uses: seanmiddleditch/gha-setup-ninja@v3 - - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: macOS_maplibre-native_legacy - append-timestamp: false - - - name: Build maplibre-native - run: | - mkdir build && cd build - cmake ../source/vendor/maplibre-native/ \ - -G Ninja \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_INSTALL_PREFIX=../install-maplibre \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \ - -DMLN_WITH_QT=ON \ - -DMLN_QT_LIBRARY_ONLY=ON - ninja - ninja install - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: maplibre-native_macOS - path: install-maplibre - - build-plugin: - name: "Build qt-geoservices-maplibre-gl" - runs-on: macos-12 - needs: build-core - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: source - fetch-depth: 0 - - - name: Setup Xcode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - - name: Download Qt - uses: jurplel/install-qt-action@v3 - with: - aqtversion: ==3.0.* - version: ${{ env.QT_VERSION }} - target: desktop - - - name: Setup ninja - uses: seanmiddleditch/gha-setup-ninja@v3 - - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: macOS_qt-geoservices-maplibre-gl_legacy - append-timestamp: false - - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: maplibre-native_macOS - path: install-maplibre - - - name: Build qt-geoservices-maplibre-gl - run: | - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - mkdir build && cd build - qmake ../source/ MAPLIBRE_PATH=../install-maplibre - make -j2 - INSTALL_ROOT=../install make install - - - name: Create artifacts - run: | - pushd install/Users/runner/work/maplibre-native-qt - tar cjvf ../../../../../qt-geoservices-maplibre-gl_macOS.tar.bz2 Qt - popd - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_macOS - path: qt-geoservices-maplibre-gl_macOS.tar.bz2 - - release: - name: "Release qt-geoservices-maplibre-gl" - if: github.ref_type == 'tag' - runs-on: macos-12 - needs: build-plugin - permissions: - contents: write - - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_macOS - - - name: Name tarball - env: - TAG_NAME: ${{ github.ref_name }} - run: | - mv qt-geoservices-maplibre-gl_macOS.tar.bz2 qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_macOS.tar.bz2 - - - name: Release - uses: ncipollo/release-action@v1 - with: - artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_macOS.tar.bz2 - allowUpdates: true - draft: true diff --git a/.github/workflows/macOS-Qt6.yml b/.github/workflows/macOS-Qt6.yml deleted file mode 100644 index 850472a..0000000 --- a/.github/workflows/macOS-Qt6.yml +++ /dev/null @@ -1,141 +0,0 @@ -name: macOS Qt6 CI - -on: - workflow_dispatch: - # push: - # branches: - # - main - # tags: - # - '**' - # paths-ignore: - # - ".gitignore" - # - "README.md" - # # ignore CI for other platforms - # - ".github/FUNDING.yml" - # - ".github/actions/**" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/Android-Qt6.yml" - # - ".github/workflows/iOS-Qt5.yml" - # - ".github/workflows/iOS-Qt6.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/Linux-Qt6.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/Windows-Qt5.yml" - # - ".github/workflows/Windows-Qt6.yml" - - # pull_request: - # branches: - # - main - # paths-ignore: - # - ".gitignore" - # - "README.md" - # # ignore CI for other platforms - # - ".github/FUNDING.yml" - # - ".github/actions/**" - # - ".github/workflows/Android-Qt5.yml" - # - ".github/workflows/Android-Qt6.yml" - # - ".github/workflows/iOS-Qt5.yml" - # - ".github/workflows/iOS-Qt6.yml" - # - ".github/workflows/Linux-Qt5.yml" - # - ".github/workflows/Linux-Qt6.yml" - # - ".github/workflows/macOS-Qt5.yml" - # - ".github/workflows/Windows-Qt5.yml" - # - ".github/workflows/Windows-Qt6.yml" - -concurrency: - # cancel jobs on PRs only - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -env: - QT_VERSION: 6.4.3 - QT_LOCATION_VERSION: 6.4.3.0 - -jobs: - build-plugin: - name: "Build qt-geoservices-maplibre-gl" - runs-on: macos-12 - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: source - submodules: recursive - fetch-depth: 0 - - - name: Setup Xcode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - - name: Download Qt - uses: jurplel/install-qt-action@v3 - with: - aqtversion: ==3.0.* - version: ${{ env.QT_VERSION }} - target: desktop - modules: qtlocation qtpositioning qtshadertools - - - name: Setup ninja - uses: seanmiddleditch/gha-setup-ninja@v3 - - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: macOS_qt-geoservices-maplibre-gl - append-timestamp: false - - - name: Build qt-geoservices-maplibre-gl - run: | - mkdir build && cd build - qt-cmake ../source/ \ - -G Ninja \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \ - -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \ - -DQT_USE_CCACHE=ON - ninja - DESTDIR=../install ninja install - - - name: Create artifacts - run: | - pushd install/Users/runner/work/maplibre-native-qt - tar cjvf ../../../../../qt-geoservices-maplibre-gl_macOS.tar.bz2 Qt - popd - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_macOS - path: qt-geoservices-maplibre-gl_macOS.tar.bz2 - - release: - name: "Release qt-geoservices-maplibre-gl" - if: github.ref_type == 'tag' - runs-on: macos-12 - needs: build-plugin - permissions: - contents: write - - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: qt-geoservices-maplibre-gl_macOS - - - name: Make tarball - env: - TAG_NAME: ${{ github.ref_name }} - run: | - tar xvf qt-geoservices-maplibre-gl_macOS.tar.bz2 - tar cjvf qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_macOS.tar.bz2 Qt - - - name: Release - uses: ncipollo/release-action@v1 - with: - artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_macOS.tar.bz2 - allowUpdates: true - draft: true diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml new file mode 100644 index 0000000..9c5ad04 --- /dev/null +++ b/.github/workflows/macOS.yml @@ -0,0 +1,156 @@ +name: macOS CI + +on: + workflow_dispatch: + push: + branches: + - main + tags: + - "**" + paths-ignore: + - ".gitignore" + - "README.md" + # ignore CI for other platforms + - ".github/FUNDING.yml" + - ".github/actions/**" + - ".github/workflows/Android.yml" + - ".github/workflows/iOS.yml" + - ".github/workflows/Linux.yml" + - ".github/workflows/Windows.yml" + + pull_request: + branches: + - main + paths-ignore: + - ".gitignore" + - "README.md" + # ignore CI for other platforms + - ".github/FUNDING.yml" + - ".github/actions/**" + - ".github/workflows/Android.yml" + - ".github/workflows/iOS.yml" + - ".github/workflows/Linux.yml" + - ".github/workflows/Windows.yml" + +concurrency: + # cancel jobs on PRs only + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + build-and-test: + name: Build QMapLibre (Qt ${{ matrix.qt_version}}) + runs-on: macos-13 + strategy: + matrix: + include: + - qt_series: 5 + qt_version: 5.15.2 + qt_modules: "" + - qt_series: 6 + qt_version: 6.5.3 + qt_modules: qtlocation qtpositioning + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + path: source + submodules: recursive + fetch-depth: 0 + + - name: Setup Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Download Qt + uses: jurplel/install-qt-action@v3 + with: + aqtversion: ==3.1.* + version: ${{ matrix.qt_version }} + target: desktop + modules: ${{ matrix.qt_modules }} + + - name: Setup ninja + uses: seanmiddleditch/gha-setup-ninja@v3 + + - name: Set up ccache + uses: hendrikmuhs/ccache-action@v1 + with: + key: macOS_QMapLibre_${{ matrix.qt_version }} + append-timestamp: false + + - name: Build QMapLibre (Qt5) + if: matrix.qt_series == 5 + run: | + mkdir build && cd build + cmake ../source/ \ + -G Ninja \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_INSTALL_PREFIX="../install" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET="10.13" + ninja + ninja test + ninja install + + - name: Build QMapLibre (Qt 6) + if: matrix.qt_series == 6 + run: | + mkdir build && cd build + qt-cmake ../source/ \ + -G Ninja \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_INSTALL_PREFIX="../install" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" \ + -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" + ninja + ninja test + ninja install + + - name: Create artifacts + run: | + pushd install + tar cjvf ../QMapLibre_macOS.tar.bz2 * + popd + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: QMapLibre_macOS_${{ matrix.qt_version }} + path: QMapLibre_macOS.tar.bz2 + + release: + name: Release QMapLibre + if: github.ref_type == 'tag' + runs-on: macos-13 + needs: build-and-test + permissions: + contents: write + strategy: + matrix: + qt_version: [5.15.2, 6.5.3] + + steps: + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: QMapLibre_macOS_${{ matrix.qt_version }} + + - name: Make tarball + env: + TAG_NAME: ${{ github.ref_name }} + QT_VERSION: ${{ matrix.qt_version }} + run: | + mv QMapLibre_macOS.tar.bz2 QMapLibre_${TAG_NAME}_Qt${QT_VERSION}_macOS.tar.bz2 + + - name: Release + uses: ncipollo/release-action@v1 + with: + artifacts: QMapLibre_${{ github.ref_name }}_Qt${{ matrix.qt_version }}_macOS.tar.bz2 + allowUpdates: true + draft: true diff --git a/vendor/maplibre-native b/vendor/maplibre-native index aa1679e..7451467 160000 --- a/vendor/maplibre-native +++ b/vendor/maplibre-native @@ -1 +1 @@ -Subproject commit aa1679e487a9f6b1709bc056c28193d55e9880a9 +Subproject commit 7451467d8fe4fecaf8ea27dab16d2c1ba8ccbee7