8000 TST: Add cygwin build to CI by DWesl · Pull Request #18330 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

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 12 commits into from
Jul 21, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TST: Clean up the output from the extension module check.
Also serves to document the script a bit.
  • Loading branch information
DWesl committed Jul 20, 2021
commit 9ad49e47bebed493431e3cd27f1c5d902ba990b1
20 changes: 14 additions & 6 deletions .github/workflows/cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,30 @@ jobs:
run: |
dash -c "/usr/bin/python3.7 -m pip show numpy"
dash -c "/usr/bin/python3.7 -m pip show -f numpy | grep .dll"
echo >list_dlls_dos.sh 'site_packages=$(python3.7 -m pip show numpy | \
echo >list_dlls_dos.sh '#!/bin/dash
site_packages=$(python3.7 -m pip show numpy | \
grep Location | cut -d " " -f 2 -);
dll_list=$(for name in $(python3.7 -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}
ldd ${dll_list}
cygcheck ${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}
python3.7 -c "import "$(echo ${name} | \
ext_module=$(echo ${name} | \
sed -E \
-e "s/\/+(home|usr).*?site-packages\/+//g" -e "s/\//./g" \
-e "s/.cpython-3.m?-x86(_64)?-cygwin.dll//g")
-e "s/^\/+(home|usr).*?site-packages\/+//" \
-e "s/.cpython-3.m?-x86(_64)?-cygwin.dll$//" \
-e "s/\//./g")
python3.7 -c "import ${ext_module}"
done
'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by that?

I've moved this section to later in the run, guarded by if: failure() so it only runs if something breaks, and cleaned up the output so it's easier to see problems. I also split finding the extension module name onto an earlier line than the import check, to help clarify what's going on.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering about '.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But now I see it starts way up above :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's the end of the extension-module-checking script. Should I split that into a separate file somewhere rather than writing it out each time?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the first thing is to get the test passing again, we can worry about further cleanups after that. I'm beginning to regret the original suggestion :) But it does look much nicer now.

dash -c "/bin/tr -d '\r' <list_dlls_dos.sh >list_dlls_unix.sh"
Expand Down
0