-
Notifications
You must be signed in to change notification settings - Fork 226
95 lines (86 loc) · 3.2 KB
/
boost-asio.yml
File metadata and controls
95 lines (86 loc) · 3.2 KB
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
name: boost-asio
on:
push:
branches:
- main
- feature/*
paths-ignore:
- '**/*.md'
- 'docs/**'
pull_request:
branches:
- main
paths-ignore:
- '**/*.md'
- 'docs/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler:
- { name: clang, version: 18 }
- { name: clang, version: 20 }
- { name: gcc, version: 14 }
boost_version: [1.88.0, 1.86.0]
env:
CC: ${{matrix.compiler.name}}-${{matrix.compiler.version}}
CXX: ${{ matrix.compiler.name == 'gcc' && 'g++' || 'clang++' }}-${{matrix.compiler.version}}
steps:
- uses: actions/checkout@v6
- name: Install clang
if: matrix.compiler.name == 'clang'
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ matrix.compiler.version }} main" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt-get update
sudo apt-get install -y --fix-missing clang-${{ matrix.compiler.version }} libc++-${{ matrix.compiler.version }}-dev libc++abi-${{ matrix.compiler.version }}-dev
echo "PATH=/usr/lib/llvm-${{ matrix.compiler.version }}/bin:$PATH" >> $GITHUB_ENV
- name: Install Boost
id: install-boost
uses: MarkusJx/install-boost@v2
with:
boost_version: ${{ matrix.boost_version }}
- name: Configure CMake
run: |
CMAKE_CXX_FLAGS=""
CMAKE_EXE_LINKER_FLAGS=""
if [ "${{ matrix.compiler.name }}" = "clang" ]; then
CMAKE_CXX_FLAGS="-stdlib=libc++"
CMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -lc++abi"
fi
cmake -B ${{github.workspace}}/build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_STANDARD=23 \
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
-DCMAKE_EXE_LINKER_FLAGS="$CMAKE_EXE_LINKER_FLAGS" \
-Dglaze_USE_BUNDLED_ASIO=OFF
env:
Boost_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
- name: Build
# Only build networking tests that actually use Asio
run: |
cmake --build build -j $(nproc) --target \
asio_repe \
http_examples \
http_router_test \
http_client_test \
http_server_api_tests \
https_test \
jsonrpc_registry_test \
openapi_test \
repe_buffer_test \
repe_plugin_test \
repe_test \
registry_view_test \
repe_to_jsonrpc_test \
websocket_close_test \
websocket_client_test \
utf8_test \
shared_context_bug_test \
wss_test
- name: Test
working-directory: build
run: ctest -j $(nproc) --output-on-failure -R "^(asio_repe|http_examples|http_router_test|http_client_test|http_server_api_tests|https_test|jsonrpc_registry_test|openapi_test|repe_buffer_test|repe_plugin_test|repe_test|registry_view_test|repe_to_jsonrpc_test|websocket_close_test|websocket_client_test|utf8_test|shared_context_bug_test|wss_test)$"