Skip to content

Support image coordinate change #253

Support image coordinate change

Support image coordinate change #253

Workflow file for this run

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 (Qt${{ matrix.qt_version}}, ${{ matrix.compiler }})
runs-on: ${{ matrix.runs_on }}
strategy:
matrix:
include:
- qt_series: 5
qt_version: 5.15.2
qt_modules: ""
preset: macOS-legacy-ccache
compiler: default
runs_on: macos-13
- qt_series: 6
qt_version: 6.5.3
qt_modules: qtlocation qtpositioning
preset: macOS-ccache
compiler: default
runs_on: macos-14
- qt_series: 6
qt_version: 6.6.3
qt_modules: qtlocation qtpositioning
preset: macOS-ccache
compiler: default
runs_on: macos-14
- qt_series: 6
qt_version: 6.7.1
qt_modules: qtlocation qtpositioning
preset: macOS-ccache
compiler: default
runs_on: macos-14
- qt_series: 6
qt_version: 6.7.1
qt_modules: qtlocation qtpositioning
preset: macOS-clang-tidy
compiler: llvm
runs_on: macos-14
env:
COMPILER: ${{ matrix.compiler }}
PRESET: ${{ matrix.preset }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: source
submodules: recursive
fetch-depth: 0
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Setup compiler (macOS)
if: matrix.compiler != 'default'
run: |
brew install "$COMPILER"
echo "/opt/homebrew/opt/${COMPILER}/bin" >> "$GITHUB_PATH"
{
echo "CC=/opt/homebrew/opt/${COMPILER}/bin/clang"
echo "CXX=/opt/homebrew/opt/${COMPILER}/bin/clang++"
echo "LDFLAGS=\"-L/opt/homebrew/opt/${COMPILER}/lib\""
echo "CPPFLAGS=\"-I/opt/homebrew/opt/${COMPILER}/include\""
} >> "$GITHUB_ENV"
- name: Download Qt
uses: jurplel/install-qt-action@v4
with:
aqtversion: ==3.1.*
version: ${{ matrix.qt_version }}
target: desktop
modules: ${{ matrix.qt_modules }}
- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@v5
- name: Set up ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: macOS_${{ matrix.qt_version }}_${{ matrix.compiler }}
max-size: 200M
- name: Build
working-directory: source
run: |
cmake --workflow --preset ${PRESET}
- name: Install
run: |
mkdir install && cd install
tar xf ../build/qt${{ matrix.qt_series }}-macOS/maplibre-native-qt_*.tar.bz2
mv maplibre-native-qt_* maplibre-native-qt
- name: Build QtQuick Example
if: matrix.qt_series == 6 && matrix.compiler == 'default'
working-directory: source/examples/quick
run: |
export QMapLibre_DIR="$GITHUB_WORKSPACE/install/maplibre-native-qt"
cmake --workflow --preset default
- name: Build QtWidgets Example
if: matrix.qt_series == 6 && matrix.compiler == 'default'
working-directory: source/examples/widgets
run: |
export QMapLibre_DIR="$GITHUB_WORKSPACE/install/maplibre-native-qt"
cmake --workflow --preset default
- name: Upload installation
if: matrix.compiler == 'default'
uses: actions/upload-artifact@v4
with:
name: macOS_${{ matrix.qt_version }}
path: build/qt${{ matrix.qt_series }}-macOS/maplibre-native-qt_*.tar.bz2
- name: Upload examples
if: matrix.qt_series == 6 && matrix.compiler == 'default'
uses: actions/upload-artifact@v4
with:
name: macOS_${{ matrix.qt_version }}_examples
path: build/qt${{ matrix.qt_series }}-example-*/*.tar.bz2
release:
name: Release
if: github.ref_type == 'tag'
runs-on: macos-14
needs: build-and-test
permissions:
contents: write
strategy:
matrix:
qt_version: [5.15.2, 6.5.3, 6.6.3, 6.7.1]
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: macOS_${{ matrix.qt_version }}
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: maplibre-native-qt_${{ github.ref_name }}_Qt${{ matrix.qt_version }}_macOS.tar.bz2
allowUpdates: true
draft: true