Skip to content

Commit

Permalink
Update CI setup
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Mar 14, 2024
1 parent 37315ab commit 944fee8
Show file tree
Hide file tree
Showing 16 changed files with 586 additions and 873 deletions.
16 changes: 8 additions & 8 deletions .github/actions/upload/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ inputs:
description: 'aws secret access key'
required: true
source:
description: 'source location'
required: false
type: string
default: 'package'
runs:
using: "composite"
steps:
- name: Save artifact
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: ${{ runner.temp }}/shadow_build_dir/${{ inputs.source }}/${{ inputs.artifact_name }}
Expand All @@ -27,16 +27,16 @@ runs:
if: github.event_name == 'push'
working-directory: ${{ runner.temp }}/shadow_build_dir/${{ inputs.source }}
run: |
aws configure set aws_access_key_id ${{ inputs.aws_key_id }}
aws configure set aws_secret_access_key ${{ inputs.aws_secret_access_key }}
aws s3 cp ${{ inputs.artifact_name }} s3://qgroundcontrol/builds/${{ github.ref_name }}/${{ inputs.artifact_name }} --region us-west-2 --acl public-read
aws configure set aws_access_key_id ${{ inputs.aws_key_id }}
aws configure set aws_secret_access_key ${{ inputs.aws_secret_access_key }}
aws s3 cp ${{ inputs.artifact_name }} s3://qgroundcontrol/builds/${{ github.ref_name }}/${{ inputs.artifact_name }} --region us-west-2 --acl public-read
shell: bash

- name: Upload tagged stable build to S3 latest Bucket
if: github.event_name == 'push' && github.ref_type == 'tag'
working-directory: ${{ runner.temp }}/shadow_build_dir/${{ inputs.source }}
run: |
aws configure set aws_access_key_id ${{ inputs.aws_key_id }}
aws configure set aws_secret_access_key ${{ inputs.aws_secret_access_key }}
aws s3 cp ${{ inputs.artifact_name }} s3://qgroundcontrol/latest/${{ inputs.artifact_name }} --region us-west-2 --acl public-read
aws configure set aws_access_key_id ${{ inputs.aws_key_id }}
aws configure set aws_secret_access_key ${{ inputs.aws_secret_access_key }}
aws s3 cp ${{ inputs.artifact_name }} s3://qgroundcontrol/latest/${{ inputs.artifact_name }} --region us-west-2 --acl public-read
shell: bash
204 changes: 204 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
name: Android 32/64-bit

on:
push:
branches:
- master
- 'Stable*'
tags:
- 'v*'
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'

defaults:
run:
shell: bash

jobs:
build_debug:
runs-on: ubuntu-latest

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: 17

- name: Set up Cache
uses: hendrikmuhs/[email protected]
with:
create-symlink: true
key: ${{ runner.os }}-Android-Debug
restore-keys: ${{ runner.os }}-Android-Debug
max-size: 1G
append-timestamp: false

- name: Install Qt for Linux
uses: jurplel/install-qt-action@v3
with:
version: 6.6.*
aqtversion: ==3.1.*
host: linux
target: desktop
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d
setup-python: true
cache: true

- name: Install Qt6 for Android (armv7)
uses: jurplel/install-qt-action@v3
with:
version: 6.6.*
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
cache: true

- name: Install Qt6 for Android (arm64_v8a)
uses: jurplel/install-qt-action@v3
with:
version: 6.6.*
aqtversion: ==3.1.*
host: linux
target: android
arch: android_arm64_v8a
extra: --autodesktop
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d
cache: true

- name: Install dependencies
working-directory: ${{ github.workspace }}
env:
GST_VERSION: 1.18.5
run: |
sudo apt update
sudo apt install -y ninja-build
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: Setup env
run: |
echo "QT_HOST_PATH=${Qt6_DIR}/../gcc_64" >> $GITHUB_ENV
chmod a+x ${Qt6_DIR}/bin/qt-cmake
mkdir ${{ runner.temp }}/shadow_build_dir
- name: Configure
working-directory: ${{ runner.temp }}/shadow_build_dir
env:
STABLE_BUILD: ${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') }}
run: ${Qt6_DIR}/bin/qt-cmake -S ${{ github.workspace }} -B . -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.BuildType }} \
-DQT_ANDROID_ABIS="armeabi-v7a;arm64-v8a" \
-DQT_HOST_PATH=${{ env.QT_HOST_PATH }} \
-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

build_release:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- eabi: armeabi-v7a
arch: android_armv7
ARTIFACT: QGroundControl32.apk
- eabi: arm64-v8a
arch: android_arm64_v8a
ARTIFACT: QGroundControl64.apk

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: 17

- name: Set up Cache
uses: hendrikmuhs/[email protected]
with:
create-symlink: true
key: ${{ runner.os }}-${{ matrix.arch }}-Release
restore-keys: ${{ runner.os }}-${{ matrix.arch }}-Release
max-size: 1G
append-timestamp: false

- name: Install Qt for Linux
uses: jurplel/install-qt-action@v3
with:
version: 6.6.*
aqtversion: ==3.1.*
host: linux
target: desktop
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d
setup-python: true
cache: true

- name: Install Qt6 for Android
uses: jurplel/install-qt-action@v3
with:
version: 6.6.*
aqtversion: ==3.1.*
host: linux
target: android
arch: ${{ matrix.arch }}
extra: --autodesktop
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d
cache: true

- name: Install dependencies
working-directory: ${{ github.workspace }}
env:
GST_VERSION: 1.18.5
run: |
sudo apt update
sudo apt install -y ninja-build
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: Configure
working-directory: ${{ runner.temp }}/shadow_build_dir
env:
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
run: qmake -r ${{ github.workspace }}/qgroundcontrol.pro -spec android-clang \
ANDROID_ABIS="${{ matrix.eabi }}" \
CONFIG+=installer \
CONFIG+=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && StableBuild || DailyBuild }}

- name: Build
working-directory: ${{ runner.temp }}/shadow_build_dir
run: make -j$(nproc)

- name: Upload Build File
uses: ./.github/actions/upload
with:
artifact_name: ${{ matrix.ARTIFACT }}
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
130 changes: 0 additions & 130 deletions .github/workflows/android_debug.yml

This file was deleted.

Loading

0 comments on commit 944fee8

Please sign in to comment.