Skip to content

Commit

Permalink
Merge pull request #11 from ChrisHal/test-vcpkg-ci
Browse files Browse the repository at this point in the history
make ci work with vcpkg
  • Loading branch information
ChrisHal authored Jan 29, 2024
2 parents ed21e77 + f1d75de commit 756d3e6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,21 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Bootstrap VCPKG
run: ${{ github.workspace }}/vcpkg/bootstrap-vcpkg
- uses: actions/checkout@v3

- name: Restore vcpkg packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: vcpkg integrate install

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}}
if: ${{ ! startsWith(matrix.os, 'windows') }}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE="/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake"

- name: Configure CMake on windows
if: ${{ startsWith(matrix.os, 'windows') }}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake

- name: Build
# Build your program with the given configuration
Expand Down

0 comments on commit 756d3e6

Please sign in to comment.