Skip to content

Windows

Windows #368

Workflow file for this run

name: Windows
on:
push:
branches:
- develop
- master
- release/*
tags:
- '*'
pull_request:
workflow_dispatch:
schedule:
- cron: '18 0 1 * *'
jobs:
build:
name: MSVC ${{ matrix.build_type }} (${{ matrix.os }}) ${{ matrix.name_suffix }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-latest]
build_type: [Release, Debug]
name_suffix: [""]
cmake_args: [""]
include:
# Optional module builds
- os: windows-latest
build_type: Release
name_suffix: "(wxWidgets integration)"
cmake_args: "-DLIBBASE_BUILD_MODULE_WX=ON"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: ${{ runner.workspace }}/vcpkg
- name: CMake configuration
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.cmake_args }} -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Building
run: cmake --build build --config ${{ matrix.build_type }} -j 8
- name: Testing
run: ctest --test-dir build --output-on-failure --timeout 15
# Prepare & upload binaries
- name: Prepare binaries
if: matrix.os == 'windows-2022' && github.event_name != 'pull_request'
run: cmake --install build --prefix install --config ${{ matrix.build_type }}
continue-on-error: true
- name: Upload binaries as artifact
if: matrix.os == 'windows-2022' && github.event_name != 'pull_request' && success()
uses: actions/upload-artifact@v4
with:
name: libbase-${{ github.ref_name }}-msvc-2022-${{ matrix.build_type }}-x64.zip
path: install
retention-days: 7
continue-on-error: true