update vcpkg commit to 01f602195983451bc83e72f4214af2cbc495aa94 #241
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: build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
BUILD_TYPE: ["Debug", "Release"] | |
os: [ windows-latest ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get MSVC | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Get specific version CMake, v3.21.2 | |
uses: lukka/[email protected] | |
- name: Setup vcpkg (it does not install any package yet) | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgGitCommitId: 01f602195983451bc83e72f4214af2cbc495aa94 | |
- name: Get OpenCppCoverage | |
if: ${{ matrix.BUILD_TYPE == 'Debug' }} | |
env: | |
myUrl: "https://github.com/OpenCppCoverage/OpenCppCoverage/releases/download/release-0.9.9.0/OpenCppCoverageSetup-x64-0.9.9.0.exe" | |
run: | | |
powershell.exe -Command "Invoke-WebRequest $env:myUrl -OutFile $env:Temp/OpenCppCoverageSetup-x64-0.9.9.0.exe" | |
powershell.exe -Command "& $env:Temp/OpenCppCoverageSetup-x64-0.9.9.0.exe /silent" | |
powershell.exe -Command "Add-Content $env:GITHUB_PATH 'C:\Program Files\OpenCppCoverage'" | |
- name: run cmake | |
run: > | |
cmake . -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -B build | |
- name: run build | |
run: cmake --build build --config ${{ matrix.BUILD_TYPE }} | |
- name: run test | |
run: ctest -C ${{ matrix.BUILD_TYPE }} --test-dir build --verbose --repeat until-pass:3 --timeout 30 --output-on-failure | |
- name: run test with coverage | |
if: ${{ matrix.BUILD_TYPE == 'Debug' }} | |
run: > | |
cmake --build build --config ${{ matrix.BUILD_TYPE }} --target coverage | |
- name: Upload Report to Codecov | |
if: ${{ matrix.BUILD_TYPE == 'Debug' }} | |
uses: codecov/codecov-action@v4 | |
with: | |
files: ./cobertura.xml | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} # required |