-
Notifications
You must be signed in to change notification settings - Fork 4
94 lines (79 loc) · 2.53 KB
/
build.yaml
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
name: Build
on: push
jobs:
build:
strategy:
matrix:
build_type:
- Release
- Debug
deps:
- os: ubuntu-20.04
compiler:
- binary: g++-7
package: g++-7
- binary: clang++-7
package: clang-7
boost: '1.67'
- os: ubuntu-22.04
compiler:
- binary: g++-11
package: g++-11
- binary: clang++-15
package: clang-15
boost: '1.74'
name: Build ${{ matrix.build_type }} ${{ matrix.deps.compiler.binary }} boost ${{ matrix.deps.boost }} ${{ matrix.deps.os }}
runs-on: ${{ matrix.deps.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update apt-get
run: sudo apt-get update
- name: Install apt packages for dependencies
run: >
sudo apt-get install -y --no-install-recommends
ccache
cmake
libboost-atomic${{ matrix.deps.boost }}-dev
libboost-context${{ matrix.deps.boost }}-dev
libboost-coroutine${{ matrix.deps.boost }}-dev
libboost-date-time${{ matrix.deps.boost }}-dev
libboost-thread${{ matrix.deps.boost }}-dev
ninja-build
${{ matrix.deps.compiler.package }}
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.deps.os }}-${{ matrix.deps.compiler.binary }}-${{ matrix.deps.boost }}-${{ matrix.build_type }}
max-size: 1G
- name: Configure
run: >
cmake
-B build
-S .
-G Ninja
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }}
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
-D CMAKE_CXX_COMPILER=${{ matrix.deps.compiler.binary }}
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache
-D RESOURCE_POOL_BUILD_TESTS=ON
-D RESOURCE_POOL_BUILD_EXAMPLES=ON
-D RESOURCE_POOL_BUILD_BENCHMARKS=ON
-D RESOURCE_POOL_USE_SYSTEM_GOOGLETEST=OFF
-D RESOURCE_POOL_USE_SYSTEM_BENCHMARK=OFF
- name: Build
run: cmake --build build
- name: Install
run: cmake --install build
- name: Run tests
run: build/tests/resource_pool_test
- name: Run benchmark
run: build/benchmarks/resource_pool_benchmark_async
- name: Run async_pool example
run: build/examples/async_pool
- name: Run async_strand example
run: build/examples/async_strand
- name: Run coro_pool example
run: build/examples/coro_pool
- name: Run sync_pool example
run: build/examples/sync_pool