chore(cpn): build for Windows with Visual Studio (#6476)

This commit is contained in:
Raphael Coeffic
2025-08-14 10:06:24 +10:00
committed by GitHub
parent 6d9819f5bf
commit 96610449ef
20 changed files with 169 additions and 181 deletions
+20 -28
View File
@@ -23,11 +23,13 @@ on:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CMAKE_GENERATOR: "MSYS Makefiles"
CMAKE_BUILD_TYPE: "Release"
CMAKE_GENERATOR: "Ninja"
QT_VERSION: "6.9.0"
MINGW_VERSION: "win64_mingw"
MINGW_PATH: "mingw_64"
QT_ARCH: "win64_msvc2022_64"
SDL_VERSION: "2.32.8"
CXX: "clang++"
CC: "clang"
jobs:
build:
@@ -38,26 +40,9 @@ jobs:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
shell: bash
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git make mingw-w64-x86_64-toolchain
- name: Install Dependencies
run: |
pacman -S --noconfirm mingw-w64-x86_64-cmake \
mingw-w64-x86_64-ninja \
mingw-w64-x86_64-zlib \
mingw-w64-x86_64-SDL2 \
mingw-w64-x86_64-clang \
mingw-w64-x86_64-nsis \
mingw-w64-x86_64-dfu-util \
mingw-w64-x86_64-openssl
- name: Check out the repo
uses: actions/checkout@v4
with:
@@ -69,23 +54,30 @@ jobs:
AQT_CONFIG: ${{ github.workspace }}/tools/aqt-settings.ini
with:
cache: true
cache-key-prefix: 'install-qt-action-win64'
cache-key-prefix: 'install-qt-action-${{ env.QT_ARCH }}'
version: ${{ env.QT_VERSION }}
arch: ${{ env.MINGW_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
working-directory: ${{github.workspace}}
env:
CMAKE_GENERATOR: Ninja
run: |
mkdir output && \
CMAKE_PREFIX_PATH=$RUNNER_WORKSPACE/Qt/$QT_VERSION/$MINGW_PATH \
CMAKE_PREFIX_PATH="$QT_ROOT_DIR;$SDL2_ROOT" \
tools/build-companion.sh "$(pwd)" "$(pwd)/output/"
- name: Compose release filename