-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
171 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
name: Android 32/64-bit | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'Stable*' | ||
tags: | ||
- 'v*' | ||
paths-ignore: | ||
- 'docs/**' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
QT_VERSION: 6.6.3 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- eabi: armeabi-v7a | ||
arch: android_armv7 | ||
ARTIFACT: QGroundControl32.apk | ||
BuildType: Debug | ||
- eabi: armeabi-v7a | ||
arch: android_armv7 | ||
ARTIFACT: QGroundControl32.apk | ||
BuildType: Release | ||
- eabi: arm64-v8a | ||
arch: android_arm64_v8a | ||
ARTIFACT: QGroundControl64.apk | ||
BuildType: Debug | ||
- eabi: arm64-v8a | ||
arch: android_arm64_v8a | ||
ARTIFACT: QGroundControl64.apk | ||
BuildType: Release | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-tags: true | ||
|
||
- name: Setup Java Environment | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
repository: jurplel/install-qt-action | ||
ref: master | ||
path: install-qt-action | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
cache-dependency-path: install-qt-action/action/ | ||
|
||
- name: Build jurplel/install-qt-action | ||
run: | | ||
cd install-qt-action/action/ | ||
npm ci || npm install | ||
npm run build | ||
shell: bash | ||
|
||
- name: Install Qt6 for Linux | ||
uses: ./install-qt-action/action/ | ||
with: | ||
version: ${{ env.QT_VERSION }} | ||
host: linux | ||
target: desktop | ||
dir: ${{ runner.temp }} | ||
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d | ||
cache: true | ||
|
||
- name: Install Qt6 for Android | ||
uses: ./install-qt-action/action/ | ||
with: | ||
version: ${{ env.QT_VERSION }} | ||
host: linux | ||
target: android | ||
arch: ${{ matrix.arch }} | ||
dir: ${{ runner.temp }} | ||
extra: --autodesktop | ||
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d | ||
cache: true | ||
|
||
- name: Install gstreamer | ||
working-directory: ${{ github.workspace }} | ||
env: | ||
GST_VERSION: 1.18.5 | ||
run: | | ||
wget --quiet https://gstreamer.freedesktop.org/data/pkg/android/${GST_VERSION}/gstreamer-1.0-android-universal-${GST_VERSION}.tar.xz | ||
mkdir gstreamer-1.0-android-universal-${GST_VERSION} | ||
tar xf gstreamer-1.0-android-universal-${GST_VERSION}.tar.xz -C gstreamer-1.0-android-universal-${GST_VERSION} | ||
- name: Install dependencies | ||
run: sudo apt-get install -y ninja-build | ||
|
||
- name: Set Environment | ||
run: | | ||
mkdir ${{ runner.temp }}/shadow_build_dir | ||
chmod a+x ${QT_ROOT_DIR}/bin/qt-cmake | ||
- name: Configure | ||
working-directory: ${{ runner.temp }}/shadow_build_dir | ||
run: ${QT_ROOT_DIR}/bin/qt-cmake -S ${{ github.workspace }} -B . -G Ninja | ||
-DCMAKE_BUILD_TYPE=${{ matrix.BuildType }} | ||
-DANDROID_ABI=${{ matrix.eabi }} | ||
-DANDROID_PLATFORM=android-23 | ||
-DQT_HOST_PATH:PATH=${QT_ROOT_DIR}/../gcc_64 | ||
-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 ./${{ matrix.ARTIFACT }} | ||
|
||
- name: Upload Build File | ||
uses: ./.github/actions/upload | ||
if: matrix.BuildType == 'Release' | ||
with: | ||
artifact_name: ${{ matrix.ARTIFACT }} | ||
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
source: '' |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.