-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
name: iOS | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'Stable*' | ||
tags: | ||
- 'v*' | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'android/**' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'android/**' | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
|
||
strategy: | ||
matrix: | ||
BuildType: [Release] | ||
|
||
env: | ||
ARTIFACT: QGroundControl.app | ||
QT_VERSION: 6.6.3 | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-tags: true | ||
|
||
- name: Set up Cache | ||
uses: hendrikmuhs/[email protected] | ||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' | ||
with: | ||
create-symlink: true | ||
key: ${{ runner.os }}-${{ matrix.BuildType }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.BuildType }} | ||
max-size: 1G | ||
append-timestamp: false | ||
|
||
- 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' }} | ||
|
||
- 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 install 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" | ||
-DQT_DEBUG_FIND_PACKAGE=ON | ||
-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: Upload Build File | ||
uses: ./.github/actions/upload | ||
if: matrix.BuildType == 'Release' | ||
with: | ||
artifact_name: ${{ env.ARTIFACT }} | ||
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
source: '' |