Skip to content

Commit 04b2331

Browse files
committed
CI: add removed platforms
I mistakenly removed all but macOS in a previous PR.
1 parent 2043fee commit 04b2331

File tree

5 files changed

+624
-0
lines changed

5 files changed

+624
-0
lines changed

.github/workflows/android_release.yml

+171
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# The 32 and 64 bit version of these actions should be kept in sync
2+
name: Android 32/64-bit Release
3+
4+
on:
5+
push:
6+
branches:
7+
- 'master'
8+
- 'Stable*'
9+
tags:
10+
- 'v*'
11+
paths-ignore:
12+
- 'docs/**'
13+
pull_request:
14+
branches:
15+
- '*'
16+
paths-ignore:
17+
- 'docs/**'
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
env:
24+
SOURCE_DIR: ${{ github.workspace }}
25+
QT_VERSION: 5.15.2
26+
BUILD_TYPE: ${{ fromJSON('["DailyBuild", "StableBuild"]')[ github.ref_type == 'tag' || contains(github.ref, 'Stable_' ) ] }}
27+
28+
jobs:
29+
build:
30+
runs-on: ubuntu-20.04
31+
32+
strategy:
33+
matrix:
34+
include:
35+
- architecture: 32bits
36+
eabi: armeabi-v7a
37+
ARTIFACT: QGroundControl32.apk
38+
- architecture: 64bits
39+
eabi: arm64-v8a
40+
ARTIFACT: QGroundControl64.apk
41+
42+
steps:
43+
- name: Checkout repo
44+
uses: actions/checkout@v3
45+
with:
46+
submodules: recursive
47+
48+
- name: Free Disk Space (Ubuntu)
49+
uses: jlumbroso/[email protected]
50+
with:
51+
android: 'false'
52+
continue-on-error: true
53+
54+
- name: Get all tags for correct version determination
55+
working-directory: ${{ github.workspace }}
56+
run: |
57+
git fetch --all --tags -f --depth 1
58+
59+
- name: Install Qt
60+
uses: jurplel/install-qt-action@v3
61+
with:
62+
version: ${{ env.QT_VERSION }}
63+
host: linux
64+
target: android
65+
dir: ${{ runner.temp }}
66+
modules: qtcharts
67+
setup-python: true
68+
69+
- name: Install Android NDK
70+
uses: nttld/setup-ndk@v1
71+
id: setup-ndk
72+
with:
73+
ndk-version: r21e
74+
add-to-path: false
75+
76+
- name: Remove Android SDKs to force usage of android-33 only
77+
run: |
78+
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-33-ext5"
79+
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-33-ext4"
80+
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-34"
81+
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-34-ext8"
82+
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-34-ext10"
83+
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-34-ext11"
84+
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-34-ext12"
85+
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-35"
86+
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-35-ext14"
87+
88+
- name: Install ccache
89+
run: sudo apt-get install ccache
90+
91+
- name: Prepare ccache timestamp
92+
id: ccache_cache_timestamp
93+
run: echo "name=timestamp::$(date --utc +'%Y-%m-%d-%H\;%M\;%S')" >> $GITHUB_OUTPUT
94+
95+
- name: ccache cache files
96+
uses: actions/cache@v3
97+
with:
98+
path: ~/.ccache
99+
key: ${{ runner.os }}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
100+
restore-keys: ${{ runner.os }}-ccache-
101+
102+
- name: Setup ccache
103+
run: |
104+
mkdir -p ~/.ccache
105+
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
106+
echo "compression = true" >> ~/.ccache/ccache.conf
107+
echo "compression_level = 5" >> ~/.ccache/ccache.conf
108+
ccache -s
109+
ccache -z
110+
111+
- name: Create build directory
112+
run: mkdir ${{ runner.temp }}/shadow_build_dir
113+
114+
- name: Install gstreamer
115+
working-directory: ${{ github.workspace }}
116+
run: |
117+
wget --quiet https://gstreamer.freedesktop.org/data/pkg/android/1.18.6/gstreamer-1.0-android-universal-1.18.6.tar.xz
118+
mkdir gstreamer-1.0-android-universal-1.18.6
119+
tar xf gstreamer-1.0-android-universal-1.18.6.tar.xz -C gstreamer-1.0-android-universal-1.18.6
120+
121+
- name: Update android manifest
122+
if: github.ref_name != 'Stable'
123+
run: |
124+
${SOURCE_DIR}/tools/update_android_manifest_package.sh ${{ github.ref_name }}
125+
126+
- name: Build
127+
working-directory: ${{ runner.temp }}/shadow_build_dir
128+
env:
129+
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
130+
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
131+
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
132+
ANDROID_NDK_LATEST_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
133+
ANDROID_NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
134+
run: |
135+
qmake -r ${SOURCE_DIR}/qgroundcontrol.pro -spec android-clang CONFIG+=${BUILD_TYPE} CONFIG+=installer ANDROID_ABIS="${{ matrix.eabi }}"
136+
make -j2
137+
138+
- name: ccache post-run
139+
run: ccache -s
140+
141+
- name: Save artifact
142+
uses: actions/upload-artifact@master
143+
with:
144+
name: ${{ matrix.ARTIFACT }}
145+
path: ${{ runner.temp }}/shadow_build_dir/package/${{ matrix.ARTIFACT }}
146+
147+
- name: Publish artifact to GitHub release
148+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
149+
uses: svenstaro/upload-release-action@v2
150+
with:
151+
repo_token: ${{ secrets.GITHUB_TOKEN }}
152+
file: ${{ runner.temp }}/shadow_build_dir/package/${{ matrix.ARTIFACT }}
153+
asset_name: ${{ matrix.ARTIFACT }}
154+
tag: ${{ github.ref }}
155+
overwrite: true
156+
157+
- name: Upload build to S3 Bucket
158+
if: github.event_name == 'push'
159+
working-directory: ${{ runner.temp }}/shadow_build_dir/package
160+
run: |
161+
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
162+
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
163+
aws s3 cp ${{ matrix.ARTIFACT }} s3://qgroundcontrol/builds/${{ github.ref_name }}/${{ matrix.ARTIFACT }} --region us-west-2 --acl public-read
164+
165+
- name: Upload tagged stable build to S3 latest Bucket
166+
if: github.event_name == 'push' && github.ref_type == 'tag'
167+
working-directory: ${{ runner.temp }}/shadow_build_dir/package
168+
run: |
169+
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
170+
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
171+
aws s3 cp ${{ matrix.ARTIFACT }} s3://qgroundcontrol/latest/${{ matrix.ARTIFACT }} --region us-west-2 --acl public-read

.github/workflows/docs_deploy.yml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'Stable*'
8+
tags:
9+
- 'v*'
10+
paths:
11+
- docs/**
12+
pull_request:
13+
branches:
14+
- '*'
15+
paths:
16+
- docs/**
17+
18+
workflow_dispatch:
19+
20+
env:
21+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
22+
23+
jobs:
24+
# Build job
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v3
30+
with:
31+
fetch-depth: 0 # Not needed if lastUpdated is not enabled
32+
- name: Setup Node
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: 18
36+
cache: npm
37+
- name: Install dependencies
38+
run: npm ci
39+
- name: Build with VitePress
40+
run: |
41+
npm run docs:build
42+
touch docs/.vitepress/dist/.nojekyll
43+
44+
- name: Upload artifact
45+
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged) }}
46+
uses: actions/upload-artifact@v3
47+
with:
48+
name: qgc_docs_build
49+
path: docs/.vitepress/dist/
50+
retention-days: 1
51+
52+
deploy:
53+
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged) }}
54+
needs: build
55+
runs-on: ubuntu-latest
56+
57+
steps:
58+
- name: Download Artifact
59+
uses: actions/download-artifact@v3
60+
with:
61+
name: qgc_docs_build
62+
path: ~/_book
63+
64+
- name: Deploy
65+
run: |
66+
git clone https://${{ secrets.PX4BUILDBOT_USER }}:${{ secrets.PX4BUILDBOT_ACCESSTOKEN }}@github.com/mavlink/docs.qgroundcontrol.com.git
67+
rm -rf docs.qgroundcontrol.com/${BRANCH_NAME}
68+
mkdir -p docs.qgroundcontrol.com/${BRANCH_NAME}
69+
cp -r ~/_book/* docs.qgroundcontrol.com/${BRANCH_NAME}/
70+
cd docs.qgroundcontrol.com
71+
git config user.email "[email protected]"
72+
git config user.name "PX4BuildBot"
73+
git add ${BRANCH_NAME}
74+
git commit -a -m "QGC docs build update `date`"
75+
git push origin master
76+
77+
env:
78+
GIT_USER: ${{ secrets.PX4BUILDBOT_USER }}
79+
GIT_PASS: ${{ secrets.PX4BUILDBOT_PASS }}

.github/workflows/linux_debug.yml

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Linux Debug and Test
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
paths-ignore:
8+
- 'docs/**'
9+
pull_request:
10+
branches:
11+
- '*'
12+
paths-ignore:
13+
- 'docs/**'
14+
15+
defaults:
16+
run:
17+
shell: bash
18+
19+
env:
20+
SOURCE_DIR: ${{ github.workspace }}
21+
QT_VERSION: 5.15.2
22+
BUILD_TYPE: ${{ fromJSON('["DailyBuild", "StableBuild"]')[ github.ref_type == 'tag' || contains(github.ref, 'Stable_' ) ] }}
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-20.04
27+
28+
steps:
29+
- name: Checkout repo
30+
uses: actions/checkout@v3
31+
with:
32+
submodules: recursive
33+
34+
- name: Install Qt
35+
uses: jurplel/install-qt-action@v3
36+
with:
37+
version: ${{ env.QT_VERSION }}
38+
host: linux
39+
target: desktop
40+
dir: ${{ runner.temp }}
41+
modules: qtcharts
42+
setup-python: true
43+
44+
- name: Install QGC source dependencies
45+
run: sudo apt-get install -y libsdl2-dev
46+
47+
- name: Install source dependencies required to run unit tests in workflow container
48+
run: sudo apt-get install -y libxkbcommon-x11-0
49+
50+
- name: Install Gstreamer dev packages
51+
run: sudo apt-get install -y libgstreamer-plugins-base1.0-dev libgstreamer1.0-0:amd64 libgstreamer1.0-dev
52+
53+
- name: Install ccache
54+
run: sudo apt-get install ccache
55+
56+
- name: Install post-link dependencies
57+
run: sudo apt-get install -y binutils patchelf
58+
59+
- name: Prepare ccache timestamp
60+
id: ccache_cache_timestamp
61+
run: echo "name=timestamp::$(date --utc +'%Y-%m-%d-%H\;%M\;%S')" >> $GITHUB_OUTPUT
62+
63+
- name: ccache cache files
64+
uses: actions/cache@v3
65+
with:
66+
path: ~/.ccache
67+
key: ${{ runner.os }}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
68+
restore-keys: ${{ runner.os }}-ccache-
69+
70+
- name: Setup ccache
71+
run: |
72+
mkdir -p ~/.ccache
73+
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
74+
echo "compression = true" >> ~/.ccache/ccache.conf
75+
echo "compression_level = 5" >> ~/.ccache/ccache.conf
76+
ccache -s
77+
ccache -z
78+
79+
- name: Create build directory
80+
run: mkdir ${{ runner.temp }}/shadow_build_dir
81+
82+
- name: Build
83+
working-directory: ${{ runner.temp }}/shadow_build_dir
84+
run: |
85+
qmake -r ${SOURCE_DIR}/qgroundcontrol.pro CONFIG+=debug CONFIG+=${BUILD_TYPE}
86+
make -j2
87+
88+
- name: ccache post-run
89+
run: ccache -s
90+
91+
- name: Setup for unit tests
92+
working-directory: ${{ runner.temp }}/shadow_build_dir
93+
run: |
94+
mkdir -p ~/.config/QtProject/
95+
cp ${SOURCE_DIR}/test/qtlogging.ini ~/.config/QtProject/
96+
export QT_FATAL_WARNINGS=1
97+
98+
- name: Run unit tests
99+
working-directory: ${{ runner.temp }}/shadow_build_dir
100+
run: xvfb-run -a ./staging/qgroundcontrol-start.sh --unittest

0 commit comments

Comments
 (0)