Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add iOS Workflow #11350

Merged
merged 1 commit into from
Apr 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: iOS

on:
workflow_dispatch:

jobs:
build:
runs-on: macos-13

strategy:
matrix:
BuildType: [Debug, Release]

defaults:
run:
shell: bash

env:
ARTIFACT: QGroundControl.app
QT_VERSION: 6.6.3

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
fetch-tags: true

- uses: actions/checkout@v4
with:
repository: jurplel/install-qt-action
ref: master
path: install-qt-action

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: install-qt-action/action/

- name: Build jurplel/install-qt-action
run: |
cd install-qt-action/action/
npm ci || npm install
npm run build
shell: bash

- name: Install Qt6 for MacOS
uses: ./install-qt-action/action/
with:
version: ${{ env.QT_VERSION }}
host: mac
target: desktop
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d
cache: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
tools: 'tools_cmake'

- name: Install Qt6 for iOS
uses: ./install-qt-action/action/
with:
version: ${{ env.QT_VERSION }}
host: mac
target: ios
dir: ${{ runner.temp }}
extra: --autodesktop
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtimageformats qtshadertools qtconnectivity qtquick3d
cache: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}

- name: Install Dependencies
run: |
brew update
brew install cmake ninja

- name: Create build directory
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' }}

- name: Build
working-directory: ${{ runner.temp }}/shadow_build_dir
run: cmake --build . --target all --config ${{ matrix.BuildType }}

- name: Save APK
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT }}
path: ${{ runner.temp }}/shadow_build_dir/*.app
Loading