97 lines
2.6 KiB
YAML
97 lines
2.6 KiB
YAML
name: Custom build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- 'Stable*'
|
|
tags:
|
|
- 'v*'
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/custom.yml'
|
|
- 'deploy/windows/**'
|
|
- 'src/**'
|
|
- 'custom-example/**'
|
|
- 'CMakeLists.txt'
|
|
- 'cmake/**'
|
|
|
|
# concurrency:
|
|
# group: ${{ github.workflow }}-${{ github.ref }}
|
|
# cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
BuildType: [Release]
|
|
Arch: [x64]
|
|
|
|
defaults:
|
|
run:
|
|
shell: cmd
|
|
|
|
env:
|
|
ARTIFACT: QGroundControl-installer.exe
|
|
QT_VERSION: 6.8.2
|
|
GST_VERSION: 1.24.12
|
|
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
fetch-tags: true
|
|
|
|
- name: Initial Setup
|
|
uses: ./.github/actions/common
|
|
|
|
- name: Enable custom build
|
|
run: |
|
|
if not exist ".\custom-example" (
|
|
echo Directory ".\custom-example" does not exist. && exit /b 1
|
|
)
|
|
xcopy /E /I ".\custom-example" ".\custom"
|
|
|
|
- name: Install GStreamer
|
|
uses: blinemedical/setup-gstreamer@v1
|
|
with:
|
|
version: ${{ env.GST_VERSION }}
|
|
|
|
- name: Setup Caching
|
|
uses: ./.github/actions/cache
|
|
with:
|
|
host: windows
|
|
target: win64_msvc2022_64
|
|
build-type: ${{ matrix.BuildType }}
|
|
cpm-modules: ${{ runner.temp }}/shadow_build_dir/cpm_modules
|
|
|
|
- name: Install Qt for Windows (x64)
|
|
if: matrix.Arch == 'x64'
|
|
uses: jurplel/install-qt-action@v4
|
|
with:
|
|
version: ${{ env.QT_VERSION }}
|
|
aqtversion: ==3.1.19
|
|
host: windows
|
|
target: desktop
|
|
arch: win64_msvc2022_64
|
|
dir: ${{ runner.temp }}
|
|
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
|
|
|
|
- name: Set up Visual Studio shell
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
with:
|
|
arch: x64
|
|
|
|
- name: Configure
|
|
working-directory: ${{ runner.temp }}\shadow_build_dir
|
|
run: ${{ env.QT_ROOT_DIR }}/bin/qt-cmake -S ${{ github.workspace }} -B . -G Ninja
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.BuildType }}
|
|
-DQGC_STABLE_BUILD=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && 'ON' || 'OFF' }}
|
|
|
|
- name: Build
|
|
working-directory: ${{ runner.temp }}\shadow_build_dir
|
|
run: cmake --build . --target all --config ${{ matrix.BuildType }}
|