From 7409bfe091440368b313ddbdbb06ec18950414ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Thu, 1 Apr 2021 09:53:59 -0300 Subject: [PATCH] github: workflows: Rename mac build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .github/workflows/buildQGCandDeploy.yml | 87 --------------------------------- .github/workflows/dmg.yml | 87 +++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 87 deletions(-) delete mode 100644 .github/workflows/buildQGCandDeploy.yml create mode 100644 .github/workflows/dmg.yml diff --git a/.github/workflows/buildQGCandDeploy.yml b/.github/workflows/buildQGCandDeploy.yml deleted file mode 100644 index 1cd3bd3..0000000 --- a/.github/workflows/buildQGCandDeploy.yml +++ /dev/null @@ -1,87 +0,0 @@ -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" \ No newline at end of file diff --git a/.github/workflows/dmg.yml b/.github/workflows/dmg.yml new file mode 100644 index 0000000..70d4b0c --- /dev/null +++ b/.github/workflows/dmg.yml @@ -0,0 +1,87 @@ +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" \ No newline at end of file