From fb81e50c88c8bb21a6b923796fff03aa0d22e82d Mon Sep 17 00:00:00 2001 From: Holden Date: Sat, 31 Aug 2024 17:14:49 -0400 Subject: [PATCH] CI: Adjust Which Workflows Run --- .github/actions/qt-android/action.yml | 11 +++---- .github/workflows/android-linux.yml | 2 +- .github/workflows/android-macos.yml | 2 +- .github/workflows/android-windows.yml | 20 +++++++++++-- .github/workflows/docker.yml | 20 ++++++++++++- .github/workflows/ios.yml | 43 +++++++++++++++++++++++++-- .github/workflows/macos.yml | 7 ++++- .github/workflows/windows.yml | 2 +- src/Comms/LinkManager.cc | 2 ++ src/Joystick/JoystickManager.cc | 9 +++--- 10 files changed, 98 insertions(+), 20 deletions(-) diff --git a/.github/actions/qt-android/action.yml b/.github/actions/qt-android/action.yml index c932454e5a77..495e053b0beb 100644 --- a/.github/actions/qt-android/action.yml +++ b/.github/actions/qt-android/action.yml @@ -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 @@ -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/ccache-action@v1.2 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 diff --git a/.github/workflows/android-linux.yml b/.github/workflows/android-linux.yml index 45779c44b9ba..3439e2995c27 100644 --- a/.github/workflows/android-linux.yml +++ b/.github/workflows/android-linux.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: - BuildType: [Debug, Release] + BuildType: [Release] defaults: run: diff --git a/.github/workflows/android-macos.yml b/.github/workflows/android-macos.yml index 7b2f10998bf3..79bafad75084 100644 --- a/.github/workflows/android-macos.yml +++ b/.github/workflows/android-macos.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - BuildType: [Debug, Release] + BuildType: [Release] defaults: run: diff --git a/.github/workflows/android-windows.yml b/.github/workflows/android-windows.yml index efb48dd49fb0..3fcb906e9c55 100644 --- a/.github/workflows/android-windows.yml +++ b/.github/workflows/android-windows.yml @@ -1,7 +1,23 @@ 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: @@ -9,7 +25,7 @@ jobs: strategy: matrix: - BuildType: [Debug, Release] + BuildType: [Release] defaults: run: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ae416db7b299..011650ebd581 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -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: diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index c42d6866bcea..696caf223fca 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -1,7 +1,25 @@ 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: @@ -9,7 +27,7 @@ jobs: strategy: matrix: - BuildType: [Debug, Release] + BuildType: [Release] defaults: run: @@ -21,6 +39,20 @@ 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: @@ -28,6 +60,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 @@ -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 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d71900e6134e..510d467ab511 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: - BuildType: [Debug, Release] + BuildType: [Release] env: ARTIFACT: QGroundControl.dmg @@ -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 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8daac794f852..086c96c11dcb 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: - BuildType: [Debug, Release] + BuildType: [Release] Arch: [x64] # Arm64 defaults: diff --git a/src/Comms/LinkManager.cc b/src/Comms/LinkManager.cc index 70adeb3bb59d..9ddfe327fc21 100644 --- a/src/Comms/LinkManager.cc +++ b/src/Comms/LinkManager.cc @@ -71,7 +71,9 @@ LinkManager::LinkManager(QGCApplication* app, QGCToolbox* toolbox) qRegisterMetaType(); qRegisterMetaType("LinkInterface*"); +#ifndef NO_SERIAL_LINK qRegisterMetaType("QGCSerialPortInfo"); +#endif } LinkManager::~LinkManager() diff --git a/src/Joystick/JoystickManager.cc b/src/Joystick/JoystickManager.cc index 717ae4e93f86..fa942a98ec21 100644 --- a/src/Joystick/JoystickManager.cc +++ b/src/Joystick/JoystickManager.cc @@ -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 @@ -57,7 +56,7 @@ void JoystickManager::setToolbox(QGCToolbox *toolbox) } void JoystickManager::init() { -#ifdef __sdljoystick__ +#ifdef QGC_SDL_JOYSTICK if (!JoystickSDL::init()) { return; } @@ -77,7 +76,7 @@ void JoystickManager::_setActiveJoystickFromSettings(void) { QMap newMap; -#ifdef __sdljoystick__ +#ifdef QGC_SDL_JOYSTICK // Get the latest joystick mapping newMap = JoystickSDL::discover(_multiVehicleManager); #elif defined(Q_OS_ANDROID) @@ -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) {