|
| 1 | +name: Test on Cygwin |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - main |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + - main |
| 9 | +jobs: |
| 10 | + cygwin_build_test: |
| 11 | + runs-on: windows-latest |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v2 |
| 14 | + with: |
| 15 | + submodules: recursive |
| 16 | + fetch-depth: 0 |
| 17 | + - name: Install Cygwin |
| 18 | + uses: egor-tensin/setup-cygwin@v3 |
| 19 | + with: |
| 20 | + platform: x64 |
| 21 | + install-dir: 'C:\tools\cygwin' |
| 22 | + packages: > |
| 23 | + python37-devel python37-zipp python37-importlib-metadata |
| 24 | + python37-cython python37-pip python37-wheel python37-cffi |
| 25 | + python37-pytz python37-setuptools python37-pytest |
| 26 | + python37-hypothesis liblapack-devel libopenblas |
| 27 | + gcc-fortran git dash |
| 28 | + - name: Set Windows PATH |
| 29 | + uses: egor-tensin/cleanup-path@v1 |
| 30 | + with: |
| 31 | + dirs: 'C:\tools\cygwin\bin;C:\tools\cygwin\lib\lapack' |
| 32 | + - name: Verify that bash is Cygwin bash |
| 33 | + run: | |
| 34 | + command bash |
| 35 | + bash -c "uname -svrmo" |
| 36 | + - name: Update with Cygwin git |
| 37 | + # fetch-depth=0 above should make this short. |
| 38 | + run: | |
| 39 | + dash -c "which git; /usr/bin/git fetch --all -p" |
| 40 | + - name: Verify python version |
| 41 | + # Make sure it's the Cygwin one, not a Windows one |
| 42 | + run: | |
| 43 | + dash -c "which python3.7; /usr/bin/python3.7 --version -V" |
| 44 | + - name: Build NumPy wheel |
| 45 | + run: | |
| 46 | + dash -c "/usr/bin/python3.7 -m pip install 'setuptools<49.2.0' pytest pytz cffi pickle5 importlib_metadata typing_extensions" |
| 47 | + dash -c "/usr/bin/python3.7 -m pip install -r test_requirements.txt" |
| 48 | + dash -c "/usr/bin/python3.7 setup.py bdist_wheel" |
| 49 | + - name: Install new NumPy |
| 50 | + run: | |
| 51 | + bash -c "/usr/bin/python3.7 -m pip install dist/numpy-*cp37*.whl" |
| 52 | + - name: Run NumPy test suite |
| 53 | + run: >- |
| 54 | + dash -c "/usr/bin/python3.7 runtests.py -n -vv" |
| 55 | + - name: Upload wheel if tests fail |
| 56 | + uses: actions/upload-artifact@v2 |
| 57 | + if: failure() |
| 58 | + with: |
| 59 | + name: numpy-cygwin-wheel |
| 60 | + path: dist/numpy-*cp37*.whl |
| 61 | + - name: On failure check the extension modules |
| 62 | + if: failure() |
| 63 | + run: | |
| 64 | + dash -c "/usr/bin/python3.7 -m pip show numpy" |
| 65 | + dash -c "/usr/bin/python3.7 -m pip show -f numpy | grep .dll" |
| 66 | + dash -c "/bin/tr -d '\r' <tools/list_installed_dll_dependencies_cygwin.sh >list_dlls_unix.sh" |
| 67 | + dash "list_dlls_unix.sh" |
0 commit comments