Adds Vcpkg setup to CI workflows

Adds vcpkg setup for Arch Linux and Windows CI jobs.

This ensures consistent dependency management and builds via Vcpkg for both platforms and enables OMath to build via vcpkg.
Clones the vcpkg repository and bootstraps it during the job execution.
This commit is contained in:
2025-10-27 08:00:53 +03:00
parent 878e3358c0
commit 171b4ca3da

View File

@@ -19,6 +19,9 @@ jobs:
name: Arch Linux (Clang)
runs-on: ubuntu-latest
container: archlinux:latest
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
OMATH_BUILD_VIA_VCPKG: ON
steps:
- name: Install basic tool-chain with pacman
@@ -33,6 +36,12 @@ jobs:
with:
submodules: recursive
- name: Set up vcpkg
shell: bash
run: |
git clone --depth 1 https://github.com/microsoft/vcpkg "$VCPKG_ROOT"
"$VCPKG_ROOT/bootstrap-vcpkg.sh" -disableMetrics
- name: Configure (cmake --preset)
shell: bash
run: cmake --preset linux-release -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF
@@ -47,12 +56,15 @@ jobs:
##############################################################################
# 2) Windows MSVC / Ninja
##############################################################################
##############################################################################
# 2) Windows MSVC / Ninja
##############################################################################
windows-build-and-test:
name: Windows (MSVC)
runs-on: windows-latest
env:
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
OMATH_BUILD_VIA_VCPKG: ON
steps:
- name: Checkout repository (with sub-modules)
@@ -66,6 +78,12 @@ jobs:
- name: Set up MSVC developer command-prompt
uses: ilammy/msvc-dev-cmd@v1
- name: Set up vcpkg
shell: pwsh
run: |
git clone --depth 1 https://github.com/microsoft/vcpkg $env:VCPKG_ROOT
& "$env:VCPKG_ROOT\bootstrap-vcpkg.bat" -disableMetrics
- name: Configure (cmake --preset)
shell: bash
run: cmake --preset windows-release -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF