地面站终端 App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.9 KiB

name: Build QGC and upload to release
on: [push, pull_request]
defaults:
run:
shell: bash
env:
JOBS: 4
CONFIG: installer
ACTIONS_BUILD_DIR: ${{ github.workspace }}/../qgroundcontrol
jobs:
build-job:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
#Only running MacOS right now, but we leave this options
#for future builds of all distros
exclude:
- os: ubuntu-latest
- os: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: recursive
- name: install QT via action
uses: jurplel/install-qt-action@v2
with:
version: '5.12.6'
host: 'mac'
target: 'desktop'
dir: '${{ runner.temp }}'
modules: 'qtcharts'
setup-python: 'false'
- name: Install Gstreamer
run: |
wget --quiet https://qgroundcontrol.s3-us-west-2.amazonaws.com/dependencies/gstreamer-osx-1.18.1.tar.bz2
sudo tar -zxf gstreamer-osx-1.18.1.tar.bz2 -C /Library/Frameworks
- name: mkdir directory shadow_build
run: mkdir ${{ runner.temp }}/shadow_build_dir
- name: run qmake and build
working-directory: ${{ runner.temp }}/shadow_build_dir
run: |
export JOBS=$((`sysctl -n hw.ncpu`+1))
qmake -r ${ACTIONS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=${CONFIG}
make -j$JOBS
- name: Upload build artifacts to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ runner.temp }}/shadow_build_dir/package/QGroundControl.dmg
asset_name: QGroundControl.dmg
tag: ${{ github.ref }}
overwrite: true
body: "QGgroundControl ${{ steps.get_version.outputs.VERSION }} test"