Skip to content

VTOL preflight checklist missing due to build bug #5775

VTOL preflight checklist missing due to build bug

VTOL preflight checklist missing due to build bug #5775

Workflow file for this run

name: MacOS
on:
push:
branches:
- master
- 'Stable*'
tags:
- 'v*'
paths-ignore:
- 'docs/**'
pull_request:
paths:
- '.github/workflows/macos.yml'
- '.github/actions/**'
- 'deploy/macos/**'
- 'src/**'
- 'test/**'
- 'CMakeLists.txt'
- 'cmake/**'
workflow_dispatch:
inputs:
build_type:
description: 'Build type'
required: false
default: 'Release'
type: choice
options:
- Release
- Debug
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
permissions:
contents: read
id-token: write
attestations: write
actions: read
jobs:
build:
runs-on: macos-15
timeout-minutes: 120
strategy:
matrix:
build_type: ${{ inputs.build_type && fromJSON(format('["{0}"]', inputs.build_type)) || fromJSON('["Release"]') }}
defaults:
run:
shell: bash
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Checkout repo
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 1
fetch-tags: true
- name: Get build config
id: config
uses: ./.github/actions/build-config
- name: Initial Setup
uses: ./.github/actions/common
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ steps.config.outputs.xcode_version }}
- name: Install Dependencies (include GStreamer)
working-directory: ${{ github.workspace }}/tools/setup
env:
GSTREAMER_VERSION: ${{ steps.config.outputs.gstreamer_macos_version }}
run: sh install-dependencies-macos.sh
- name: Setup Caching
uses: ./.github/actions/cache
with:
host: mac
target: clang_64
build-type: ${{ matrix.build_type }}
cpm-modules: ${{ runner.temp }}/build/cpm_modules
save-cache: ${{ github.event_name != 'pull_request' }}
- name: Install Qt
uses: ./.github/actions/qt-install
with:
version: ${{ steps.config.outputs.qt_version }}
host: mac
arch: clang_64
modules: ${{ steps.config.outputs.qt_modules }}
- name: CMake configure
working-directory: ${{ runner.temp }}/build
run: ${{ env.QT_ROOT_DIR }}/bin/qt-cmake -S ${{ github.workspace }} -B . -G Ninja
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DQGC_STABLE_BUILD=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && 'ON' || 'OFF' }}
-DQGC_MACOS_SIGN_WITH_IDENTITY=${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }}
- name: Build
working-directory: ${{ runner.temp }}/build
run: cmake --build . --target all --config ${{ matrix.build_type }} --parallel
- name: Sanity check dev build executable
working-directory: ${{ runner.temp }}/build/Release/QGroundControl.app/Contents/MacOS
run: ./QGroundControl --simple-boot-test
- name: Import Code Signing Certificate
if: github.event_name != 'pull_request'
uses: apple-actions/import-codesign-certs@v6
with:
p12-file-base64: ${{ secrets.MACOS_CERT_P12_BASE64 }}
p12-password: ${{ secrets.MACOS_CERT_P12_PASSWORD }}
- name: Create signed/notarized/stapled app bundle
working-directory: ${{ runner.temp }}/build
run: cmake --install . --config ${{ matrix.build_type }}
env:
QGC_MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }}
QGC_MACOS_NOTARIZATION_USERNAME: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
QGC_MACOS_NOTARIZATION_PASSWORD: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
QGC_MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}
- name: Mount DMG
working-directory: ${{ runner.temp }}/build
run: |
if ! hdiutil attach QGroundControl.dmg; then
echo "::error::Failed to mount DMG"
ls -la QGroundControl.dmg 2>/dev/null || echo "DMG file not found"
exit 1
fi
- name: Sanity check DMG executable
working-directory: /Volumes/QGroundControl/QGroundControl.app/Contents/MacOS
run: ./QGroundControl --simple-boot-test
- name: Attest Build Provenance
if: matrix.build_type == 'Release' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
uses: actions/attest-build-provenance@v3
with:
subject-path: '${{ runner.temp }}/build/QGroundControl.dmg'
- name: Upload Build File
if: matrix.build_type == 'Release'
uses: ./.github/actions/upload
with:
artifact_name: QGroundControl.dmg
package_name: QGroundControl
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_distribution_id: ${{ secrets.AWS_DISTRIBUTION_ID }}