From fe944c4e5f1f5eb27de063d13772ccf3ab1734cb Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 1 Jun 2020 15:02:20 +0200 Subject: [PATCH] Add CI job to test compilation on Windows with vcpkg Fix https://github.com/ros-industrial/abb_libegm/issues/92 --- .github/workflows/windows-vcpkg.yml | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/windows-vcpkg.yml diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml new file mode 100644 index 0000000..9bd15a0 --- /dev/null +++ b/.github/workflows/windows-vcpkg.yml @@ -0,0 +1,39 @@ +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@v3 + with: + vcpkgArguments: '--triplet x64-windows boost-asio boost-math boost-smart-ptr protobuf' + # commit from vcpkg's master branch on 2020/06/01 + vcpkgGitCommitId: 6d36e2a86baf8d227fc6dce587bd69997d67fb5e + # 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