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.
87 lines
2.6 KiB
87 lines
2.6 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: macos-latest |
|
env: |
|
gst_version: "1.18.1" |
|
|
|
steps: |
|
- name: Checkout repo |
|
uses: actions/checkout@v2 |
|
with: |
|
submodules: recursive |
|
|
|
- name: Cache |
|
uses: actions/cache@v2 |
|
id: cache |
|
with: |
|
path: ~/.ccache |
|
key: ${{ runner.os }}-mac-ccache-${{ github.sha }} |
|
restore-keys: | |
|
${{ runner.os }}-mac-ccache-${{ github.sha }} |
|
${{ runner.os }}-mac-ccache- |
|
|
|
- name: Install ccache |
|
run: | |
|
brew install ccache |
|
|
|
- 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: | |
|
GST_URL_BASE_PATH="https://gstreamer.freedesktop.org/data/pkg/osx/${{ env.gst_version }}" |
|
wget "${GST_URL_BASE_PATH}/gstreamer-1.0-devel-${{ env.gst_version }}-x86_64.pkg" |
|
wget "${GST_URL_BASE_PATH}/gstreamer-1.0-${{ env.gst_version }}-x86_64.pkg" |
|
for package in *.pkg ; |
|
do sudo installer -verbose -pkg "$package" -target / |
|
done |
|
|
|
- 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)) |
|
export LIBRARY_PATH=/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/ |
|
export CCACHE_DIR=~/.ccache |
|
ccache -s |
|
ccache -z |
|
qmake -r ${ACTIONS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=${CONFIG} CONFIG+=ccache |
|
make -j$JOBS |
|
ccache -s |
|
|
|
- uses: actions/upload-artifact@master |
|
with: |
|
name: QGroundControl.dmg |
|
path: ${{ runner.temp }}/shadow_build_dir/package/QGroundControl.dmg |
|
|
|
- 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: "QGroundControl ${{ steps.get_version.outputs.VERSION }} test" |