Skip to content

Commit

Permalink
CI: Adjust Which Workflows Run
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Sep 17, 2024
1 parent 8ea10ee commit a3da575
Show file tree
Hide file tree
Showing 16 changed files with 563 additions and 44 deletions.
15 changes: 10 additions & 5 deletions .github/actions/qt-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
host:
description: Host
required: true
arch:
description: Arch
required: true
version:
description: Qt Version
required: false
Expand All @@ -28,10 +31,6 @@ runs:
packages: 'platform-tools platforms;android-34 build-tools;34.0.0' # ndk;25.1.8937393'
log-accepted-android-sdk-licenses: false

- name: Update Android SDK / NDK / Tools
run: sdkmanager --update
shell: bash

- name: Install Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
Expand All @@ -45,10 +44,15 @@ runs:
echo "ANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV"
shell: bash
- name: Update Android SDK / NDK / Tools
if: ${{ runner.os != 'Windows' }}
run: sdkmanager --update
shell: bash

- name: Set Up Cache
uses: hendrikmuhs/[email protected]
with:
create-symlink: true
create-symlink: ${{ runner.os != 'Windows' }}
key: ${{ runner.os }}-Android-${{ matrix.BuildType }}
restore-keys: ${{ runner.os }}-Android-${{ matrix.BuildType }}
max-size: 1G
Expand All @@ -62,6 +66,7 @@ runs:
aqtversion: ==3.1.*
host: ${{ inputs.host }}
target: desktop
arch: ${{ inputs.arch }}
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' }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/android-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

strategy:
matrix:
BuildType: [Debug, Release]
BuildType: [Release]

defaults:
run:
Expand Down Expand Up @@ -68,6 +68,7 @@ jobs:
uses: ./.github/actions/qt-android
with:
host: linux
arch: gcc_64
version: ${{ env.QT_VERSION }}
abis: ${{ env.QT_ANDROID_ABIS }}

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/android-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
BuildType: [Debug, Release]
BuildType: [Release]

defaults:
run:
Expand All @@ -23,7 +23,7 @@ jobs:
QT_ANDROID_KEYSTORE_ALIAS: QGCAndroidKeyStore
QT_ANDROID_KEYSTORE_STORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
QT_ANDROID_KEYSTORE_KEY_PASS: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
QT_ANDROID_ABIS: "armeabi-v7a;arm64-v8a"
QT_ANDROID_ABIS: ${{ matrix.BuildType == 'Release' && 'armeabi-v7a;arm64-v8a' || 'arm64-v8a' }}

steps:
- name: Checkout repo
Expand All @@ -44,6 +44,7 @@ jobs:
uses: ./.github/actions/qt-android
with:
host: mac
arch: clang_64
version: ${{ env.QT_VERSION }}
abis: ${{ env.QT_ANDROID_ABIS }}

Expand All @@ -55,7 +56,7 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.BuildType }}
-DQT_ANDROID_ABIS="${{ env.QT_ANDROID_ABIS }}"
-DQT_ANDROID_BUILD_ALL_ABIS=OFF
-DQT_HOST_PATH="${{ env.QT_ROOT_DIR }}/../msvc2019_64"
-DQT_HOST_PATH="${{ env.QT_ROOT_DIR }}/../macos"
-DQT_ANDROID_SIGN_APK=${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && 'ON' || 'OFF' }}
-DQT_DEBUG_FIND_PACKAGE=ON
-DQGC_STABLE_BUILD=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && 'ON' || 'OFF' }}
Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/android-windows.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
name: Android-Windows

on:
workflow_dispatch:
push:
branches:
- master
- 'Stable*'
tags:
- 'v*'
paths-ignore:
- 'deploy/**'
- 'docs/**'
pull_request:
paths-ignore:
- 'deploy/**'
- 'docs/**'
- '.github/workflows/docs_deploy.yml'
- '.github/workflows/linux.yml'
- '.github/workflows/macos.yml'
- '.github/workflows/windows.yml'

jobs:
build:
runs-on: windows-latest

strategy:
matrix:
BuildType: [Debug, Release]
BuildType: [Release]

defaults:
run:
Expand All @@ -23,7 +39,7 @@ jobs:
QT_ANDROID_KEYSTORE_ALIAS: QGCAndroidKeyStore
QT_ANDROID_KEYSTORE_STORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
QT_ANDROID_KEYSTORE_KEY_PASS: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
QT_ANDROID_ABIS: "armeabi-v7a;arm64-v8a"
QT_ANDROID_ABIS: ${{ matrix.BuildType == 'Release' && 'armeabi-v7a;arm64-v8a' || 'arm64-v8a' }}

steps:
- name: Checkout repo
Expand All @@ -37,7 +53,7 @@ jobs:

- name: Install Dependencies
run: |
choco install --no-progress ninja sscache -y
choco install --no-progress ninja pkgconfiglite -y
choco install --no-progress cmake --installargs 'ADD_CMAKE_TO_PATH=System' --apply-install-arguments-to-dependencies
# - name: Set Up sccache
Expand All @@ -47,6 +63,7 @@ jobs:
uses: ./.github/actions/qt-android
with:
host: windows
arch: win64_msvc2019_64
version: ${{ env.QT_VERSION }}
abis: ${{ env.QT_ANDROID_ABIS }}

Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
name: Docker

on:
workflow_dispatch:
push:
branches:
- master
- 'Stable*'
tags:
- 'v*'
paths-ignore:
- 'android/**'
- 'deploy/**'
- 'docs/**'
pull_request:
paths-ignore:
- 'android/**'
- 'deploy/**'
- 'docs/**'
- '.github/workflows/docs_deploy.yml'
- '.github/workflows/android.yml'
- '.github/workflows/macos.yml'
- '.github/workflows/windows.yml'

jobs:
build:
Expand Down
29 changes: 25 additions & 4 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
BuildType: [Debug, Release]
BuildType: [Release]

defaults:
run:
Expand All @@ -21,13 +21,32 @@ jobs:
GST_VERSION: 1.22.12

steps:
- name: Recover disk space
run: |
df -h
ls /Applications
brew uninstall google-chrome
sudo rm -rf /Users/runner/Library/Android
sudo rm -rf /Applications/Xcode_14*
sudo rm -rf /Applications/Xcode_15.0*
sudo rm -rf /Applications/Xcode_15.1*
sudo rm -rf /Applications/Xcode_15.2*
sudo rm -rf /Applications/Xcode_15.3*
ls /Applications
df -h
- 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

- name: Install Dependencies
Expand All @@ -38,8 +57,8 @@ jobs:
- name: Set Up Cache
uses: hendrikmuhs/[email protected]
with:
key: ${{ runner.os }}-${{ matrix.BuildType }}
restore-keys: ${{ runner.os }}-${{ matrix.BuildType }}
key: ${{ runner.os }}-iOS-${{ matrix.BuildType }}
restore-keys: ${{ runner.os }}-iOS-${{ matrix.BuildType }}
max-size: 1G
append-timestamp: false
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
Expand All @@ -51,6 +70,7 @@ jobs:
aqtversion: ==3.1.*
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' }}
Expand All @@ -62,12 +82,13 @@ jobs:
aqtversion: ==3.1.*
host: mac
target: ios
arch: ios
dir: ${{ runner.temp }}
extra: --autodesktop
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
- run: mkdir ${{ runner.temp }}/shadow_build_dir

- name: Configure
working-directory: ${{ runner.temp }}/shadow_build_dir
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ jobs:
matrix:
BuildType: [Debug, Release]

defaults:
run:
shell: bash

env:
ARTIFACT: QGroundControl-x86_64.AppImage
QT_VERSION: 6.6.3
# GST_VERSION: 1.22.12

defaults:
run:
shell: bash

steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
Expand Down Expand Up @@ -98,6 +98,7 @@ jobs:
aqtversion: ==3.1.*
host: linux
target: desktop
arch: gcc_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' }}
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ jobs:

strategy:
matrix:
BuildType: [Debug, Release]
BuildType: [Release]

defaults:
run:
shell: bash

env:
ARTIFACT: QGroundControl.dmg
QT_VERSION: 6.6.3
GST_VERSION: 1.22.12

defaults:
run:
shell: bash

steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand All @@ -46,6 +46,11 @@ jobs:
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

- name: Install Dependencies
Expand Down Expand Up @@ -78,6 +83,7 @@ jobs:
aqtversion: ==3.1.*
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' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

strategy:
matrix:
BuildType: [Debug, Release]
BuildType: [Release]
Arch: [x64] # Arm64

defaults:
Expand All @@ -52,7 +52,7 @@ jobs:

- name: Install Dependencies
run: |
choco install --no-progress ninja sccache -y
choco install --no-progress ninja pkgconfiglite -y
choco install --no-progress cmake --installargs 'ADD_CMAKE_TO_PATH=System' --apply-install-arguments-to-dependencies
- name: Install Vulkan
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
aqtversion: ==3.1.*
host: windows
target: desktop
arch: win64_msvc2019_64
arch: win64_msvc2019_arm64
dir: ${{ runner.temp }}
extra: --autodesktop
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
Expand Down
20 changes: 20 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_INCLUDE_CURRENT_DIR OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release")
if(NOT CMAKE_BUILD_TYPE)
Expand Down Expand Up @@ -361,9 +363,27 @@ elseif(MACOS)
)
elseif(IOS)
enable_language(OBJC)

set(CMAKE_OSX_ARCHITECTURES "arm64")
set(CMAKE_OSX_SYSROOT "iphoneos")
set(CMAKE_OSX_DEPLOYMENT_TARGET "14.0")
set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "14.0")
set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2") # iPhone,iPad
set(CMAKE_XCODE_ATTRIBUTE_INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/deploy/ios/iOS-Info.plist")

set_target_properties(${PROJECT_NAME}
PROPERTIES
QT_IOS_LAUNCH_SCREEN ${CMAKE_SOURCE_DIR}/deploy/ios/QGCLaunchScreen.xib
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "org.mavlink.qgroundcontrol"
XCODE_ATTRIBUTE_PRODUCT_NAME ${CMAKE_PROJECT_NAME}
XCODE_ATTRIBUTE_CURRENT_PROJECT_VERSION ${CMAKE_PROJECT_VERSION}
XCODE_ATTRIBUTE_MARKETING_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon"
XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "14.0"
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2" # iPhone,iPad
XCODE_ATTRIBUTE_INFOPLIST_KEY_CFBundleDisplayName ${CMAKE_PROJECT_NAME}
XCODE_ATTRIBUTE_INFOPLIST_KEY_LSApplicationCategoryType "public.app-category.mycategory"
XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS "YES"
)
elseif(ANDROID)
FetchContent_Declare(android_openssl
Expand Down
Loading

0 comments on commit a3da575

Please sign in to comment.