Fixed path example #112
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: Windows Build | |
on: [push] | |
env: | |
# Path to the solution file relative to the root of the project. | |
SOLUTION_FILE_PATH: . | |
# Configuration type to build. | |
# You can convert this to a build matrix if you need coverage of multiple configuration types. | |
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
# | |
# https://github.com/marketplace/actions/run-vcpkg | |
# https://github.com/ilammy/msvc-dev-cmd | |
BUILD_CONFIGURATION: Release | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Clone | |
uses: actions/checkout@v2 | |
- name: Checkout vscp repo | |
uses: actions/checkout@v2 | |
with: | |
repository: grodansparadis/vscp | |
path: vscp | |
ref: development | |
- name: Get latest CMake and ninja | |
# Using 'latest' branch, the most recent CMake and ninja are installed. | |
uses: lukka/get-cmake@latest | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v1.0.3 | |
- name: Checkout vcpkg repo | |
uses: actions/checkout@v2 | |
with: | |
repository: microsoft/vcpkg | |
path: vcpkg | |
- name: Setup vcpkg | |
run: | | |
cd vcpkg | |
bootstrap-vcpkg.bat | |
vcpkg.exe install integrate install | |
vcpkg install expat:x64-windows | |
vcpkg install pthread:x64-windows | |
vcpkg install dlfcn-win32:x64-windows | |
vcpkg install openssl:x64-windows | |
vcpkg install spdlog:x64-windows | |
cd .. | |
- name: Install 7Zip PowerShell Module | |
shell: powershell | |
run: Install-Module 7Zip4PowerShell -Force -Verbose | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
cmake .. -G "Visual Studio 16 2019" -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=D:/a/vscp-helper-lib/vscp-helper-lib/vcpkg/scripts/buildsystems/vcpkg.cmake -DVSCP_PATH=vscp | |
msbuild libvscphelper.sln /p:Configuration=Release | |
cpack . | |
# Save artifacts | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: windows_libvscphelper | |
path: ${{github.workspace}}/build/Release/ | |
retention-days: 30 |