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.
This commit is contained in:
DWesl 2024-03-14 09:49:14 -04:00 committed by GitHub
parent b3958d173f
commit 66b92d3562
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,6 +52,7 @@ jobs:
- name: Install Cygwin - name: Install Cygwin
uses: egor-tensin/setup-cygwin@v4 uses: egor-tensin/setup-cygwin@v4
with: with:
install-dir: 'C:/tools/cygwin'
packages: > packages: >
gcc-g++ gcc-g++
ghostscript ghostscript
@ -86,7 +87,7 @@ jobs:
- name: Add Lapack to PATH - name: Add Lapack to PATH
uses: egor-tensin/cleanup-path@v4 uses: egor-tensin/cleanup-path@v4
with: with:
dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack' dirs: 'C:\tools\cygwin\bin;C:\tools\cygwin\lib\lapack'
- name: Select Python version - name: Select Python version
run: | run: |
@ -94,45 +95,45 @@ jobs:
- name: Get latest NumPy version - name: Get latest NumPy version
id: latest-numpy id: latest-numpy
shell: bash.exe -eo pipefail -o igncr "{0}" shell: C:/tools/cygwin/bin/bash.exe -eo pipefail -o igncr "{0}"
run: | run: |
python3 -m pip list --outdated | grep numpy | sed -r 's/ +/ /g' | cut -d ' ' -f 3 | sed 's/^/version=/' >> $GITHUB_OUTPUT python3 -m pip list --outdated | grep numpy | sed -r 's/ +/ /g' | cut -d ' ' -f 3 | sed 's/^/version=/' >> $GITHUB_OUTPUT
- name: pip cache - name: pip cache
uses: actions/cache@v4 uses: actions/cache@v4
with: 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') }} key: ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-numpy${{ steps.latest-numpy.outputs.version }}-${{ hashFiles('.ci/install.sh') }}
restore-keys: | restore-keys: |
${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-numpy${{ steps.latest-numpy.outputs.version }}- ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-numpy${{ steps.latest-numpy.outputs.version }}-
- name: Build system information - name: Build system information
run: | 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 - name: Install dependencies
run: | run: |
bash.exe .ci/install.sh C:/tools/cygwin/bin/bash.exe .ci/install.sh
- name: Upgrade NumPy - name: Upgrade NumPy
shell: dash.exe -l "{0}" shell: C:/tools/cygwin/bin/dash.exe -l "{0}"
run: | 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"
python3 -c "import numpy as np; print(np.__version__)" python3 -c "import numpy as np; print(np.__version__)"
- name: Build - name: Build
shell: bash.exe -eo pipefail -o igncr "{0}" shell: C:/tools/cygwin/bin/bash.exe -eo pipefail -o igncr "{0}"
run: | run: |
.ci/build.sh .ci/build.sh
- name: Test - name: Test
run: | 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 - name: Prepare to upload errors
if: failure() if: failure()
run: | run: |
dash.exe -c "mkdir -p Tests/errors" C:/tools/cygwin/bin/dash.exe -c "mkdir -p Tests/errors"
- name: Upload errors - name: Upload errors
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@ -143,7 +144,7 @@ jobs:
- name: After success - name: After success
run: | run: |
bash.exe .ci/after_success.sh C:/tools/cygwin/bin/bash.exe .ci/after_success.sh
- name: Upload coverage - name: Upload coverage
uses: codecov/codecov-action@v3.1.5 uses: codecov/codecov-action@v3.1.5