Skip to content

Commit f012f74

Browse files
authored
Merge branch 'main' into PyImath-include-fix
2 parents 79118c4 + 8a14cf7 commit f012f74

11 files changed

Lines changed: 42 additions & 23 deletions

File tree

.github/workflows/analysis_workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Setup container
3939
run: sudo rm -rf /usr/local/lib64/cmake/glew
4040
- name: Checkout
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4242
with:
4343
fetch-depth: 50
4444
- name: Create build directories
@@ -102,7 +102,7 @@ jobs:
102102
- name: Setup container
103103
run: sudo rm -rf /usr/local/lib64/cmake/glew
104104
- name: Checkout
105-
uses: actions/checkout@v3
105+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
106106
with:
107107
fetch-depth: 50
108108
- name: Create build directories

.github/workflows/ci_steps.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767

6868
steps:
6969
- name: Checkout Repository
70-
uses: actions/checkout@v3
70+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
7171

7272
- name: Set Up Directories & Environment
7373
run: |
@@ -227,16 +227,31 @@ jobs:
227227
shell: bash
228228

229229
- name: Install CMake
230-
if: runner.os == 'Linux' && inputs.cmake != ''
231230
# CMakeLists.txt specifies a minimum CMake version of 3.14 for
232-
# the Imath project, so use that for the CI. Except that the
233-
# conan toolchain requires a minimum of 3.15, so use that for
234-
# the runs that require conan.
231+
# the Imath project, so use that for the CI, unless a specific
232+
# version is specified. The conan toolchain requires a minimum
233+
# of 3.15, so use that for the runs that require conan.
235234
run: |
236-
CMAKE_VERSION=${{ inputs.cmake }}
237-
wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
238-
tar -xzf cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
239-
echo "CMAKE=$PWD/cmake-$CMAKE_VERSION-Linux-x86_64/bin/cmake" >> $GITHUB_ENV
235+
set -ex
236+
CMAKE=cmake
237+
CTEST=ctest
238+
if [ "${{ inputs.cmake }}" != "" ]; then
239+
if [ "$RUNNER_OS" == "Linux" ]; then
240+
CMAKE_VERSION=${{ inputs.cmake }}
241+
CURRENT_CMAKE_VERSION=$(cmake --version | head -n 1 | cut -f3 -d' ')
242+
if [ "$CMAKE_VERSION" != "$CURRENT_CMAKE_VERSION" ]; then
243+
wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
244+
tar -xzf cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
245+
CMAKE=$(find "$PWD" -type f -path "*/bin/cmake" | head -n 1)
246+
CTEST=$(find "$PWD" -type f -path "*/bin/ctest" | head -n 1)
247+
fi
248+
else
249+
echo "Explicit cmake version only supported on Linux."
250+
exit 1
251+
fi
252+
fi
253+
echo CMAKE="$CMAKE" >> $GITHUB_ENV
254+
echo CTEST="$CTEST" >> $GITHUB_ENV
240255
shell: bash
241256

242257
- name: Construct CMake command
@@ -426,7 +441,7 @@ jobs:
426441
set -x
427442
export PATH="$IMATH_PATH:$PATH"
428443
export PYTHONPATH=$PYTHON_INSTALL_DIR
429-
ctest -T Test -C ${{ inputs.build-type }} --test-dir $BUILD_DIR --timeout 7200 --output-on-failure -VV
444+
$CTEST -T Test -C ${{ inputs.build-type }} --test-dir $BUILD_DIR --timeout 7200 --output-on-failure -VV
430445
shell: bash
431446

432447
- name: Test (msys2)
@@ -436,7 +451,7 @@ jobs:
436451
set -x
437452
export PATH="$IMATH_PATH:$PATH"
438453
export PYTHONPATH=$PYTHON_INSTALL_DIR
439-
ctest -T Test -C ${{ inputs.build-type }} --test-dir $BUILD_DIR --timeout 7200 --output-on-failure -VV
454+
$CTEST -T Test -C ${{ inputs.build-type }} --test-dir $BUILD_DIR --timeout 7200 --output-on-failure -VV
440455
shell: msys2 {0}
441456

442457
- name: Prepare install_manifest

.github/workflows/ci_workflow.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ jobs:
9595
cxx-compiler: clang++
9696
cc-compiler: clang
9797

98+
- build: 7
99+
label: cmake 4
100+
cmake: 4.0.3
101+
98102
macOS:
99103
name: 'macOS.${{ matrix.build}}: ${{ matrix.label }}'
100104
uses: ./.github/workflows/ci_steps.yml

.github/workflows/ci_workflow_vfx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
steps:
5959

6060
- name: Checkout
61-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
61+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6262

6363
- name: Configure
6464
run: |

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
6666
steps:
6767
- name: Checkout repository
68-
uses: actions/checkout@v4
68+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6969

7070
# Initializes the CodeQL tools for scanning.
7171
- name: Initialize CodeQL

.github/workflows/release-sign.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
shell: bash
4949

5050
- name: Checkout
51-
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
51+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5252

5353
- name: Create archive
5454
run: git archive --format=tar.gz -o ${IMATH_TARBALL} --prefix ${IMATH_PREFIX} ${TAG}

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: "Checkout code"
28-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
28+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2929
with:
3030
persist-credentials: false
3131

.github/workflows/website_workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
steps:
4141
- name: Checkout
42-
uses: actions/checkout@v3
42+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4343
- name: Create build directory
4444
run: mkdir _build
4545
- name: Install doxygen

src/pybind11/PyBindImath/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ if (IMATH_INSTALL)
129129
#
130130

131131
set(PYTHON_INSTALL_DIR "lib/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages")
132-
message(STATUS "installing ${PYBINDIMATH_MODULE} to ${PYTHON_INSTALL_DIR}")
132+
message(STATUS "installing ${PYBINDIMATH_MODULE_NAME} to ${PYTHON_INSTALL_DIR}")
133133

134134
else()
135135

136-
message(STATUS "installing ${PYBINDIMATH_MODULE} to ${PYTHON_INSTALL_DIR} (set externally)")
136+
message(STATUS "installing ${PYBINDIMATH_MODULE_NAME} to ${PYTHON_INSTALL_DIR} (set externally)")
137137

138138
endif()
139139

src/python/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if(NOT Python3_FOUND)
1313
message(FATAL_ERROR "Could not find Python")
1414
endif()
1515

16-
find_package(Boost REQUIRED COMPONENTS python)
16+
find_package(Boost CONFIG REQUIRED COMPONENTS python)
1717

1818
if(NOT Boost_FOUND)
1919
message(FATAL_ERROR "Could not find Boost")

0 commit comments

Comments
 (0)