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) name: Arch Linux (Clang)
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: archlinux:latest container: archlinux:latest
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
OMATH_BUILD_VIA_VCPKG: ON
steps: steps:
- name: Install basic tool-chain with pacman - name: Install basic tool-chain with pacman
@@ -33,6 +36,12 @@ jobs:
with: with:
submodules: recursive 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) - name: Configure (cmake --preset)
shell: bash shell: bash
run: cmake --preset linux-release -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF run: cmake --preset linux-release -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF
@@ -53,6 +62,9 @@ jobs:
windows-build-and-test: windows-build-and-test:
name: Windows (MSVC) name: Windows (MSVC)
runs-on: windows-latest runs-on: windows-latest
env:
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
OMATH_BUILD_VIA_VCPKG: ON
steps: steps:
- name: Checkout repository (with sub-modules) - name: Checkout repository (with sub-modules)
@@ -66,6 +78,12 @@ jobs:
- name: Set up MSVC developer command-prompt - name: Set up MSVC developer command-prompt
uses: ilammy/msvc-dev-cmd@v1 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) - name: Configure (cmake --preset)
shell: bash shell: bash
run: cmake --preset windows-release -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF run: cmake --preset windows-release -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF