Skip to content

Commit 7f28a34

Browse files
committed
ci: start experimenting
1 parent 65e56ab commit 7f28a34

File tree

2 files changed

+63
-160
lines changed

2 files changed

+63
-160
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
name: build & test
22
on:
3-
push:
4-
branches: [main, development]
5-
pull_request:
6-
branches: [main, development]
3+
workflow_run:
4+
workflows: ["Generate Build-Matrix"]
5+
types:
6+
- completed
77

88
jobs:
9+
download-build-matrix:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Download env.config artifact
13+
uses: actions/download-artifact@v4
14+
with:
15+
name: env-config
16+
17+
- name: Load env.config
18+
id: load-config
19+
run: |
20+
echo "CONFIG_CONTENT=$(cat env.config)" >> $GITHUB_ENV
21+
922
build:
23+
needs: download-build-matrix
1024
name: |
1125
${{ matrix.config.prefix }}
1226
${{ matrix.config.compiler_name }}-${{ matrix.config.compiler_version }}
@@ -21,162 +35,7 @@ jobs:
2135
build_mode: [Debug, Release]
2236
cxx_standard: [20, 23]
2337
format_backend: [std, fmt]
24-
config:
25-
#clang-18
26-
- {
27-
prefix: "Linux",
28-
suffix: "/libc++",
29-
os: ubuntu-latest,
30-
container: { image: "ghcr.io/dnkpp/clang:18" },
31-
compiler_name: "clang",
32-
compiler_version: 18,
33-
libcxx: true,
34-
asan: true
35-
}
36-
- {
37-
prefix: "Linux",
38-
os: ubuntu-latest,
39-
container: { image: "ghcr.io/dnkpp/clang:18" },
40-
compiler_name: "clang",
41-
compiler_version: 18,
42-
libcxx: false,
43-
asan: true
44-
}
45-
#clang-17
46-
- {
47-
prefix: "Linux",
48-
suffix: "/libc++",
49-
os: ubuntu-latest,
50-
container: { image: "ghcr.io/dnkpp/clang:17" },
51-
compiler_name: "clang",
52-
compiler_version: 17,
53-
libcxx: true,
54-
asan: true
55-
}
56-
- {
57-
prefix: "Linux",
58-
os: ubuntu-latest,
59-
container: { image: "ghcr.io/dnkpp/clang:17" },
60-
compiler_name: "clang",
61-
compiler_version: 17,
62-
libcxx: false,
63-
asan: true
64-
}
65-
#clang-16
66-
- {
67-
prefix: "Linux",
68-
suffix: "/libc++",
69-
os: ubuntu-latest,
70-
container: { image: "ghcr.io/dnkpp/clang:16" },
71-
compiler_name: "clang",
72-
compiler_version: 16,
73-
libcxx: true,
74-
asan: true
75-
}
76-
- {
77-
prefix: "Linux",
78-
os: ubuntu-latest,
79-
container: { image: "ghcr.io/dnkpp/clang:16" },
80-
compiler_name: "clang",
81-
compiler_version: 16,
82-
libcxx: false,
83-
asan: true
84-
}
85-
#gcc-14
86-
- {
87-
prefix: "Linux",
88-
os: ubuntu-latest,
89-
container: { image: "ghcr.io/dnkpp/gcc:14" },
90-
compiler_name: "gcc",
91-
compiler_version: 14,
92-
libcxx: false,
93-
asan: true
94-
}
95-
#gcc-13
96-
- {
97-
prefix: "Linux",
98-
os: ubuntu-latest,
99-
container: { image: "ghcr.io/dnkpp/gcc:13" },
100-
compiler_name: "gcc",
101-
compiler_version: 13,
102-
libcxx: false,
103-
asan: true
104-
}
105-
#gcc-12
106-
- {
107-
prefix: "Linux",
108-
os: ubuntu-latest,
109-
container: { image: "ghcr.io/dnkpp/gcc:12" },
110-
compiler_name: "gcc",
111-
compiler_version: 12,
112-
libcxx: false,
113-
asan: true
114-
}
115-
# msvc v143
116-
- {
117-
prefix: "Windows 2022",
118-
os: windows-2022,
119-
compiler_name: "msvc",
120-
compiler_version: v143,
121-
cmake_generator: Visual Studio 17 2022,
122-
libcxx: false,
123-
asan: false
124-
}
125-
# msvc ClangCl
126-
- {
127-
prefix: "Windows 2022",
128-
os: windows-2022,
129-
compiler_name: "msvc",
130-
compiler_version: ClangCl,
131-
cmake_generator: Visual Studio 17 2022,
132-
libcxx: false,
133-
asan: false
134-
}
135-
136-
# AppleClang
137-
# The ldflags_workaround are taken from the suggestions, when installing via brew
138-
- {
139-
prefix: "macOS",
140-
os: macos-latest,
141-
compiler_name: "AppleClang",
142-
compiler_version: 18,
143-
ldflags_workaround: -L/opt/homebrew/opt/llvm/lib/c++ -L/opt/homebrew/opt/llvm/lib -lunwind,
144-
asan: true
145-
}
146-
- {
147-
prefix: "macOS",
148-
os: macos-latest,
149-
compiler_name: "AppleClang",
150-
compiler_version: 17,
151-
ldflags_workaround: -L/opt/homebrew/opt/llvm@17/lib/c++ -Wl,-rpath,/opt/homebrew/opt/llvm@17/lib/c++,
152-
asan: true
153-
}
154-
- {
155-
prefix: "macOS",
156-
os: macos-latest,
157-
compiler_name: "AppleClang",
158-
compiler_version: 16,
159-
ldflags_workaround: -L/opt/homebrew/opt/llvm@16/lib/c++ -Wl,-rpath,/opt/homebrew/opt/llvm@16/lib/c++,
160-
asan: true
161-
}
162-
163-
exclude:
164-
# both compilers do not support std's format header
165-
- format_backend: std
166-
config:
167-
compiler_name: "clang"
168-
compiler_version: 16
169-
- format_backend: std
170-
config:
171-
compiler_name: "gcc"
172-
compiler_version: 12
173-
174-
# This compiler does work, but fails compiling something from boost::filesystem, which is indirectly required
175-
# by the BoostAdapter-Test.
176-
# Maybe, we can find a workaround for this in the future.
177-
- config:
178-
compiler_name: "AppleClang"
179-
compiler_version: 16
38+
config: ${{ fromYaml(env.CONFIG_CONTENT) }}
18039

18140
steps:
18241
- uses: actions/checkout@v4
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Generate Build-Matrix
2+
on:
3+
push:
4+
branches: [main, development]
5+
pull_request:
6+
branches: [main, development]
7+
8+
env:
9+
config: |
10+
#clang-18
11+
- {
12+
prefix: "Linux",
13+
suffix: "/libc++",
14+
os: ubuntu-latest,
15+
container: { image: "ghcr.io/dnkpp/clang:18" },
16+
compiler_name: "clang",
17+
compiler_version: 18,
18+
libcxx: true,
19+
asan: true
20+
}
21+
- {
22+
prefix: "Linux",
23+
os: ubuntu-latest,
24+
container: { image: "ghcr.io/dnkpp/clang:18" },
25+
compiler_name: "clang",
26+
compiler_version: 18,
27+
libcxx: false,
28+
asan: true
29+
}
30+
31+
jobs:
32+
generate-matrix-artifact:
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- name: Write env.config to file
37+
run: |
38+
echo "${{ env.config }}" > env.config
39+
40+
- name: Upload env.config as artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: env-config
44+
path: env.config

0 commit comments

Comments
 (0)