9
9
10
10
jobs :
11
11
build :
12
- name : ${{matrix.config.os}} - Xcode ${{matrix.config.xcode}} - ${{matrix.build_type}}
13
- runs-on : ${{matrix.config.os}}
14
12
strategy :
15
13
fail-fast : false
16
14
matrix :
36
34
{os: macos-14, xcode: 15.4},
37
35
]
38
36
build_type : [Debug, Release, Sanitize]
37
+ name : ${{matrix.config.os}} - Xcode ${{matrix.config.xcode}} - ${{matrix.build_type}}
38
+ runs-on : ${{matrix.config.os}}
39
+ env :
40
+ CMAKE_GENERATOR : " Xcode"
41
+ DEVELOPER_DIR : " /Applications/Xcode_${{matrix.config.xcode}}.app/Contents/Developer"
39
42
40
43
steps :
41
44
- name : Checkout dynamic_bitset
@@ -44,64 +47,37 @@ jobs:
44
47
submodules : recursive
45
48
path : dynamic_bitset
46
49
47
- - name : Setup build environment
48
- shell : cmake -P {0}
49
- run : |
50
- file(APPEND "$ENV{GITHUB_ENV}" "CMAKE_GENERATOR=Xcode\n")
51
- file(APPEND "$ENV{GITHUB_ENV}" "DEVELOPER_DIR=/Applications/Xcode_${{matrix.config.xcode}}.app/Contents/Developer\n")
52
-
53
50
- name : Setup CMake
54
51
id : cmake
55
52
uses : ./dynamic_bitset/.github/actions/setup_cmake
56
53
with :
57
54
cmake_version : ${{env.CMAKE_VERSION}}
58
55
used_env : ${{matrix.config.os}}
59
56
57
+ - name : CMake version
58
+ run : ${{steps.cmake.outputs.cmake_binary}} --version
59
+
60
+ - name : CTest version
61
+ run : ${{steps.cmake.outputs.ctest_binary}} --version
62
+
60
63
- name : Configure
61
- shell : cmake -P {0}
62
- run : |
63
- file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace)
64
- execute_process(
65
- COMMAND ${{steps.cmake.outputs.cmake_binary}}
66
- -S "${workspace}/dynamic_bitset"
67
- -B "${workspace}/dynamic_bitset/build"
68
- -D CMAKE_CONFIGURATION_TYPES=${{matrix.build_type}}
69
- -D CMAKE_BUILD_TYPE=${{matrix.build_type}}
70
- RESULT_VARIABLE result
71
- )
72
- if(NOT result EQUAL 0)
73
- message(FATAL_ERROR "Bad exit status")
74
- endif()
64
+ run : >-
65
+ ${{steps.cmake.outputs.cmake_binary}}
66
+ -S "${{github.workspace}}/dynamic_bitset"
67
+ -B "${{github.workspace}}/dynamic_bitset/build"
68
+ -D CMAKE_CONFIGURATION_TYPES=${{matrix.build_type}}
69
+ -D CMAKE_BUILD_TYPE=${{matrix.build_type}}
75
70
76
71
- name : Build
77
- shell : cmake -P {0}
78
- run : |
79
- file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace)
80
- include(ProcessorCount)
81
- ProcessorCount(N)
82
- execute_process(
83
- COMMAND ${{steps.cmake.outputs.cmake_binary}}
84
- --build "${workspace}/dynamic_bitset/build"
85
- --config ${{matrix.build_type}}
86
- --parallel ${N}
87
- RESULT_VARIABLE result
88
- )
89
- if(NOT result EQUAL 0)
90
- message(FATAL_ERROR "Bad exit status")
91
- endif()
72
+ run : >-
73
+ ${{steps.cmake.outputs.cmake_binary}}
74
+ --build "${{github.workspace}}/dynamic_bitset/build"
75
+ --config ${{matrix.build_type}}
76
+ --parallel $(nproc)
92
77
93
78
- name : Run tests
94
- shell : cmake -P {0}
95
- run : |
96
- file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace)
97
- include(ProcessorCount)
98
- ProcessorCount(N)
99
- set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON")
100
- execute_process(
101
- COMMAND ${{steps.cmake.outputs.ctest_binary}} --output-on-failure --parallel ${N}
102
- WORKING_DIRECTORY "${workspace}/dynamic_bitset/build"
103
- RESULT_VARIABLE result
104
- )
105
- if(NOT result EQUAL 0)
106
- message(FATAL_ERROR "Running tests failed!")
107
- endif()
79
+ run : >-
80
+ ${{steps.cmake.outputs.ctest_binary}}
81
+ --test-dir "${{github.workspace}}/dynamic_bitset/build"
82
+ --output-on-failure
83
+ --parallel $(nproc)
0 commit comments