Skip to content
This repository was archived by the owner on Oct 12, 2026. It is now read-only.

Modify CI workflow for Windows 2022 and PowerShell #4

Modify CI workflow for Windows 2022 and PowerShell

Modify CI workflow for Windows 2022 and PowerShell #4

Workflow file for this run

name: CI/CD Test Pipeline
on:
workflow_dispatch:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
toolchain: gcc
- os: windows-latest
toolchain: mingw
- os: windows-2022
toolchain: visual-studio
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.14"
##########################################################################
# Linux
##########################################################################
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build
##########################################################################
# MinGW
##########################################################################
- name: Setup MSYS2
if: matrix.toolchain == 'mingw'
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
- name: Add MinGW to PATH
if: matrix.toolchain == 'mingw'
shell: pwsh
run: |
echo "C:\msys64\mingw64\bin" >> $env:GITHUB_PATH
##########################################################################
# MSVC / Visual Studio 2022
##########################################################################
- name: Configure MSVC
if: matrix.toolchain == 'visual-studio'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
##########################################################################
# Diagnostics
##########################################################################
- name: Diagnostics
shell: pwsh
run: |
cmake --version
python --version
- name: Verify GCC
if: matrix.toolchain == 'gcc' || matrix.toolchain == 'mingw'
shell: bash
run: |
gcc --version
g++ --version
- name: Verify MSVC
if: matrix.toolchain == 'visual-studio'
shell: cmd
run: |
where cl
cl
- name: Verify Visual Studio
if: matrix.toolchain == 'visual-studio'
shell: powershell
run: |
& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
-latest `
-products * `
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
-property installationPath
- name: Verify CMake Visual Studio generator
if: matrix.toolchain == 'visual-studio'
shell: cmd
run: |
cmake --help
##########################################################################
# Build
##########################################################################
- name: Setup
run: |
python make.py --toolchain ${{ matrix.toolchain }} setup
- name: Build
run: |
python make.py --toolchain ${{ matrix.toolchain }} build
- name: Test
run: |
python make.py --toolchain ${{ matrix.toolchain }} test