name: Windows vcpkg Workflow

on:
  push:
    branches:
      - master
  pull_request:
  schedule:
  # Execute a "nightly" build at 2 AM UTC.
  - cron:  '0 2 * * *'

jobs:
  build:
    name: 'Windows vcpkg job'
    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v2

    # Restore from cache the previously built ports. If "cache miss" then provision vcpkg,
    # install desired ports, finally cache everything for the next run.
    - name: Restore from cache and run vcpkg
      uses: lukka/run-vcpkg@v5
      with:
        vcpkgArguments: '--triplet x64-windows boost-asio boost-math boost-smart-ptr protobuf'
        # Commit corresponding to vcpkg's release v2020.11.
        vcpkgGitCommitId: 0bf3923f9fab4001c00f0f429682a0853b5749e0
        # Workaround for https://github.com/ros-industrial/abb_libegm/pull/101#discussion_r433370614.
        # This line can be removed once protobuf is linked via its imported CMake targets.
        vcpkgDirectory: '${{ github.workspace }}/../vcpkg'

    - name: Configure the project
      shell: bash
      run: |
        mkdir build
        cd build
        cmake -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake ..
        cmake --build . --config RelWithDebInfo
        cmake --install . --config RelWithDebInfo

name: Windows vcpkg Workflow

on:
  push:
    branches:
      - master
  pull_request:
  schedule:
  # Execute a "nightly" build at 2 AM UTC.
  - cron:  '0 2 * * *'

jobs:
  build:
    name: 'Windows vcpkg job'
    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v2

    # Restore from cache the previously built ports. If "cache miss" then provision vcpkg,
    # install desired ports, finally cache everything for the next run.
    - name: Restore from cache and run vcpkg
      uses: lukka/run-vcpkg@v5
      with:
        vcpkgArguments: '--triplet x64-windows boost-asio boost-math boost-smart-ptr protobuf'
        # Commit corresponding to vcpkg's master branch on 2020-11-20.
        vcpkgGitCommitId: e803bf11296d8e7900dafb41e7b1224778d33dc6
        # Workaround for https://github.com/ros-industrial/abb_libegm/pull/101#discussion_r433370614.
        # This line can be removed once protobuf is linked via its imported CMake targets.
        vcpkgDirectory: '${{ github.workspace }}/../vcpkg'

    - name: Configure the project
      shell: bash
      run: |
        mkdir build
        cd build
        cmake -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake ..
        cmake --build . --config RelWithDebInfo
        cmake --install . --config RelWithDebInfo

Use the latest vcpkg commit
Use the latest vcpkg commit
