From 63883a8e9ef6afb246a1d4440375dff72e9685de Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Tue, 15 Oct 2024 12:27:47 -0400 Subject: [PATCH 1/3] Update Actions to install 1.x numpy. Updating Actions depending on numpy install to use pre-2.0 numpy version as is currently required for ngen builds. --- .github/actions/ngen-build/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/ngen-build/action.yaml b/.github/actions/ngen-build/action.yaml index cfd01eacaa..3c1fa8ccc3 100644 --- a/.github/actions/ngen-build/action.yaml +++ b/.github/actions/ngen-build/action.yaml @@ -144,7 +144,7 @@ runs: python3 -m venv .venv . .venv/bin/activate pip install pip - pip install numpy + pip install numpy<=2.0.0 deactivate shell: bash From c650f824075c5e3bc959072e9bcbb85bbda63532 Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Tue, 15 Oct 2024 12:36:24 -0400 Subject: [PATCH 2/3] Fix Action to strictly require numpy < 2.0. --- .github/actions/ngen-build/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/ngen-build/action.yaml b/.github/actions/ngen-build/action.yaml index 3c1fa8ccc3..1b0bdc3b97 100644 --- a/.github/actions/ngen-build/action.yaml +++ b/.github/actions/ngen-build/action.yaml @@ -144,7 +144,7 @@ runs: python3 -m venv .venv . .venv/bin/activate pip install pip - pip install numpy<=2.0.0 + pip install numpy<2.0.0 deactivate shell: bash From 15a3cab3546f24ac34df6250315a0ec3c4127d2d Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Tue, 15 Oct 2024 13:32:34 -0400 Subject: [PATCH 3/3] Change Action numpy fix to use constraints. Using pip constraints to ensure any downstream `input.additional_python_requirements` that may be installed also are prevented from installing a problematic version. --- .github/actions/ngen-build/action.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/ngen-build/action.yaml b/.github/actions/ngen-build/action.yaml index 1b0bdc3b97..04a693d7f5 100644 --- a/.github/actions/ngen-build/action.yaml +++ b/.github/actions/ngen-build/action.yaml @@ -120,6 +120,13 @@ runs: tar xjf boost_1_79_0.tar.bz2 shell: bash + - name: Set Pip Constraints + run: | + echo "numpy<2.0" > constraints.txt + sudo mv constraints.txt /constraints.txt + echo "PIP_CONSTRAINT=/constraints.txt" >> $GITHUB_ENV + shell: bash + - name: Cache Python Dependencies id: cache-py3-dependencies uses: actions/cache@v3 @@ -144,7 +151,7 @@ runs: python3 -m venv .venv . .venv/bin/activate pip install pip - pip install numpy<2.0.0 + pip install numpy deactivate shell: bash