New CI workflow based on run-vcpkg action #59
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C++ CI | |
on: | |
push: | |
branches: | |
- main | |
- new-ci-workflow-based-on-run-vcpkg | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build_with_run_vcpkg: | |
runs-on: ubuntu-latest | |
env: | |
VCPKG_DEFAULT_TRIPLET: x64-linux | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get latest cmake | |
uses: lukka/get-cmake@latest | |
- name: Setup vcpkg using vcpkg-configuration.json | |
uses: lukka/run-vcpkg@v11 | |
with: | |
# This specifies the location of vcpkg, where it is going to be restored from cache, or create from scratch. | |
vcpkgDirectory: '${{ github.workspace }}/_vcpkg_' | |
- name: Run cmake using CMakePresets.json & vcpkg.json | |
uses: lukka/run-cmake@v10 | |
with: | |
# These are cmake presets used to configure & build (defined in CMakePresets.json). | |
configurePreset: vcpkg-cmake-build | |
buildPreset: vcpkg-cmake-release | |