Skip to content

Commit 7328e61

Browse files
committed
✨👷‍♀️ Preset-based CI workflow, attempt #2
1 parent 1ef1415 commit 7328e61

File tree

5 files changed

+221
-196
lines changed

5 files changed

+221
-196
lines changed

.github/workflows/push-pull_request.yml

+8-15
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,16 @@ jobs:
1212
strategy:
1313
matrix:
1414
os:
15-
- ubuntu:
16-
name: ubuntu
17-
platform: linux
18-
- windows:
19-
name: windows
20-
platform: windows
21-
- macos:
22-
name: macos
23-
platform: macos
15+
- ubuntu
16+
- windows
17+
- macos
2418
compiler:
2519
- msvc
2620
- gcc
2721
- clang
2822
exclude:
2923
- compiler: msvc
30-
os:
31-
name: [linux, macos]
24+
os: [ubuntu, macos]
3225
runs-on: ${{matrix.os.name}}-latest
3326
steps:
3427
# important setup
@@ -41,9 +34,9 @@ jobs:
4134
if: ${{matrix.os.name == 'windows'}}
4235
# actual runs
4336
- name: Execute CMake Workflow (Windows)
44-
if: ${{matrix.os.name == 'windows' && matrix.compiler == 'msvc'}}
37+
if: ${{(matrix.os.name == 'windows' && matrix.compiler == 'msvc')}}
4538
shell: vsdevenv x64 powershell {0}
46-
run: cmake --workflow=${{matrix.os.platform}}-${{matrix.compiler}}
39+
run: cmake --workflow ${{matrix.compiler}}
4740
- name: Execute CMake Workflow (Non-Windows)
48-
if: ${{matrix.os.name != 'windows' || matrix.compiler != 'msvc'}}
49-
run: cmake --workflow=${{matrix.os.platform}}-${{matrix.compiler}}
41+
if: ${{(matrix.os.name != 'windows' || matrix.compiler != 'msvc')}}
42+
run: cmake --workflow ${{matrix.compiler}}

CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ else()
7272
endif()
7373

7474
# # Options
75+
option(ZTD_IDK_EXCLUDE_FROM_ALL "Exclude from default builts" OFF)
7576
option(ZTD_IDK_CI "Whether or not we are in continuous integration mode" OFF)
7677
option(ZTD_IDK_READTHEDOCS "Whether or not we are building inside of ReadTheDocs" OFF)
7778
option(ZTD_IDK_TESTS "Enable build of tests" OFF)
@@ -82,6 +83,10 @@ option(ZTD_IDK_BENCHMARKS "Enable build of benchmarks" OFF)
8283
option(ZTD_IDK_GENERATE_SINGLE "Enable generation of a single header and its target" OFF)
8384
set(ZTD_IDK_BENCHMARKS_REPETITIONS 50 CACHE STRING "Number of repetitions to perform. Each repetition has a number of iterations: higher means a lot more time is spent benchmarking.")
8485

86+
if (ZTD_IDK_EXCLUDE_FROM_ALL)
87+
set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL ON EXCLUDE_FROM_DEFAULT_BUILD ON)
88+
endif()
89+
8590
# Modify bad flags / change defaults if we are the top level
8691
if(ZTD_IDK_IS_TOP_LEVEL_PROJECT)
8792
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")

0 commit comments

Comments
 (0)