106 lines
3.3 KiB
YAML
106 lines
3.3 KiB
YAML
name: iOS
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
# concurrency:
|
|
# group: ${{ github.workflow }}-${{ github.ref }}
|
|
# cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: macos-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
BuildType: [Release]
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
env:
|
|
ARTIFACT: QGroundControl.app
|
|
PACKAGE: QGroundControl
|
|
QT_VERSION: 6.8.1
|
|
GST_VERSION: 1.22.12
|
|
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
|
|
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
fetch-tags: true
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Xcode
|
|
uses: maxim-lobanov/setup-xcode@v1
|
|
with:
|
|
xcode-version: latest-stable
|
|
|
|
- uses: seanmiddleditch/gha-setup-ninja@v5
|
|
- uses: lukka/get-cmake@latest
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
brew update
|
|
brew install ccache
|
|
|
|
- name: Set Up Cache
|
|
uses: hendrikmuhs/ccache-action@main
|
|
with:
|
|
create-symlink: true
|
|
key: ${{ runner.os }}-iOS-${{ matrix.BuildType }}
|
|
max-size: 1G
|
|
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
verbose: 1
|
|
evict-old-files: 'job'
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: ${{ env.CPM_SOURCE_CACHE }}
|
|
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
|
|
|
- name: Install Qt for MacOS
|
|
uses: jurplel/install-qt-action@v4
|
|
with:
|
|
version: ${{ env.QT_VERSION }}
|
|
host: mac
|
|
target: desktop
|
|
arch: clang_64
|
|
dir: ${{ runner.temp }}
|
|
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
|
|
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
|
|
- name: Install Qt for iOS
|
|
uses: jurplel/install-qt-action@v4
|
|
with:
|
|
version: ${{ env.QT_VERSION }}
|
|
host: mac
|
|
target: ios
|
|
arch: ios
|
|
dir: ${{ runner.temp }}
|
|
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
|
|
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
|
|
- run: mkdir ${{ runner.temp }}/shadow_build_dir
|
|
|
|
- name: Configure
|
|
working-directory: ${{ runner.temp }}/shadow_build_dir
|
|
run: ${{ env.QT_ROOT_DIR }}/bin/qt-cmake -S ${{ github.workspace }} -B . -G Ninja
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.BuildType }}
|
|
-DQT_HOST_PATH="${{ env.QT_ROOT_DIR }}/../macos"
|
|
-DQGC_STABLE_BUILD=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && 'ON' || 'OFF' }}
|
|
-DCPM_SOURCE_CACHE=${{ env.CPM_SOURCE_CACHE }}
|
|
|
|
- name: Build
|
|
working-directory: ${{ runner.temp }}/shadow_build_dir
|
|
run: cmake --build . --target all --config ${{ matrix.BuildType }}
|
|
|
|
- name: Save App
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ env.PACKAGE }}
|
|
path: ${{ runner.temp }}/shadow_build_dir/*.app
|