From 171b4ca3da250e083e62ff26641cebe349de443d Mon Sep 17 00:00:00 2001 From: Orange Date: Mon, 27 Oct 2025 08:00:53 +0300 Subject: [PATCH] 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. --- .github/workflows/cmake-multi-platform.yml | 24 +++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 13aee86..aefcbfa 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -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