Skip to content

PR for pre-integration testing, not to be merged #2

PR for pre-integration testing, not to be merged

PR for pre-integration testing, not to be merged #2

Workflow file for this run

name: iOS 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/Linux.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/actions/**"
- ".github/workflows/Android.yml"
- ".github/workflows/Linux.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:
name: Build QMapLibre for iOS (Qt${{ matrix.qt_version}})
runs-on: macos-13
strategy:
matrix:
include:
- qt_version: 6.5.3
deployment_target: 14.0
- qt_version: 6.6.0
deployment_target: 14.0
env:
DEPLOYMENT_TARGET: ${{ matrix.deployment_target }}
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: Download Qt (desktop)
uses: jurplel/install-qt-action@v3
with:
aqtversion: ==3.1.*
version: ${{ matrix.qt_version }}
target: desktop
modules: qtlocation qtpositioning
set-env: false
- name: Download Qt (iOS)
uses: jurplel/install-qt-action@v3
with:
aqtversion: ==3.1.*
version: ${{ matrix.qt_version }}
target: ios
modules: qtlocation qtpositioning
- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@v4
- name: Set up ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: iOS_QMapLibre_${{ matrix.qt_version }}
max-size: 200M
- name: Use latest version of ccache
run: |
brew unlink ccache
brew install ccache --HEAD
- name: Build QMapLibre
run: |
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="${DEPLOYMENT_TARGET}" \
-DQT_HOST_PATH="$(readlink -f "$Qt6_DIR/../macos")"
ninja
ninja install
- name: Compress installation
run: |
pushd install
tar cjvf ../QMapLibre_iOS.tar.bz2 *
popd
- name: Upload installation
uses: actions/upload-artifact@v3
with:
name: QMapLibre_iOS_${{ matrix.qt_version }}
path: QMapLibre_iOS.tar.bz2
release:
name: Release QMapLibre
if: github.ref_type == 'tag'
runs-on: macos-13
needs: build
permissions:
contents: write
strategy:
matrix:
qt_version: [6.5.3, 6.6.0]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: QMapLibre_iOS_${{ matrix.qt_version }}
- name: Make tarball
env:
TAG_NAME: ${{ github.ref_name }}
QT_VERSION: ${{ matrix.qt_version }}
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${{ matrix.qt_version }}_iOS.tar.bz2
allowUpdates: true
draft: true