@@ -61,64 +61,33 @@ jobs:
6161 config :
6262 - {
6363 name : " GCC 13 Debug" ,
64- build_type : " Debug" ,
65- cc : " gcc-13" ,
66- cxx : " g++-13" ,
67- label : " Debug-gcc13" ,
64+ label : " debug_gcc13" ,
6865 run_mtr : true
6966 }
7067 - {
7168 name : " GCC 13 RelWithDebInfo" ,
72- build_type : " RelWithDebInfo" ,
73- cc : " gcc-13" ,
74- cxx : " g++-13" ,
75- label : " RelWithDebInfo-gcc13" ,
69+ label : " release_gcc13" ,
7670 run_mtr : true
7771 }
7872 - {
7973 name : " GCC 13 ASan" ,
80- build_type : " Debug" ,
81- cc : " gcc-13" ,
82- cxx : " g++-13" ,
83- sanitizer_cmake_flags : " -DWITH_ASAN=ON" ,
84- aws_cmake_flags : " -DENABLE_ADDRESS_SANITIZER=ON" ,
85- boost_cmake_flags : " -DCMAKE_CXX_FLAGS_INIT=-fsanitize=address" ,
86- label : " ASan-gcc13" ,
74+ label : " asan_gcc13" ,
8775 run_mtr : true,
8876 mtr_options : " --sanitize"
8977 }
9078 - {
9179 name : " Clang 17 Debug" ,
92- build_type : " Debug" ,
93- cc : " clang-17" ,
94- cxx : " clang++-17" ,
95- libcxx_cmake_flags : " -DWITH_STDLIB_LIBCXX=ON" ,
96- aws_cmake_flags : " -DCMAKE_CXX_FLAGS_INIT=-stdlib=libc++" ,
97- boost_cmake_flags : " -DCMAKE_CXX_FLAGS_INIT=-stdlib=libc++" ,
98- label : " Debug-clang17" ,
80+ label : " debug_clang17" ,
9981 run_clang_tidy : true
10082 }
10183 - {
10284 name : " Clang 17 RelWithDebInfo" ,
103- build_type : " RelWithDebInfo" ,
104- cc : " clang-17" ,
105- cxx : " clang++-17" ,
106- libcxx_cmake_flags : " -DWITH_STDLIB_LIBCXX=ON" ,
107- aws_cmake_flags : " -DCMAKE_CXX_FLAGS_INIT=-stdlib=libc++" ,
108- boost_cmake_flags : " -DCMAKE_CXX_FLAGS_INIT=-stdlib=libc++" ,
109- label : " RelWithDebInfo-clang17" ,
85+ label : " release_clang17" ,
11086 run_clang_tidy : true
11187 }
11288 - {
11389 name : " Clang 17 ASan" ,
114- build_type : " Debug" ,
115- cc : " clang-17" ,
116- cxx : " clang++-17" ,
117- libcxx_cmake_flags : " -DWITH_STDLIB_LIBCXX=ON" ,
118- aws_cmake_flags : " -DCMAKE_CXX_FLAGS_INIT=-stdlib=libc++ -DENABLE_ADDRESS_SANITIZER=ON" ,
119- boost_cmake_flags : " -DCMAKE_CXX_FLAGS_INIT=\" -stdlib=libc++ -fsanitize=address\" " ,
120- sanitizer_cmake_flags : " -DWITH_ASAN=ON" ,
121- label : " ASan-clang17"
90+ label : " asan_clang17"
12291 # TODO: re-enable running MTR under "Clang 17 ASan"
12392 # run_mtr: true,
12493 # mtr_options: "--sanitize"
@@ -171,20 +140,24 @@ jobs:
171140 sudo apt-get update
172141 sudo apt-get install g++-13
173142
174- - name : Info CC compiler
175- run : ${{matrix.config.cc}} --version
143+ - name : Info CMake
144+ run : cmake --version
176145
177- - name : Info CXX compiler
178- run : ${{matrix.config.cxx}} --version
146+ - name : Info Preset
147+ run : echo Current preset ${{matrix.config.label}}
179148
180- - name : Creating deps directory
181- run : mkdir -p ${{runner.temp}}/deps
149+ - name : Checking out source tree
150+ uses : actions/checkout@v4
151+ with :
152+ path : src
153+ fetch-depth : 0
154+ fetch-tags : true
182155
183156 - name : Cache boost libraries
184157 id : cache-boost-static-libraries
185158 uses : actions/cache@v4
186159 with :
187- path : ${{runner.temp}}/deps /boost-install-${{matrix.config.label}}
160+ path : ${{github.workspace}} /boost-install-${{matrix.config.label}}
188161 key : ${{format('boost-static-libraries-{0}-{1}-{2}-{3}', env.BOOST_MAJOR, env.BOOST_MINOR, env.BOOST_PATCH, matrix.config.label)}}
189162
190163 - name : Checking out Boost source tree
@@ -197,37 +170,31 @@ jobs:
197170 submodules : recursive
198171 fetch-tags : true
199172
173+ - name : Copying CMake presets for Boost
174+ if : steps.cache-boost-static-libraries.outputs.cache-hit != 'true'
175+ run : ln -s ${{github.workspace}}/src/extra/cmake_presets/boost/CMakePresets.json ${{github.workspace}}/boost
176+
200177 - name : Configure CMake for Boost
201178 if : steps.cache-boost-static-libraries.outputs.cache-hit != 'true'
202- run : |
203- cmake \
204- -B ${{github.workspace}}/boost-build-${{matrix.config.label}} \
205- -S ${{github.workspace}}/boost \
206- -DCMAKE_INSTALL_PREFIX=${{runner.temp}}/deps/boost-install-${{matrix.config.label}} \
207- -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} \
208- -DCMAKE_C_COMPILER=${{matrix.config.cc}} \
209- -DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} \
210- ${{matrix.config.boost_cmake_flags}} \
211- -DBUILD_SHARED_LIBS=OFF \
212- -DBUILD_TESTING=OFF
179+ run : cmake ${{github.workspace}}/boost --preset ${{matrix.config.label}}
213180
214181 - name : CMake info for Boost
215182 if : steps.cache-boost-static-libraries.outputs.cache-hit != 'true'
216183 run : cmake -L ${{github.workspace}}/boost-build-${{matrix.config.label}}
217184
218185 - name : Build for Boost
219186 if : steps.cache-boost-static-libraries.outputs.cache-hit != 'true'
220- run : cmake --build ${{github.workspace}}/boost-build-${{matrix.config.label}} --config ${{matrix.config.build_type}} -- parallel
187+ run : cmake --build ${{github.workspace}}/boost-build-${{matrix.config.label}} --parallel
221188
222189 - name : Install for Boost
223190 if : steps.cache-boost-static-libraries.outputs.cache-hit != 'true'
224- run : cmake --install ${{github.workspace}}/boost-build-${{matrix.config.label}} --config ${{matrix.config.build_type}}
191+ run : cmake --install ${{github.workspace}}/boost-build-${{matrix.config.label}}
225192
226193 - name : Cache AWS SDK C++ libraries
227194 id : cache-aws-sdk-cpp-libraries
228195 uses : actions/cache@v4
229196 with :
230- path : ${{runner.temp}}/deps /aws-sdk-cpp-install-${{matrix.config.label}}
197+ path : ${{github.workspace}} /aws-sdk-cpp-install-${{matrix.config.label}}
231198 key : ${{format('aws-cpp-sdk-libraries-{0}-{1}-{2}-{3}', env.AWS_SDK_CPP_MAJOR, env.AWS_SDK_CPP_MINOR, env.AWS_SDK_CPP_PATCH, matrix.config.label)}}
232199
233200 - name : Checking out AWS SDK C++ source tree
@@ -240,67 +207,35 @@ jobs:
240207 submodules : recursive
241208 fetch-tags : true
242209
210+ - name : Copying CMake presets for AWS SDK C++
211+ if : steps.cache-aws-sdk-cpp-libraries.outputs.cache-hit != 'true'
212+ run : ln -s ${{github.workspace}}/src/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json ${{github.workspace}}/aws-sdk-cpp
213+
243214 - name : Configure CMake for AWS SDK C++
244215 if : steps.cache-aws-sdk-cpp-libraries.outputs.cache-hit != 'true'
245- run : |
246- cmake \
247- -B ${{github.workspace}}/aws-sdk-cpp-build-${{matrix.config.label}} \
248- -S ${{github.workspace}}/aws-sdk-cpp \
249- -DCMAKE_INSTALL_PREFIX=${{runner.temp}}/deps/aws-sdk-cpp-install-${{matrix.config.label}} \
250- -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} \
251- -DCMAKE_C_COMPILER=${{matrix.config.cc}} \
252- -DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} \
253- ${{matrix.config.aws_cmake_flags}} \
254- -DCPP_STANDARD=20 \
255- -DENABLE_UNITY_BUILD=ON \
256- -DBUILD_SHARED_LIBS=OFF \
257- -DFORCE_SHARED_CRT=OFF \
258- -DENABLE_TESTING=OFF \
259- -DAUTORUN_UNIT_TESTS=OFF \
260- -DBUILD_ONLY=s3-crt
216+ run : cmake ${{github.workspace}}/aws-sdk-cpp --preset ${{matrix.config.label}}
261217
262218 - name : CMake info for AWS SDK C++
263219 if : steps.cache-aws-sdk-cpp-libraries.outputs.cache-hit != 'true'
264220 run : cmake -L ${{github.workspace}}/aws-sdk-cpp-build-${{matrix.config.label}}
265221
266222 - name : Build for AWS SDK C++
267223 if : steps.cache-aws-sdk-cpp-libraries.outputs.cache-hit != 'true'
268- run : cmake --build ${{github.workspace}}/aws-sdk-cpp-build-${{matrix.config.label}} --config ${{matrix.config.build_type}} -- parallel
224+ run : cmake --build ${{github.workspace}}/aws-sdk-cpp-build-${{matrix.config.label}} --parallel
269225
270226 - name : Install for AWS SDK C++
271227 if : steps.cache-aws-sdk-cpp-libraries.outputs.cache-hit != 'true'
272- run : cmake --install ${{github.workspace}}/aws-sdk-cpp-build-${{matrix.config.label}} --config ${{matrix.config.build_type}}
273-
274- - name : Checking out source tree
275- uses : actions/checkout@v4
276- with :
277- path : src
278- fetch-depth : 0
279- fetch-tags : true
228+ run : cmake --install ${{github.workspace}}/aws-sdk-cpp-build-${{matrix.config.label}}
280229
281230 - name : Configure CMake
282- # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
283- # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
284- run : |
285- cmake -Wdev -Werror=dev -Wdeprecated -Werror=deprecated \
286- -B ${{github.workspace}}/build-${{matrix.config.label}} \
287- -S ${{github.workspace}}/src \
288- -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} \
289- -DCMAKE_C_COMPILER=${{matrix.config.cc}} \
290- -DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} \
291- -DCPP_STANDARD=20 \
292- ${{matrix.config.libcxx_cmake_flags}} \
293- ${{matrix.config.sanitizer_cmake_flags}} \
294- -DCMAKE_PREFIX_PATH=${{runner.temp}}/deps/aws-sdk-cpp-install-${{matrix.config.label}} \
295- -DBoost_ROOT=${{runner.temp}}/deps/boost-install-${{matrix.config.label}} \
296- -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
231+ run : cmake ${{github.workspace}}/src --preset ${{matrix.config.label}}
297232
298233 - name : CMake info
299- run : cmake -L ${{github.workspace}}/build-${{matrix.config.label}}
234+ run : cmake -L ${{github.workspace}}/src- build-${{matrix.config.label}}
300235
301236 - name : Build
302237 # Build your program with the given configuration
303- run : cmake --build ${{github.workspace}}/build-${{matrix.config.label}} --config ${{matrix.config.build_type }} --parallel
238+ run : cmake --build ${{github.workspace}}/src- build-${{matrix.config.label}} --parallel
304239
305240 - name : Info Clang Tidy
306241 if : matrix.config.run_clang_tidy
@@ -309,7 +244,7 @@ jobs:
309244 - name : Clang Tidy
310245 if : matrix.config.run_clang_tidy
311246 # Run Clang Tidy
312- run : run-clang-tidy-17 -header-filter=.* -j=${{steps.cpu-cores.outputs.count}} -use-color -p=${{github.workspace}}/build-${{matrix.config.label}}
247+ run : run-clang-tidy-17 -header-filter=.* -j=${{steps.cpu-cores.outputs.count}} -use-color -p=${{github.workspace}}/src- build-${{matrix.config.label}}
313248
314249 - name : MTR tests
315250 if : matrix.config.run_mtr
@@ -320,19 +255,18 @@ jobs:
320255 # Linking the "binlog_streaming" from the source tree into the MTR suits directory on the system
321256 sudo ln -s ${{github.workspace}}/src/mtr/binlog_streaming /usr/lib/mysql-test/suite/binlog_streaming
322257 # Running MTR from the system package
323- BINSRV=${{github.workspace}}/build-${{matrix.config.label}}/binlog_server ./mtr \
258+ BINSRV=${{github.workspace}}/src- build-${{matrix.config.label}}/binlog_server ./mtr \
324259 --client-bindir=/usr/lib/mysql-test/bin --vardir=${{runner.temp}}/mtrvardir \
325260 --force --max-test-fail=0 --retry=0 --nounit-tests --big-test --repeat=2 --parallel=${{steps.cpu-cores.outputs.count}} \
326261 --suite=binlog_streaming ${{matrix.config.mtr_options}}
327262
328263 - name : CTest
329- working-directory : ${{github.workspace}}/build-${{matrix.config.label}}
264+ working-directory : ${{github.workspace}}/src- build-${{matrix.config.label}}
330265 # Execute tests defined by the CMake configuration.
331266 # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
332- run : ctest -C ${{matrix.config.build_type}} - -parallel
267+ run : ctest --parallel
333268
334269 - name : Info Build artefacts
335270 run : |
336271 ls -la ${{github.workspace}}
337272 ls -la ${{runner.temp}}
338- ls -la ${{runner.temp}}/deps
0 commit comments