Skip to content

Commit 597e46e

Browse files
committed
Ubuntu_arm64 is - I think - running out of memory/CPU during the python SWIG build, so try to work around it
1 parent aa482b9 commit 597e46e

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.github/workflows/python_bindings.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,16 +287,24 @@ jobs:
287287
if [ "${{ matrix.name }}" == "macOS_arm64" ]; then
288288
PYTHON_ARCH=arm64
289289
# Avoid "builtin __has_nothrow_assign is deprecated; use __is_nothrow_assignable instead" in boost/1.79 with recent clang
290-
conan install . --output-folder=./build --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release -o with_testing=False -o with_benchmark=False -c tools.build:cxxflags="['-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION -Wno-enum-constexpr-conversion']"
290+
conan install . --output-folder=./build --build=missing \
291+
-c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release \
292+
-o with_testing=False -o with_benchmark=False -o with_ruby=False \
293+
-c tools.build:cxxflags="['-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION -Wno-enum-constexpr-conversion']"
291294
else
292-
conan install . --output-folder=./build --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release -o with_testing=False -o with_benchmark=False -c tools.build:cxxflags="['-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']"
295+
conan install . --output-folder=./build --build=missing \
296+
-c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release \
297+
-o with_testing=False -o with_benchmark=False -o with_ruby=False \
298+
-c tools.build:cxxflags="['-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']"
293299
fi
294300
else
295301
if [ "${{ matrix.name }}" == "Ubuntu_arm64" ]; then
296302
PYTHON_ARCH=arm64
297303
fi
298304
PYTHON_VERSION=${{ steps.setup-python.outputs.python-version }}
299-
conan install . --output-folder=./build --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release -o with_testing=False -o with_benchmark=False
305+
conan install . --output-folder=./build --build=missing \
306+
-c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release \
307+
-o with_testing=False -o with_benchmark=False -o with_ruby=False
300308
fi
301309
echo -e "::endgroup::"
302310
@@ -309,7 +317,15 @@ jobs:
309317
echo -e "::endgroup::"
310318
311319
begin_group "Build"
312-
cmake --build --preset conan-release
320+
if [ "${{ matrix.name }}" == "Ubuntu_arm64" ]; then
321+
echo "Ubuntu_arm64 is apparently running out of memory/CPU during the build as of 2025-06-18, so work around it"
322+
N=$(nproc)
323+
cmake --build --preset conan-release --target openstudiolib -j $N
324+
cmake --build --preset conan-release --target python_sdk -j $(($N - 2))
325+
cmake --build --preset conan-release -j $(($N - 2))
326+
else
327+
cmake --build --preset conan-release
328+
fi
313329
echo -e "::endgroup::"
314330
315331

0 commit comments

Comments
 (0)