Skip to content

Commit

Permalink
Use a different step id
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Nov 6, 2024
1 parent 0d860dd commit 180f9ac
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/python_bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,16 @@ jobs:

- name: Set up Python ${{ matrix.python-version }}
if: runner.os == 'macOS'
id: setup-python
id: setup-python-macos
# 3.10 is the first one to have a prebuilt binary for macos-14 (arm64) on the actions/setup-python, so I forked it and actions/python-versions to add 3.8
uses: ${{ runner.os == 'macOS' && 'jmarrec/setup-python@v5' || 'actions/setup-python@v5' }}
uses: jmarrec/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set up Python ${{ matrix.python-version }}
if: runner.os != 'macOS'
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -270,22 +277,24 @@ jobs:
begin_group "Conan install"
if [ "$RUNNER_OS" == "macOS" ]; then
PYTHON_VERSION=${{ steps.setup-python-macos.outputs.python-version }}
if [ "${{ matrix.name }}" == "macOS_arm64" ]; then
# Avoid "builtin __has_nothrow_assign is deprecated; use __is_nothrow_assignable instead" in boost/1.79 with recent clang
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']"
else
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']"
fi
else
PYTHON_VERSION=${{ steps.setup-python.outputs.python-version }}
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
fi
echo -e "::endgroup::"
begin_group "CMake Configure"
cmake --preset conan-release \
-DBUILD_PYTHON_BINDINGS:BOOL=ON -DBUILD_PYTHON_PIP_PACKAGE:BOOL=ON -DPYTHON_PIP_REPOSITORY:STRING=${{ env.PYTHON_PIP_REPOSITORY }} \
-DPYTHON_VERSION:STRING=${{ steps.setup-python.outputs.python-version }} \
-DPython_ROOT_DIR:PATH=$RUNNER_TOOL_CACHE/Python/${{ steps.setup-python.outputs.python-version }}/x64/ \
-DPYTHON_VERSION:STRING=$RUNNER_OS \
-DPython_ROOT_DIR:PATH=$RUNNER_TOOL_CACHE/Python/$RUNNER_OS/x64/ \
-DBUILD_TESTING:BOOL=OFF -DBUILD_RUBY_BINDINGS:BOOL=${{ env.BUILD_RUBY_BINDINGS }} -DBUILD_CLI:BOOL=${{ env.BUILD_CLI }}
echo -e "::endgroup::"
Expand Down

0 comments on commit 180f9ac

Please sign in to comment.