Skip to content

Updated the MinGW build #18

Updated the MinGW build

Updated the MinGW build #18

Workflow file for this run

name: windows-builds
on:
push:
workflow_dispatch:
jobs:
build_windows_msvc:
name: Build with MSVC and Ninja
runs-on: windows-2022
env:
QT_VERSION: 6.4.2
QT_DIR: ${{ github.workspace }}\Qt
steps:
- name: πŸ“¦ Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: βš™οΈ Install Ninja build system
run: choco install ninja --no-progress
- name: πŸ“₯ Install Qt for MSVC
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
target: desktop
host: windows
arch: win64_msvc2019_64
dir: ${{ env.QT_DIR }}
setup-python: false
- name: πŸ—οΈ Setup MSVC Developer Environment
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
- name: πŸ› οΈ Configure CMake with Ninja + MSVC
run: |
cmake -S . -B build -G Ninja `
-DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}\Qt\${{ env.QT_VERSION }}\msvc2019_64" `
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}\install" `
-DCMAKE_BUILD_TYPE=Release
shell: powershell
- name: πŸ”¨ Build with Ninja + MSVC
run: cmake --build build
shell: powershell
- name: πŸ“¦ Install built files
run: cmake --install build
shell: powershell
build_windows_mingw:

Check failure on line 56 in .github/workflows/windows-cmake.yml

View workflow run for this annotation

GitHub Actions / windows-builds

Invalid workflow file

The workflow is not valid. .github/workflows/windows-cmake.yml (Line: 56, Col: 1): Unexpected value 'build_windows_mingw'
name: Build with Qt's MinGW and CMake (no Ninja)
runs-on: windows-2022
env:
QT_VERSION: 6.8.2
QT_DIR: ${{ github.workspace }}\Qt
QT_CACHE_KEY: qt-${{ runner.os }}-${{ env.QT_VERSION }}-mingw
steps:
- name: πŸ“¦ Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: πŸ’Ύ Restore Qt cache
id: qt-cache
uses: actions/cache@v4
with:
path: ${{ env.QT_DIR }}
key: ${{ env.QT_CACHE_KEY }}
- name: πŸ“₯ Install Qt + MinGW (if not cached)
if: steps.qt-cache.outputs.cache-hit != 'true'
uses: jurplel/install-qt-action@v4
with:
aqtversion: '==3.1.19'
version: ${{ env.QT_VERSION }}
target: desktop
host: windows
arch: win64_mingw
dir: ${{ env.QT_DIR }}
tools: 'tools_mingw'
setup-python: false
- name: βž• Add Qt-bundled MinGW to PATH
shell: powershell
run: |
$mingwPath = Get-ChildItem "${{ env.QT_DIR }}\Tools" | Where-Object { $_.Name -like "mingw*" } | Select-Object -First 1
echo "${{ env.QT_DIR }}\Tools\$($mingwPath.Name)\bin" >> $env:GITHUB_PATH
- name: πŸ› οΈ Configure CMake (MinGW)
shell: powershell
run: |
cmake -S . -B build-mingw `
-DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}\Qt\${{ env.QT_VERSION }}\mingw_64" `
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\install `
-DCMAKE_BUILD_TYPE=Release `
-G "MinGW Makefiles"
- name: πŸ”¨ Build with CMake (MinGW)
shell: powershell
run: cmake --build build-mingw -- -j2
- name: πŸ“¦ Install built files (MinGW)
shell: powershell
run: cmake --install build-mingw