Skip to content

Commit 3526a0b

Browse files
build: Refactor macos-* CMake presets (#2765)
Signed-off-by: Julien Jerphanion <[email protected]> Co-authored-by: Max Morozov <[email protected]>
1 parent 9a10775 commit 3526a0b

File tree

4 files changed

+15
-26
lines changed

4 files changed

+15
-26
lines changed

.github/workflows/build_with_conda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,15 +216,15 @@ jobs:
216216
if: ${{ inputs.run_cpp_tests == true || github.event_name != 'workflow_dispatch' }}
217217
shell: bash -l {0}
218218
run: |
219-
cd cpp/out/darwin-conda-release-build/
219+
cd cpp/out/macos-conda-release-build/
220220
make -j ${{ steps.cpu-cores.outputs.count }} arcticdb_rapidcheck_tests
221221
make -j ${{ steps.cpu-cores.outputs.count }} test_unit_arcticdb
222222
223223
- name: Run C++ Tests
224224
if: ${{ inputs.run_cpp_tests == true|| github.event_name != 'workflow_dispatch' }}
225225
shell: bash -l {0}
226226
run: |
227-
cd cpp/out/darwin-conda-release-build/
227+
cd cpp/out/macos-conda-release-build/
228228
CTEST_OUTPUT_ON_FAILURE=1 make test
229229
230230
- name: Install npm

cpp/CMakePresets.json

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,8 @@
120120
"name": "linux-conda-debug",
121121
"inherits": ["common_conda", "linux"]
122122
},
123-
124-
125123
{
126-
"name": "darwin",
124+
"name": "macos",
127125
"hidden": true,
128126
"generator": "Unix Makefiles",
129127
"cacheVariables": {
@@ -132,35 +130,22 @@
132130
"environment": {"cmakepreset_expected_host_system": "Darwin"}
133131
},
134132
{
135-
"name": "darwin-conda-debug",
136-
"inherits": ["common_conda", "darwin"]
133+
"name": "macos-conda-debug",
134+
"inherits": ["common_conda", "macos"]
137135
},
138136
{
139-
"name": "macos",
140-
"hidden": true,
141-
"inherits": "darwin",
137+
"name": "macos-debug",
138+
"inherits": ["common_vcpkg", "macos"],
142139
"cacheVariables": {
143-
"CMAKE_OSX_ARCHITECTURES": "arm64",
144140
"CMAKE_OSX_DEPLOYMENT_TARGET": "15.0",
145141
"CMAKE_C_COMPILER_LAUNCHER": "sccache",
146142
"CMAKE_CXX_COMPILER_LAUNCHER": "sccache"
147143
}
148144
},
149-
{
150-
"name": "macos-debug",
151-
"inherits": ["common_vcpkg", "macos"]
152-
},
153-
{
154-
"name": "macos-conda-debug",
155-
"inherits": ["common_conda", "macos"]
156-
},
157-
158-
159145
{ "name": "windows-cl-release", "inherits": "windows-cl-debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }},
160146
{ "name": "windows-cl-conda-release", "inherits": "windows-cl-conda-debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" } },
161147
{ "name": "linux-release", "inherits": "linux-debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } },
162148
{ "name": "linux-conda-release", "inherits": "linux-conda-debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } },
163-
{ "name": "darwin-conda-release", "inherits": "darwin-conda-debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } },
164149
{ "name": "macos-release", "inherits": "macos-debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } },
165150
{ "name": "macos-conda-release", "inherits": "macos-conda-debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } }
166151
],
@@ -173,8 +158,6 @@
173158
{"name": "linux-release", "configurePreset": "linux-release", "targets": "arcticdb_ext" },
174159
{"name": "linux-conda-debug", "configurePreset": "linux-conda-debug", "targets": "arcticdb_ext" },
175160
{"name": "linux-conda-release", "configurePreset": "linux-conda-release", "targets": "arcticdb_ext" },
176-
{"name": "darwin-conda-debug", "configurePreset": "darwin-conda-debug", "targets": "arcticdb_ext" },
177-
{"name": "darwin-conda-release", "configurePreset": "darwin-conda-release", "targets": "arcticdb_ext" },
178161
{"name": "macos-debug", "configurePreset": "macos-debug", "targets": "arcticdb_ext" },
179162
{"name": "macos-release", "configurePreset": "macos-release", "targets": "arcticdb_ext" },
180163
{"name": "macos-conda-debug", "configurePreset": "macos-conda-debug", "targets": "arcticdb_ext" },

docs/mkdocs/docs/technical/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ For instance:
128128

129129
```bash
130130
export ARCTICDB_USING_CONDA=1
131-
cmake -DTEST=off --preset darwin-conda-release cpp
131+
cmake -DTEST=off --preset macos-conda-release cpp
132132
cd cpp
133133

134134
# You might need to use fewer threads than what's possible your machine

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,13 @@ def build_extension(self, ext):
188188
conda_suffix = "-conda" if ARCTICDB_USING_CONDA else ""
189189
suffix = "-debug" if self.debug else "-release"
190190
suffix = conda_suffix + suffix
191-
preset = ("windows-cl" if platform.system() == "Windows" else platform.system().lower()) + suffix
191+
system_name = platform.system()
192+
if system_name == "Windows":
193+
preset = "windows-cl" + suffix
194+
elif system_name == "Darwin":
195+
preset = "macos" + suffix
196+
else:
197+
preset = system_name.lower() + suffix
192198

193199
cmd = [
194200
cmake,

0 commit comments

Comments
 (0)