-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (113 loc) · 3.91 KB
/
windows_x86_64.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Windows x86_64
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
arch: [x86]
config:
- name: "default"
dependencies: |
boost:x64-windows
gtest:x64-windows
tbb:x64-windows
fmt:x64-windows
cmake_opts: ""
- name: "no_fmt"
dependencies: |
boost:x64-windows
gtest:x64-windows
tbb:x64-windows
cmake_opts: "-DWITH_FMT=OFF"
- name: "no_tbb"
dependencies: |
boost:x64-windows
gtest:x64-windows
fmt:x64-windows
cmake_opts: "-DWITH_TBB=OFF"
- name: "no_boost"
dependencies: |
gtest:x64-windows
tbb:x64-windows
fmt:x64-windows
cmake_opts: "-DWITH_BOOST=OFF"
- name: "no_fmt_no_boost"
dependencies: |
gtest:x64-windows
tbb:x64-windows
cmake_opts: "-DWITH_FMT=OFF -DWITH_BOOST=OFF"
- name: "no_fmt_no_tbb"
dependencies: |
boost:x64-windows
gtest:x64-windows
cmake_opts: "-DWITH_FMT=OFF -DWITH_TBB=OFF"
- name: "no_boost_no_tbb"
dependencies: |
gtest:x64-windows
fmt:x64-windows
cmake_opts: "-DWITH_BOOST=OFF -DWITH_TBB=OFF"
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Initialize submodules
run: git submodule update --init --recursive
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
echo "VCPKG_ROOT=$(pwd)\vcpkg" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "CMAKE_TOOLCHAIN_FILE=$(pwd)\vcpkg\scripts\buildsystems\vcpkg.cmake" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Install Dependencies
run: |
$dependencies = @(${matrix.config.dependencies})
foreach ($dep in $dependencies) {
.\vcpkg\vcpkg.exe install $dep
}
.\vcpkg\vcpkg.exe integrate install
- name: Update vcpkg
run: |
.\vcpkg\vcpkg.exe update
.\vcpkg\vcpkg.exe upgrade --no-dry-run
- name: Setup CMake and Ninja
uses: lukka/[email protected]
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Check MSVC Version
run: |
try {
$versionOutput = cl 2>&1
$match = $versionOutput | Select-String -Pattern "Version (\d+\.\d+)"
if ($match) {
$version = [Version]$match.Matches.Groups[1].Value
Write-Output "MSVC version found: $version"
# Check if version is less than 19.28
if ($version -lt [Version]"19.28") {
throw "MSVC version is less than 19.28"
}
} else {
Write-Output "MSVC version could not be determined. Skipping version check."
echo "::set-output name=skip_step::true"
}
} catch {
throw $_
}
shell: pwsh
id: check_msvc
- name: Create build directory
if: steps.check_msvc.outputs.skip_step != 'true'
run: mkdir build
- name: Verify vcpkg Installation
run: .\vcpkg\vcpkg.exe list
- name: Configure CMake
if: steps.check_msvc.outputs.skip_step != 'true'
run: |
echo "CMAKE_TOOLCHAIN_FILE is: $Env:CMAKE_TOOLCHAIN_FILE"
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake ${{ matrix.config.cmake_opts }}
- name: List build directory contents
run: Get-ChildItem -Recurse build/
- name: Build
run: cmake --build build --config Release --verbose