Skip to content

Commit b2df292

Browse files
CI improvements (#10)
The key change here is to use a python script to test all configurations, rather than a github actions matrix which spawns hundreds of 2 second builds, which is horribly inefficient. Builds were taking 6 to 16 minutes, now they take 2.5 to 5.5.
1 parent 04f8b88 commit b2df292

File tree

8 files changed

+596
-387
lines changed

8 files changed

+596
-387
lines changed

.github/workflows/build.yml

+6-185
Original file line numberDiff line numberDiff line change
@@ -7,214 +7,35 @@ on:
77
jobs:
88
build-linux:
99
runs-on: ubuntu-22.04
10-
strategy:
11-
fail-fast: false
12-
matrix:
13-
compiler: [g++-10, clang++-14]
14-
target: [Debug]
15-
std: [11, 20]
16-
unwind: [
17-
CPPTRACE_UNWIND_WITH_EXECINFO,
18-
CPPTRACE_UNWIND_WITH_NOTHING,
19-
]
20-
symbols: [
21-
CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE,
22-
CPPTRACE_GET_SYMBOLS_WITH_LIBDL,
23-
CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE,
24-
CPPTRACE_GET_SYMBOLS_WITH_NOTHING,
25-
]
26-
demangle: [
27-
CPPTRACE_DEMANGLE_WITH_CXXABI,
28-
CPPTRACE_DEMANGLE_WITH_NOTHING,
29-
]
3010
steps:
3111
- uses: actions/checkout@v2
3212
- name: dependencies
3313
run: sudo apt install gcc-10 g++-10 libgcc-10-dev
3414
- name: build
3515
run: |
36-
mkdir -p build
37-
cd build
38-
cmake .. \
39-
-DCMAKE_BUILD_TYPE=${{matrix.target}} \
40-
-DCMAKE_CXX_COMPILER=${{matrix.compiler}} \
41-
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
42-
-D${{matrix.unwind}}=On \
43-
-D${{matrix.symbols}}=On \
44-
-D${{matrix.demangle}}=On \
45-
-DCPPTRACE_BACKTRACE_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/include/backtrace.h
46-
make -j
16+
python3 ci/build-in-all-configs.py
4717
build-macos:
4818
runs-on: macos-13
49-
strategy:
50-
fail-fast: false
51-
matrix:
52-
compiler: [g++-13, clang++]
53-
target: [Debug]
54-
std: [11, 20]
55-
unwind: [
56-
CPPTRACE_UNWIND_WITH_EXECINFO,
57-
CPPTRACE_UNWIND_WITH_NOTHING,
58-
]
59-
symbols: [
60-
#CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE,
61-
CPPTRACE_GET_SYMBOLS_WITH_LIBDL,
62-
CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE,
63-
CPPTRACE_GET_SYMBOLS_WITH_NOTHING,
64-
]
65-
demangle: [
66-
CPPTRACE_DEMANGLE_WITH_CXXABI,
67-
CPPTRACE_DEMANGLE_WITH_NOTHING,
68-
]
6919
steps:
7020
- uses: actions/checkout@v2
7121
- name: build
7222
run: |
73-
mkdir -p build
74-
cd build
75-
cmake .. \
76-
-DCMAKE_BUILD_TYPE=${{matrix.target}} \
77-
-DCMAKE_CXX_COMPILER=${{matrix.compiler}} \
78-
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
79-
-D${{matrix.unwind}}=On \
80-
-D${{matrix.symbols}}=On \
81-
-D${{matrix.demangle}}=On
82-
make -j
83-
build-windows:
23+
python3 ci/build-in-all-configs.py
24+
build-windows-msvc:
8425
runs-on: windows-2019
85-
strategy:
86-
fail-fast: false
87-
matrix:
88-
compiler: [cl, clang++]
89-
target: [Debug]
90-
std: [11, 20]
91-
unwind: [
92-
CPPTRACE_UNWIND_WITH_WINAPI,
93-
CPPTRACE_UNWIND_WITH_NOTHING,
94-
]
95-
symbols: [
96-
CPPTRACE_GET_SYMBOLS_WITH_DBGHELP,
97-
CPPTRACE_GET_SYMBOLS_WITH_NOTHING,
98-
]
99-
demangle: [
100-
# CPPTRACE_DEMANGLE_WITH_CXXABI,
101-
CPPTRACE_DEMANGLE_WITH_NOTHING,
102-
]
103-
exclude:
104-
- demangle: CPPTRACE_DEMANGLE_WITH_CXXABI
105-
compiler: cl
10626
steps:
10727
- uses: actions/checkout@v2
10828
- name: Enable Developer Command Prompt
10929
uses: ilammy/[email protected]
11030
- name: build
11131
run: |
112-
mkdir -p build
113-
cd build
114-
cmake .. `
115-
-DCMAKE_BUILD_TYPE=Debug `
116-
-DCMAKE_CXX_COMPILER=${{matrix.compiler}} `
117-
-DCMAKE_CXX_STANDARD=${{matrix.std}} `
118-
-D${{matrix.unwind}}=On `
119-
-D${{matrix.symbols}}=On `
120-
-D${{matrix.demangle}}=On
121-
msbuild .\cpptrace.sln
122-
123-
build-linux-full-or-auto:
124-
runs-on: ubuntu-22.04
125-
strategy:
126-
fail-fast: false
127-
matrix:
128-
compiler: [g++-10, clang++-14]
129-
target: [Debug]
130-
std: [11, 20]
131-
config: ["-DCPPTRACE_FULL_TRACE_WITH_LIBBACKTRACE=On", ""]
132-
steps:
133-
- uses: actions/checkout@v2
134-
- name: dependencies
135-
run: sudo apt install gcc-10 g++-10 libgcc-10-dev
136-
- name: build
137-
run: |
138-
mkdir -p build
139-
cd build
140-
cmake .. \
141-
-DCMAKE_BUILD_TYPE=${{matrix.target}} \
142-
-DCMAKE_CXX_COMPILER=${{matrix.compiler}} \
143-
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
144-
-DCPPTRACE_BACKTRACE_PATH=/usr/lib/gcc/x86_64-linux-gnu/10/include/backtrace.h \
145-
${{matrix.config}}
146-
make -j
147-
build-macos-full-or-auto:
148-
runs-on: macos-13
149-
strategy:
150-
fail-fast: false
151-
matrix:
152-
compiler: [g++-13, clang++]
153-
target: [Debug]
154-
std: [11, 20]
155-
config: [""]
156-
steps:
157-
- uses: actions/checkout@v2
158-
- name: build
159-
run: |
160-
mkdir -p build
161-
cd build
162-
cmake .. \
163-
-DCMAKE_BUILD_TYPE=${{matrix.target}} \
164-
-DCMAKE_CXX_COMPILER=${{matrix.compiler}} \
165-
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
166-
${{matrix.config}}
167-
make -j
168-
# TODO: -DCMAKE_CXX_STANDARD isn't being honored?
169-
# build-linux-full-or-auto-23:
170-
# runs-on: ubuntu-22.04
171-
# strategy:
172-
# fail-fast: false
173-
# matrix:
174-
# compiler: [g++-12, clang++-14]
175-
# target: [Debug]
176-
# std: [23]
177-
# config: ["-DCPPTRACE_FULL_TRACE_WITH_STACKTRACE=On", ""]
178-
# exclude:
179-
# - config: "-DCPPTRACE_FULL_TRACE_WITH_STACKTRACE=On"
180-
# compiler: clang++-14
181-
# steps:
182-
# - uses: actions/checkout@v2
183-
# - name: dependencies
184-
# run: sudo apt install gcc-12 g++-12 libgcc-12-dev
185-
# - name: build
186-
# run: |
187-
# mkdir -p build
188-
# cd build
189-
# cmake .. \
190-
# -DCMAKE_BUILD_TYPE=${{matrix.target}} \
191-
# -DCMAKE_CXX_COMPILER=${{matrix.compiler}} \
192-
# -DCMAKE_CXX_STANDARD=${{matrix.std}} \
193-
# -DCPPTRACE_BACKTRACE_PATH=/usr/lib/gcc/x86_64-linux-gnu/12/include/backtrace.h \
194-
# ${{matrix.config}}
195-
# make
196-
build-windows-full-or-auto:
32+
python3 ci/build-in-all-configs.py --msvc-only
33+
build-windows-clang:
19734
runs-on: windows-2019
198-
strategy:
199-
fail-fast: false
200-
matrix:
201-
compiler: [cl, clang++]
202-
target: [Debug]
203-
std: [11, 20]
204-
config: [""]
205-
exclude:
206-
- config: -DCPPTRACE_FULL_TRACE_WITH_LIBBACKTRACE=On # TODO
20735
steps:
20836
- uses: actions/checkout@v2
20937
- name: Enable Developer Command Prompt
21038
uses: ilammy/[email protected]
21139
- name: build
21240
run: |
213-
mkdir -p build
214-
cd build
215-
cmake .. `
216-
-DCMAKE_BUILD_TYPE=Debug `
217-
-DCMAKE_CXX_COMPILER=${{matrix.compiler}} `
218-
-DCMAKE_CXX_STANDARD=${{matrix.std}} `
219-
${{matrix.config}}
220-
msbuild .\cpptrace.sln
41+
python3 ci/build-in-all-configs.py --clang-only

0 commit comments

Comments
 (0)