Skip to content

C/C++ CI debug

C/C++ CI debug #179

Workflow file for this run

name: C/C++ CI debug
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
config: [ { BITNESS: '32', GSTREAMER_NAME: 'armv7', CONFIG: 'installer' }, { BITNESS: '64', GSTREAMER_NAME: 'arm64', CONFIG: 'installer' } ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: apt
run: sudo apt-get update && sudo apt-get install wget curl speech-dispatcher libgstreamer-plugins-base1.0-dev libgstreamer1.0-0:amd64 libgstreamer1.0-dev libudev-dev android-sdk ccache
- name: Set up JDK 1.8
uses: joschi/setup-jdk@v2
with:
java-version: 8
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ccache-${{ runner.os }}-${{ matrix.config.BITNESS }}
- name: Cache zips
uses: actions/cache@v3
with:
path: |
/home/runner/.gradle
/tmp/android-ndk-r20-linux-x86_64.zip
/tmp/Qt5.12.6-android_arm64_v8a-min.tar.bz2
/tmp/Qt5.12.6-android_armv7-min.tar.bz2
key: ${{ runner.os }}-${{ matrix.config.BITNESS }}
- name: configure
env:
JOBS: 16
SHADOW_BUILD_DIR: /tmp/shadow_build_dir
CODESIGN: nocodesign
SPEC: android-clang
CONFIG: ${{ matrix.config.CONFIG }}
BITNESS: ${{ matrix.config.BITNESS }}
GSTREAMER_NAME: ${{ matrix.config.GSTREAMER_NAME }}
GSTREAMER_VERSION: 1.14.4
ANDROID_HOME: /usr/local/lib/android/sdk
ANDROID_NDK_PLATFORM: android-29
run: |
set -o xtrace
export PATH=$ANDROID_HOME/tools/bin:/opt/java/jdk1.8.0_131/bin:$PATH
ccache -s
git submodule update --init --recursive
rm -rf /tmp/shadow_build_dir
sudo $ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.3" "platforms;android-29" "platform-tools" > /dev/null
wget --quiet https://gstreamer.freedesktop.org/data/pkg/android/${GSTREAMER_VERSION}/gstreamer-1.0-android-universal-${GSTREAMER_VERSION}.tar.bz2 &&
mkdir gstreamer-1.0-android-universal-${GSTREAMER_VERSION} &&
tar xf gstreamer-1.0-android-universal-${GSTREAMER_VERSION}.tar.bz2 -C gstreamer-1.0-android-universal-${GSTREAMER_VERSION}
if [ ! -f "/tmp/android-ndk-r20-linux-x86_64.zip" ]; then
wget -N --quiet https://dl.google.com/android/repository/android-ndk-r20-linux-x86_64.zip -O /tmp/android-ndk-r20-linux-x86_64.zip
fi
unzip /tmp/android-ndk-r20-linux-x86_64.zip > /dev/null
export ANDROID_NDK_ROOT=`pwd`/android-ndk-r20
export ANDROID_SDK_ROOT=/usr/local/lib/android/sdk
export PATH=`pwd`/android-ndk-r20:$PATH
if [ "$BITNESS" == "64" ]; then
if [ ! -f "/tmp/Qt5.12.6-android_arm64_v8a-min.tar.bz2" ]; then
wget --quiet https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.12.6-android_arm64_v8a-min.tar.bz2 -O /tmp/Qt5.12.6-android_arm64_v8a-min.tar.bz2
fi
tar jxf /tmp/Qt5.12.6-android_arm64_v8a-min.tar.bz2 -C /tmp
export PATH=/tmp/Qt5.12-android_arm64_v8a/5.12.6/android_arm64_v8a/bin:$PATH
fi
if [ "$BITNESS" == "32" ]; then
if [ ! -f "/tmp/Qt5.12.6-android_armv7-min.tar.bz2" ]; then
wget -N --quiet https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.12.6-android_armv7-min.tar.bz2 -O /tmp/Qt5.12.6-android_armv7-min.tar.bz2
fi
tar jxf /tmp/Qt5.12.6-android_armv7-min.tar.bz2 -C /tmp
export PATH=/tmp/Qt5.12-android_armv7/5.12.6/android_armv7/bin:$PATH
fi
./tools/update_android_version.sh ${BITNESS} notmaster
java -version
gradle --version
cd android
./gradlew --version
cd ..
mkdir -p ${SHADOW_BUILD_DIR}
cd ${SHADOW_BUILD_DIR}
export STABLE_OR_DAILY=StableBuild
qmake -r $GITHUB_WORKSPACE/qgroundcontrol.pro CONFIG+=${CONFIG} CONFIG+=${STABLE_OR_DAILY} CONFIG+=ccache -spec ${SPEC}
make VERBOSE=1 install INSTALL_ROOT=./release/android-build/
ccache -s
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.config.BITNESS }}.zip
# A file, directory or wildcard pattern that describes what to upload
path: |
/tmp/shadow_build_dir/release/android-build/build/outputs/
/tmp/shadow_build_dir/debug/android-build/build/outputs/