Skip to content

Vcpkg metaproject support #109

Vcpkg metaproject support

Vcpkg metaproject support #109

Workflow file for this run

name: CMake
on:
pull_request:
push:
branches: master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- build_type: Debug
- build_type: Release
env:
BUILD_TYPE: ${{ matrix.build_type }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup vcpkg (with binary caching)
uses: lukka/run-vcpkg@v11
with:
runVcpkgInstall: false
vcpkgDirectory: "${{ github.workspace }}/.vcpkg"
vcpkgGitCommitId: "58950f88544e4637524dbd6a01d0317cf4cb77fc"
- name: Install dependencies
shell: bash
run: $VCPKG_ROOT/vcpkg install boost-asio
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/serverpp/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/serverpp/build
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
- name: Build
shell: bash
working-directory: ${{runner.workspace}}/serverpp/build
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{runner.workspace}}/serverpp/build
shell: bash
run: ctest -C $BUILD_TYPE --output-on-failure