-
-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (76 loc) · 2.71 KB
/
msbuild.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Windows Build
on: [push]
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
VSCP_PATH: '${{ github.workspace }}/vscp'
ENVIRONMENT_SCRIPT: "C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
GENERATORS: "Visual Studio 17 2022"
BUILD_CONFIGURATION: Release
# 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
jobs:
build:
name: Windows x64
runs-on: windows-latest
steps:
- name: Install ms-dev environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Clone
uses: actions/checkout@v3
with:
ref: development
submodules: recursive
- name: Checkout vscp repo
uses: actions/checkout@v3
with:
repository: grodansparadis/vscp
path: vscp
ref: development
submodules: recursive
- name: Get latest CMake and ninja
# Using 'latest' branch, the most recent CMake and ninja are installed.
uses: lukka/get-cmake@latest
- name: Checkout vcpkg repo
uses: actions/checkout@v3
with:
repository: microsoft/vcpkg
path: vcpkg
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
with:
msbuild-architecture: x64
- 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 "${{ env.GENERATORS }}" -A x64 -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=${{ env.BUILD_CONFIGURATION }} -DCMAKE_TOOLCHAIN_FILE=D:/a/vscp-helper-lib/vscp-helper-lib/vcpkg/scripts/buildsystems/vcpkg.cmake -DVSCP_PATH=vscp
cmake --build . --config ${{ env.BUILD_CONFIGURATION }}
#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