-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
125 lines (114 loc) · 3.52 KB
/
docker-compose.yml
File metadata and controls
125 lines (114 loc) · 3.52 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
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
# SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-only
# Docker Compose for local development - mounts source for fast iteration
#
# Usage:
# docker compose run --rm build-gcc # Build with GCC
# docker compose run --rm build-clang # Build with Clang
# docker compose run --rm build-stdexec # Build with stdexec
# docker compose run --rm build-asio # Build with Asio
# docker compose run --rm build-full # Build with all features
# docker compose run --rm test-gcc # Build and test with GCC
# docker compose run --rm shell # Interactive shell
x-common: &common
build:
context: .
dockerfile: docker/Dockerfile.base
volumes:
- .:/src:ro
- build-cache:/build
working_dir: /build
services:
build-gcc:
<<: *common
command: >
sh -c "cmake -S /src -B /build -G Ninja
-DCMAKE_C_COMPILER=gcc
-DCMAKE_CXX_COMPILER=g++
-DCMAKE_BUILD_TYPE=Release
-DLOOM_BUILD_TESTS=ON
&& cmake --build /build --parallel"
build-clang:
<<: *common
command: >
sh -c "cmake -S /src -B /build -G Ninja
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_BUILD_TYPE=Release
-DLOOM_BUILD_TESTS=ON
&& cmake --build /build --parallel"
build-stdexec:
<<: *common
command: >
sh -c "cmake -S /src -B /build -G Ninja
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_BUILD_TYPE=Release
-DLOOM_BUILD_TESTS=ON
-DLOOM_USE_STDEXEC=ON
-DLOOM_FETCHCONTENT_STDEXEC=ON
&& cmake --build /build --parallel"
build-asio:
<<: *common
command: >
sh -c "cmake -S /src -B /build -G Ninja
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_BUILD_TYPE=Release
-DLOOM_BUILD_TESTS=ON
-DLOOM_USE_ASIO=ON
-DLOOM_FETCHCONTENT_ASIO=ON
&& cmake --build /build --parallel"
build-full:
<<: *common
command: >
sh -c "cmake -S /src -B /build -G Ninja
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_BUILD_TYPE=Release
-DLOOM_BUILD_TESTS=ON
-DLOOM_USE_STDEXEC=ON
-DLOOM_FETCHCONTENT_STDEXEC=ON
-DLOOM_USE_ASIO=ON
-DLOOM_FETCHCONTENT_ASIO=ON
&& cmake --build /build --parallel"
test-gcc:
<<: *common
command: >
sh -c "cmake -S /src -B /build -G Ninja
-DCMAKE_C_COMPILER=gcc
-DCMAKE_CXX_COMPILER=g++
-DCMAKE_BUILD_TYPE=Release
-DLOOM_BUILD_TESTS=ON
&& cmake --build /build --parallel
&& ctest --test-dir /build --output-on-failure"
test-clang:
<<: *common
command: >
sh -c "cmake -S /src -B /build -G Ninja
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_BUILD_TYPE=Release
-DLOOM_BUILD_TESTS=ON
&& cmake --build /build --parallel
&& ctest --test-dir /build --output-on-failure"
test-full:
<<: *common
command: >
sh -c "cmake -S /src -B /build -G Ninja
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_BUILD_TYPE=Release
-DLOOM_BUILD_TESTS=ON
-DLOOM_USE_STDEXEC=ON
-DLOOM_FETCHCONTENT_STDEXEC=ON
-DLOOM_USE_ASIO=ON
-DLOOM_FETCHCONTENT_ASIO=ON
&& cmake --build /build --parallel
&& ctest --test-dir /build --output-on-failure"
shell:
<<: *common
command: /bin/bash
stdin_open: true
tty: true
volumes:
build-cache: