Files
edgetx-gx12/.github/workflows/win_cpn-64.yml
T

93 lines
2.5 KiB
YAML

name: Windows Companion 64-bit
on:
push:
branches:
- 'main'
tags:
- v*
paths:
- '.github/workflows/win_cpn-64.yml'
- 'companion/**'
- 'tools/build-companion.sh'
pull_request:
branches:
- 'main'
paths:
- '.github/workflows/win_cpn-64.yml'
- 'companion/**'
- 'tools/build-companion.sh'
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
CMAKE_BUILD_TYPE: "Release"
CMAKE_GENERATOR: "Ninja"
QT_VERSION: "6.9.0"
QT_ARCH: "win64_msvc2022_64"
SDL_VERSION: "2.32.8"
CXX: "clang++"
CC: "clang"
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: windows-2022
defaults:
run:
shell: bash
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Qt
uses: jdpurcell/install-qt-action@v5
env:
AQT_CONFIG: ${{ github.workspace }}/tools/aqt-settings.ini
with:
cache: true
cache-key-prefix: 'install-qt-action-${{ env.QT_ARCH }}'
version: ${{ env.QT_VERSION }}
arch: ${{ env.QT_ARCH }}
modules: 'qtmultimedia qtserialport'
- name: Setup SDL2
id: setup-sdl2
uses: libsdl-org/setup-sdl@v1
with:
version: ${{ env.SDL_VERSION }}
build-type: "Release"
- name: Install Python Dependencies
run: |
echo $PATH
$Python3_ROOT_DIR/python3.exe -m pip install clang jinja2 lz4 pillow
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Build
run: |
mkdir output && \
CMAKE_PREFIX_PATH="$QT_ROOT_DIR;$SDL2_ROOT" \
tools/build-companion.sh "$(pwd)" "$(pwd)/output/"
- name: Compose release filename
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
run: echo "artifact_name=edgetx-cpn-win64-${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: "${{ env.artifact_name }}"
path: ${{github.workspace}}/output
retention-days: 15