-
-
Notifications
You must be signed in to change notification settings - Fork 11k
TST: Add cygwin build to CI #18330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
TST: Add cygwin build to CI #18330
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e40ef29
TST: Try to set up a test environment on Cygwin.
DWesl 9ad49e4
TST: Clean up the output from the extension module check.
DWesl 952b89f
BLD: Tell NumPy about functions that cause test failures.
DWesl 66c15c0
TST: Return to requirements in test_requirements.txt
DWesl 8f473b1
BLD: Export random distribution functions on Cygwin.
DWesl aa9fd3c
BUG: Set default hypotl to use npy_longdouble arithmetic.
DWesl 5b8cb3a
Go back to old npy_hypotl and mark the failing test case.
DWesl bbd571a
Undo the remaining changes from "SIMD: Force inlining all functions t…
DWesl f5a2c39
Revert "Undo the remaining changes from "SIMD: Force inlining all fun…
DWesl 2d905c3
TST: Move the DLL checker to a separate script
DWesl 0654341
TST: Prettify the cabsl test xfail declaration.
DWesl 52fa14e
Wrap long line and change condition order.
DWesl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidd
8000
en or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Test on Cygwin | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
cygwin_build_test: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: Install Cygwin | ||
uses: egor-tensin/setup-cygwin@v3 | ||
with: | ||
platform: x64 | ||
install-dir: 'C:\tools\cygwin' | ||
packages: > | ||
python37-devel python37-zipp python37-importlib-metadata | ||
python37-cython python37-pip python37-wheel python37-cffi | ||
python37-pytz python37-setuptools python37-pytest | ||
python37-hypothesis liblapack-devel libopenblas | ||
gcc-fortran git dash | ||
- name: Set Windows PATH | ||
uses: egor-tensin/cleanup-path@v1 | ||
with: | ||
dirs: 'C:\tools\cygwin\bin;C:\tools\cygwin\lib\lapack' | ||
- name: Verify that bash is Cygwin bash | ||
run: | | ||
command bash | ||
bash -c "uname -svrmo" | ||
- name: Update with Cygwin git | ||
# fetch-depth=0 above should make this short. | ||
run: | | ||
dash -c "which git; /usr/bin/git fetch --all -p" | ||
- name: Verify python version | ||
# Make sure it's the Cygwin one, not a Windows one | ||
run: | | ||
dash -c "which python3.7; /usr/bin/python3.7 --version -V" | ||
- name: Build NumPy wheel | ||
run: | | ||
dash -c "/usr/bin/python3.7 -m pip install 'setuptools<49.2.0' pytest pytz cffi pickle5 importlib_metadata typing_extensions" | ||
dash -c "/usr/bin/python3.7 -m pip install -r test_requirements.txt" | ||
dash -c "/usr/bin/python3.7 setup.py bdist_wheel" | ||
- name: Install new NumPy | ||
run: | | ||
bash -c "/usr/bin/python3.7 -m pip install dist/numpy-*cp37*.whl" | ||
- name: Run NumPy test suite | ||
run: >- | ||
dash -c "/usr/bin/python3.7 runtests.py -n -vv" | ||
- name: Upload wheel if tests fail | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: numpy-cygwin-wheel | ||
path: dist/numpy-*cp37*.whl | ||
- name: On failure check the extension modules | ||
if: failure() | ||
run: | | ||
dash -c "/usr/bin/python3.7 -m pip show numpy" | ||
dash -c "/usr/bin/python3.7 -m pip show -f numpy | grep .dll" | ||
dash -c "/bin/tr -d '\r' <tools/list_installed_dll_dependencies_cygwin.sh >list_dlls_unix.sh" | ||
dash "list_dlls_unix.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/dash | ||
# Check permissions and dependencies on installed DLLs | ||
# DLLs need execute permissions to be used | ||
# DLLs must be able to find their dependencies | ||
# This checks both of those, then does a direct test | ||
# The best way of checking whether a C extension module is importable | ||
# is trying to import it. The rest is trying to give reasons why it | ||
# isn't importing. | ||
# | ||
# One of the tools and the extension for shared libraries are | ||
# Cygwin-specific, but the rest should work on most platforms with | ||
# /bin/sh | ||
|
||
py_ver=3.7 | ||
site_packages=$(python${py_ver} -m pip show numpy | \ | ||
grep Location | cut -d " " -f 2 -); | ||
dll_list=$(for name in $(python${py_ver} -m pip show -f numpy | \ | ||
grep -F .dll); do echo ${site_packages}/${name}; done) | ||
echo "Checks for existence, permissions and file type" | ||
ls -l ${dll_list} | ||
file ${dll_list} | ||
echo "Dependency checks" | ||
ldd ${dll_list} | grep -F -e " => not found" && exit 1 | ||
cygcheck ${dll_list} >cygcheck_dll_list 2>cygcheck_missing_deps | ||
grep -F -e "cygcheck: track_down: could not find " cygcheck_missing_deps && exit 1 | ||
echo "Import tests" | ||
mkdir -p dist/ | ||
cd dist/ | ||
for name in ${dll_list}; | ||
do | ||
echo ${name} | ||
ext_module=$(echo ${name} | \ | ||
sed -E \ | ||
-e "s/^\/+(home|usr).*?site-packages\/+//" \ | ||
-e "s/.cpython-3.m?-x86(_64)?-cygwin.dll$//" \ | ||
-e "s/\//./g") | ||
python${py_ver} -c "import ${ext_module}" | ||
done |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.