Skip to content

SerialLink: Use QSerialPortInfo for BaudRate Map #1091

SerialLink: Use QSerialPortInfo for BaudRate Map

SerialLink: Use QSerialPortInfo for BaudRate Map #1091

Workflow file for this run

name: Android
on:
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: ubuntu-latest
strategy:
matrix:
BuildType: [Debug, Release]
defaults:
run:
shell: bash
env:
ARTIFACT: QGroundControl.apk
QT_VERSION: 6.6.3
QT_ANDROID_KEYSTORE_PATH: ${{ github.workspace }}/deploy/android/android_release.keystore
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: ${{ matrix.BuildType == 'Release' && 'armeabi-v7a;arm64-v8a' || 'arm64-v8a' }}
GST_VERSION: 1.22.12
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
fetch-tags: true
fetch-depth: 0
# Temporary solution
- name: Remove unused dependencies
run: |
rm -rf libs/Frameworks
rm -rf libs/libevents
rm -rf libs/mavlink
rm -rf libs/sdl2
rm -rf libs/OpenSSL
- name: Install dependencies
run: |
wget --quiet https://github.com/ccache/ccache/releases/download/v4.9.1/ccache-4.9.1-linux-x86_64.tar.xz
tar -xvf ccache-*-linux-x86_64.tar.xz
cd ccache-*-linux-x86_64
sudo make install
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Setup Java Environment
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Setup Android Environment
uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 11076708
packages: 'platform-tools platforms;android-34 build-tools;34.0.0' # ndk;25.1.8937393'
# - name: Update Android SDK / NDK / Tools
# run: sdkmanager --update
- name: Install Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r25b
add-to-path: false
- name: Set Up Cache
uses: hendrikmuhs/[email protected]
with:
create-symlink: true
key: ${{ runner.os }}-Android-${{ matrix.BuildType }}
restore-keys: ${{ runner.os }}-Android-${{ matrix.BuildType }}
max-size: 1G
append-timestamp: false
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
- name: Install Qt6 for Linux
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
aqtversion: ==3.1.*
host: linux
target: desktop
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
- name: Install Qt6 for Android (armv7)
uses: jurplel/install-qt-action@v4
if: contains( env.QT_ANDROID_ABIS, 'armeabi-v7a')
with:
version: ${{ env.QT_VERSION }}
aqtversion: ==3.1.*
host: linux
target: android
arch: android_armv7
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
- name: Install Qt6 for Android (arm64_v8a)
uses: jurplel/install-qt-action@v4
if: contains( env.QT_ANDROID_ABIS, 'arm64-v8a')
with:
version: ${{ env.QT_VERSION }}
aqtversion: ==3.1.*
host: linux
target: android
arch: android_arm64_v8a
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
- name: Install Qt6 for Android (x86)
uses: jurplel/install-qt-action@v4
if: contains( env.QT_ANDROID_ABIS, 'x86')
with:
version: ${{ env.QT_VERSION }}
aqtversion: ==3.1.*
host: linux
target: android
arch: android_x86
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
- name: Install Qt6 for Android (x86_64)
uses: jurplel/install-qt-action@v4
if: contains( env.QT_ANDROID_ABIS, 'x86_64')
with:
version: ${{ env.QT_VERSION }}
aqtversion: ==3.1.*
host: linux
target: android
arch: android_x86_64
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
- name: Cleanup
run: sudo apt clean
- name: Create build directory
run: mkdir ${{ runner.temp }}/shadow_build_dir
- name: Configure
working-directory: ${{ runner.temp }}/shadow_build_dir
env:
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
run: ${{ env.QT_ROOT_DIR }}/bin/qt-cmake -S ${{ github.workspace }} -B . -G Ninja
-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 }}/../gcc_64"
-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' }}
- name: Build
working-directory: ${{ runner.temp }}/shadow_build_dir
run: cmake --build . --target all --config ${{ matrix.BuildType }}
- name: Prepare APK
working-directory: ${{ runner.temp }}/shadow_build_dir
run: cp ./android-build/*.apk ./${{ env.ARTIFACT }}
- 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: ''