Skip to content

Commit 411ce97

Browse files
authored
Merge pull request #216 from robinlinden/windows-ci
Add Visual Studio x86 and AMD64 CI builds
2 parents 40c5f02 + 72c2e4a commit 411ce97

File tree

3 files changed

+58
-1
lines changed

3 files changed

+58
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Linux CI
22

33
on: [push, pull_request]
44

.github/workflows/ci-windows.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Windows CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
ci:
7+
name: ${{ matrix.name }}
8+
runs-on: ${{ matrix.os }}
9+
10+
env:
11+
CTEST_OUTPUT_ON_FAILURE: ON
12+
CTEST_PARALLEL_LEVEL: 2
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- name: windows-2019-cl-x86
19+
os: windows-2019
20+
generator: Visual Studio 16 2019
21+
type: Debug
22+
platform: Win32
23+
conan_arch: x86
24+
25+
- name: windows-2019-cl-x64
26+
os: windows-2019
27+
generator: Visual Studio 16 2019
28+
type: Debug
29+
platform: x64
30+
conan_arch: x86_64
31+
32+
steps:
33+
- uses: actions/checkout@v2
34+
35+
- uses: actions/setup-python@v2
36+
with:
37+
python-version: 3.8
38+
39+
- name: Install
40+
run: |
41+
python -m pip install cmake==3.17.3 conan==1.28.1 --upgrade
42+
conan profile new default --detect --force
43+
mkdir -p build && cd build
44+
conan install .. --build=missing -s arch=${{ matrix.conan_arch }} -s build_type=${{ matrix.type }}
45+
46+
- name: Build
47+
shell: bash # CMake doesn't like paths with backslashes.
48+
run: |
49+
cmake -S . -B build -G "${{ matrix.generator }}" -A ${{ matrix.platform }} -DCMAKE_PREFIX_PATH=`pwd`/build -DCMAKE_MODULE_PATH=`pwd`/build
50+
cmake --build build --config ${{ matrix.type }}

examples/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set(CMAKE_EXE_LINKER_FLAGS " -static")
33
add_library(examples_parameters parameters.cpp parameters.hpp)
44
target_include_directories(examples_parameters PUBLIC ${Boost_INCLUDE_DIRS})
55
target_link_libraries(examples_parameters PRIVATE ${Boost_LIBRARIES})
6+
target_compile_definitions(examples_parameters PRIVATE ${Boost_DEFINITIONS})
67

78
function(make_example name src)
89
add_executable(${name} ${src} ${PUBLIC_HEADERS})
@@ -20,3 +21,9 @@ make_example(websocket_callee websocket_callee.cpp)
2021
if(UNIX)
2122
make_example(uds uds.cpp)
2223
endif()
24+
25+
# By default MSVC has a 2^16 limit on the number of sections in an object file,
26+
# and this needs more than that.
27+
if (MSVC)
28+
set_source_files_properties(websocket_callee.cpp PROPERTIES COMPILE_FLAGS /bigobj)
29+
endif()

0 commit comments

Comments
 (0)