From 255b157b974c05e3d9500f495e7cb1b347f56105 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Tue, 12 Mar 2024 15:46:49 -0400 Subject: [PATCH 1/6] CI,Cygwin: Force NumPy 1.26 to use Netlib interfaces Cygwin has Netlib interfaces, NumPy CI uses them. Let's see if we can force pip/meson to use them. --- .github/workflows/test-cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index 4526b945424..306c7ed196c 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -116,7 +116,7 @@ jobs: - name: Upgrade NumPy shell: dash.exe -l "{0}" run: | - python3 -m pip install -U "numpy<1.26" + python3 -m pip install -U "numpy" --config-settings=setup-args="-Dblas=blas" --config-settings=setup-args="-Dlapack=lapack" - name: Build shell: bash.exe -eo pipefail -o igncr "{0}" From c86fc90452ae39c66776e25ea9d901ffe4f1b54e Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:45:57 -0400 Subject: [PATCH 2/6] CI,Cygwin: Install CMake, ninja, and Meson for NumPy build New NumPy uses CMake through meson, which needs dependencies. --- .github/workflows/test-cygwin.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index 306c7ed196c..34c6a8ea9f9 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -81,6 +81,7 @@ jobs: wget xorg-server-extra zlib-devel + ninja cmake meson - name: Add Lapack to PATH uses: egor-tensin/cleanup-path@v4 From e3fb1f526a19551740fe74b00785e8fb600a1cfc Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 13 Mar 2024 09:09:00 -0400 Subject: [PATCH 3/6] STY: Remove quotes around NumPy. Necessary with version constraint, not without. Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- .github/workflows/test-cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index 34c6a8ea9f9..c530ba4f752 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -117,7 +117,7 @@ jobs: - name: Upgrade NumPy shell: dash.exe -l "{0}" run: | - python3 -m pip install -U "numpy" --config-settings=setup-args="-Dblas=blas" --config-settings=setup-args="-Dlapack=lapack" + python3 -m pip install -U numpy --config-settings=setup-args="-Dblas=blas" --config-settings=setup-args="-Dlapack=lapack" - name: Build shell: bash.exe -eo pipefail -o igncr "{0}" From b3958d173fb861ba7ea042af307910ba15d8a7d2 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Thu, 14 Mar 2024 08:09:12 -0400 Subject: [PATCH 4/6] CI: Check that newly-installed numpy imports The tests can't find it, so check here. --- .github/workflows/test-cygwin.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index c530ba4f752..084231e2832 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -118,6 +118,7 @@ jobs: shell: dash.exe -l "{0}" run: | python3 -m pip install -U numpy --config-settings=setup-args="-Dblas=blas" --config-settings=setup-args="-Dlapack=lapack" + python3 -c "import numpy as np; print(np.__version__)" - name: Build shell: bash.exe -eo pipefail -o igncr "{0}" From 66b92d3562837c89d39ad77d7052acf0477f1465 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Thu, 14 Mar 2024 09:49:14 -0400 Subject: [PATCH 5/6] CI: Specify full paths for all Cygwin shells There's a decent chance the cygwin/cygwin-install-action paths in egor-tensin/cleanup-path broke numpy import, since NumPy needs to find BLAS somewhere. --- .github/workflows/test-cygwin.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index 084231e2832..159fec49230 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -52,6 +52,7 @@ jobs: - name: Install Cygwin uses: egor-tensin/setup-cygwin@v4 with: + install-dir: 'C:/tools/cygwin' packages: > gcc-g++ ghostscript @@ -86,7 +87,7 @@ jobs: - name: Add Lapack to PATH uses: egor-tensin/cleanup-path@v4 with: - dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack' + dirs: 'C:\tools\cygwin\bin;C:\tools\cygwin\lib\lapack' - name: Select Python version run: | @@ -94,45 +95,45 @@ jobs: - name: Get latest NumPy version id: latest-numpy - shell: bash.exe -eo pipefail -o igncr "{0}" + shell: C:/tools/cygwin/bin/bash.exe -eo pipefail -o igncr "{0}" run: | python3 -m pip list --outdated | grep numpy | sed -r 's/ +/ /g' | cut -d ' ' -f 3 | sed 's/^/version=/' >> $GITHUB_OUTPUT - name: pip cache uses: actions/cache@v4 with: - path: 'C:\cygwin\home\runneradmin\.cache\pip' + path: 'C:\tools\cygwin\home\runneradmin\.cache\pip' key: ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-numpy${{ steps.latest-numpy.outputs.version }}-${{ hashFiles('.ci/install.sh') }} restore-keys: | ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-numpy${{ steps.latest-numpy.outputs.version }}- - name: Build system information run: | - dash.exe -c "python3 .github/workflows/system-info.py" + C:/tools/cygwin/bin/dash.exe -c "python3 .github/workflows/system-info.py" - name: Install dependencies run: | - bash.exe .ci/install.sh + C:/tools/cygwin/bin/bash.exe .ci/install.sh - name: Upgrade NumPy - shell: dash.exe -l "{0}" + shell: C:/tools/cygwin/bin/dash.exe -l "{0}" run: | python3 -m pip install -U numpy --config-settings=setup-args="-Dblas=blas" --config-settings=setup-args="-Dlapack=lapack" python3 -c "import numpy as np; print(np.__version__)" - name: Build - shell: bash.exe -eo pipefail -o igncr "{0}" + shell: C:/tools/cygwin/bin/bash.exe -eo pipefail -o igncr "{0}" run: | .ci/build.sh - name: Test run: | - bash.exe xvfb-run -s '-screen 0 1024x768x24' .ci/test.sh + C:/tools/cygwin/bin/bash.exe xvfb-run -s '-screen 0 1024x768x24' .ci/test.sh - name: Prepare to upload errors if: failure() run: | - dash.exe -c "mkdir -p Tests/errors" + C:/tools/cygwin/bin/dash.exe -c "mkdir -p Tests/errors" - name: Upload errors uses: actions/upload-artifact@v4 @@ -143,7 +144,7 @@ jobs: - name: After success run: | - bash.exe .ci/after_success.sh + C:/tools/cygwin/bin/bash.exe .ci/after_success.sh - name: Upload coverage uses: codecov/codecov-action@v3.1.5 From 610de3059a02dd301f0ca1bc5aa582292150791f Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:54:12 -0400 Subject: [PATCH 6/6] CI: Remove debug print from NumPy install It's working again, so this isn't relevant anymore. Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .github/workflows/test-cygwin.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index 159fec49230..9a356c39269 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -119,7 +119,6 @@ jobs: shell: C:/tools/cygwin/bin/dash.exe -l "{0}" run: | python3 -m pip install -U numpy --config-settings=setup-args="-Dblas=blas" --config-settings=setup-args="-Dlapack=lapack" - python3 -c "import numpy as np; print(np.__version__)" - name: Build shell: C:/tools/cygwin/bin/bash.exe -eo pipefail -o igncr "{0}"