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 8, 2024
1 parent b4a11c5 commit fb81e50
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 20 deletions.
11 changes: 6 additions & 5 deletions .github/actions/qt-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,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 +41,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 Down
2 changes: 1 addition & 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
2 changes: 1 addition & 1 deletion .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 Down
20 changes: 18 additions & 2 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 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
43 changes: 40 additions & 3 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
name: iOS

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/linux.yml'
- '.github/workflows/windows.yml'

jobs:
build:
runs-on: macos-latest

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

defaults:
run:
Expand All @@ -21,13 +39,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 Down Expand Up @@ -67,7 +104,7 @@ jobs:
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
7 changes: 6 additions & 1 deletion .github/workflows/macos.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]

env:
ARTIFACT: QGroundControl.dmg
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
2 changes: 1 addition & 1 deletion .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 Down
2 changes: 2 additions & 0 deletions src/Comms/LinkManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ LinkManager::LinkManager(QGCApplication* app, QGCToolbox* toolbox)

qRegisterMetaType<QAbstractSocket::SocketError>();
qRegisterMetaType<LinkInterface*>("LinkInterface*");
#ifndef NO_SERIAL_LINK
qRegisterMetaType<QGCSerialPortInfo>("QGCSerialPortInfo");
#endif
}

LinkManager::~LinkManager()
Expand Down
9 changes: 4 additions & 5 deletions src/Joystick/JoystickManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
#include "JoystickManager.h"
#include "MultiVehicleManager.h"
#include "Joystick.h"
#if !defined(__mobile__) || defined(QGC_SDL_JOYSTICK)
#if defined(QGC_SDL_JOYSTICK)
#include "JoystickSDL.h"
#define __sdljoystick__
#elif defined(Q_OS_ANDROID)
#include "JoystickAndroid.h"
#endif
Expand Down Expand Up @@ -57,7 +56,7 @@ void JoystickManager::setToolbox(QGCToolbox *toolbox)
}

void JoystickManager::init() {
#ifdef __sdljoystick__
#ifdef QGC_SDL_JOYSTICK
if (!JoystickSDL::init()) {
return;
}
Expand All @@ -77,7 +76,7 @@ void JoystickManager::_setActiveJoystickFromSettings(void)
{
QMap<QString,Joystick*> newMap;

#ifdef __sdljoystick__
#ifdef QGC_SDL_JOYSTICK
// Get the latest joystick mapping
newMap = JoystickSDL::discover(_multiVehicleManager);
#elif defined(Q_OS_ANDROID)
Expand Down Expand Up @@ -194,7 +193,7 @@ bool JoystickManager::setActiveJoystickName(const QString& name)
*/
void JoystickManager::_updateAvailableJoysticks()
{
#ifdef __sdljoystick__
#ifdef QGC_SDL_JOYSTICK
SDL_Event event;
while (SDL_PollEvent(&event)) {
switch(event.type) {
Expand Down

0 comments on commit fb81e50

Please sign in to comment.