mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
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:
18
.github/workflows/cmake-multi-platform.yml
vendored
18
.github/workflows/cmake-multi-platform.yml
vendored
@@ -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
|
||||
@@ -53,6 +62,9 @@ jobs:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user