Skip to content

Update cmake-single-platform.yml #5

Update cmake-single-platform.yml

Update cmake-single-platform.yml #5

name: CMake on Windows
on:
push:
branches: [ "Master" ]
pull_request:
branches: [ "Master" ]
env:
BUILD_TYPE: Release
VCPKG_DIR: D:\a\WebShare-Connect\WebShare-Connect\vcpkg
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Cache vcpkg installed packages
uses: actions/cache@v3
with:
path: ${{ env.VCPKG_DIR }}/installed
key: ${{ runner.os }}-vcpkg-installed-${{ hashFiles('**/vcpkg.json') }}
- name: Install vcpkg
shell: cmd
run: |
git clone https://github.com/microsoft/vcpkg.git ${{ env.VCPKG_DIR }}
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg install czmq
- name: List installed packages
shell: cmd
run: .\vcpkg\vcpkg list
- name: Configure CMake
run: |
cmake -B ${{github.workspace}}\build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DIR }}\scripts\buildsystems\vcpkg.cmake
- name: Build
run: |
cmake --build ${{github.workspace}}\build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}\build
run: |
ctest -C ${{env.BUILD_TYPE}}