Skip to content

Commit ddc4c2b

Browse files
committed
ci: for runners with cmake version 4, need to enforce a mininmum cmake version 3.5 until pybind11 is updated
1 parent 08d8379 commit ddc4c2b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/actions/ngen-build/action.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,18 @@ runs:
185185

186186
- name: Cmake Initialization
187187
id: cmake_init
188+
# NOTE: -DCMAKE_POLICY_VERSION_MINIMUM=3.5 is required to use cmake version 4
189+
# and with older pybind11 versions, the minimum cmake version is set to 3.4
190+
# which causes cmake configuration to fail.
188191
run: |
189192
export BOOST_ROOT="$(pwd)/boost_1_86_0"
190193
export CFLAGS="-fsanitize=address -O1 -g -fno-omit-frame-pointer -Werror"
191194
export CXXFLAGS="-fsanitize=address -O1 -g -fno-omit-frame-pointer -pedantic-errors -Werror -Wpessimizing-move -Wparentheses -Wrange-loop-construct -Wsuggest-override"
192195
. .venv/bin/activate
193196
[ ! -d "$BOOST_ROOT" ] && echo "Error: no Boost root found at $BOOST_ROOT" && exit 1
197+
echo "Cmake Version:"
198+
which cmake
199+
cmake --version
194200
cmake -B ${{ inputs.build-dir }} \
195201
-DNGEN_WITH_BMI_C:BOOL=${{ inputs.bmi_c }} \
196202
-DNGEN_WITH_PYTHON:BOOL=${{ inputs.use_python }} \
@@ -199,7 +205,9 @@ runs:
199205
-DNGEN_WITH_ROUTING:BOOL=${{ inputs.use_troute }} \
200206
-DNGEN_WITH_NETCDF:BOOL=${{ inputs.use_netcdf }} \
201207
-DNGEN_WITH_SQLITE:BOOL=${{ inputs.use_sqlite }} \
202-
-DNGEN_WITH_MPI:BOOL=${{ inputs.use_mpi }} -S .
208+
-DNGEN_WITH_MPI:BOOL=${{ inputs.use_mpi }} \
209+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -S .
210+
203211
echo "build-dir=$(echo ${{ inputs.build-dir }})" >> $GITHUB_OUTPUT
204212
shell: bash
205213

0 commit comments

Comments
 (0)