Skip to content
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

Add a cygwin build to the list of PR actions #12

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ed0d827
Add a cygwin build to the PR list.
DWesl Feb 3, 2021
f417501
Checkout the repository in the Cygwin build.
DWesl Feb 3, 2021
4ca3555
Add more requirements to the cygwin setup.
DWesl Feb 3, 2021
017f1fd
Try to cache the pip cache in the GitHub Actions cache.
DWesl Feb 3, 2021
47c00f3
YAML syntax fix.
DWesl Feb 3, 2021
9b54080
Move cache settings to with: block where they belong.
DWesl Feb 3, 2021
d1c3214
Fix syntax so config is actually in with: block.
DWesl Feb 3, 2021
f556932
Make pip config directory.
DWesl Feb 3, 2021
34f61c5
Wrap everything in "bash -c".
DWesl Feb 3, 2021
273a684
Tell SciPy which BLAS and LAPACK to use.
DWesl Feb 3, 2021
057d0e6
Condense requirements files.
DWesl Feb 3, 2021
d5f078d
Update benchmark dependency versions.
DWesl Feb 3, 2021
ab7d422
Note that the cython implementation makes the wheels non-universal.
DWesl Feb 3, 2021
f5a7fac
Don't count linter helper files in coverage stats.
DWesl Feb 3, 2021
5d3a170
Separate out wheel build and install steps, and check DLLs.
DWesl Mar 31, 2021
9a319ea
Add the Cygwin bin and fallback lapack directories to PATH
DWesl Jul 20, 2021
58ad57a
Stop trying to use variables for install path
DWesl Jul 20, 2021
ec4357b
Add C++ compiler to required packages
DWesl Jul 20, 2021
a31f115
CI: Update Cygwin build action
DWesl May 13, 2022
5159099
CI: Update tested python versions.
DWesl May 13, 2022
26b8e1f
CI: Specify python versions as strings.
DWesl May 13, 2022
eb8ca16
CI: Specify SciPy version to install.
DWesl May 13, 2022
9622f5c
CI: Specify build dependencies for install
DWesl May 13, 2022
4c48b60
CI: Check that NumPy imports
DWesl May 14, 2022
6f6d198
CI: Check NumPy DLLs.
DWesl May 14, 2022
19f80b7
CI: Update path to include current Cygwin dir
DWesl May 14, 2022
7ac59a0
CI: Update SciPy version on Cygwin
DWesl May 20, 2022
fe2e10e
CI: Revert back to using SciPy 1.6
DWesl May 29, 2022
1f94444
CI: Try installing SciPy 1.5
DWesl Jun 10, 2022
27315e7
CI: Try adding Cygwin job with SciPy <1.0
DWesl Jun 10, 2022
450dd86
CI: Try using SciPy 1.2
DWesl Jun 10, 2022
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
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source=py_toeplitz
fail_under=98
show_missing=True
skip_covered=True
omit=*_flymake.py
omit=*_flymake.py
115 changes: 115 additions & 0 deletions .github/workflows/cygwin-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Cygwin Build

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Setup cache for pip
uses: actions/cache@v2
with:
path: |
~/.cache/pip/
key: ${{ runner.os }}-build-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Cygwin
id: install-cygwin
uses: cygwin/cygwin-install-action@v2
with:
platform: x86_64
install-dir: 'C:\cygwin'
packages: >-
python38-devel python38-numpy python38-pytest python38-hypothesis python38-cython python38-pip
python38-wheel python38-setuptools liblapack-devel libopenblas gcc-fortran gcc-g++
- name: Clean Windows PATH
uses: egor-tensin/cleanup-path@v1
with:
dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack'
- name: Specify python version
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
/usr/sbin/alternatives --set python /usr/bin/python3.8
/usr/sbin/alternatives --set python3 /usr/bin/python3.8
- name: Ask pip to use cache contents
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
mkdir -p ~/.config/pip
echo >~/.config/pip/pip.conf $'[install]\nprefer-binary = True'
- name: Install build dependencies
shell: bash.exe -eo pipefail -o igncr "{0}"
env:
BLAS: /usr/lib/libblas.dll.a
LAPACK: /usr/lib/liblapack.dll.a
NPY_LAPACK_ORDER: openblas,lapack
NPY_BLAS_ORDER: openblas,blas
NPY_BLAS_LIBS: -lblas
NPY_LAPACK_LIBS: -llapack -lblas
run: |
python3.8 -m pip install --upgrade pip wheel 'setuptools<60'
python3.8 -m pip install cython pythran pybind11
python3.8 -m pip install 'numpy!=1.21.*'
- name: Check NumPy import
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
ls -l $(find /usr/local/lib/python3.8/site-packages/numpy/ -name \*.dll)
file $(find /usr/local/lib/python3.8/site-packages/numpy/ -name \*.dll)
cygcheck $(find /usr/local/lib/python3.8/site-packages/numpy/ -name \*.dll)
ldd $(find /usr/local/lib/python3.8/site-packages/numpy/ -name \*.dll)
python3.8 -v -c "import numpy as np; print(np.__version__)"
python3.8 -v -c "import numpy.linalg as la"
python3.8 -v -c "import numpy.linalg.lapack_lite"
- name: Install more dependencies
shell: bash.exe -eo pipefail -o igncr "{0}"
env:
BLAS: /usr/lib/libblas.dll.a
LAPACK: /usr/lib/liblapack.dll.a
NPY_LAPACK_ORDER: openblas,lapack
NPY_BLAS_ORDER: openblas,blas
NPY_BLAS_LIBS: -lblas
NPY_LAPACK_LIBS: -llapack -lblas
run: |
python3.8 -m pip install 'scipy<1.3'
python3.8 -m pip install -r requirements.txt
python3.8 -m pip install -r requirements-test.txt
- name: Build wheel
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
python3.8 setup.py bdist_wheel
- name: Install wheel
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
python3.8 -m pip install dist/py_toeplitz*.whl
- name: Check that pip installed the extensions
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
python3.8 -m pip show py_toeplitz
python3.8 -m pip show -f py_toeplitz | grep .dll
site_packages=$(python3.8 -m pip show py_toeplitz | grep Location | cut -d " " -f 2 -);
dll_list=$(for name in $(python3.8 -m pip show -f py_toeplitz | grep -F .dll); do echo ${site_packages}/${name}; done)
ls -l ${dll_list}
file ${dll_list}
ldd ${dll_list}
cygcheck ${dll_list}
for name in ${dll_list};
do
python3.8 -c "import "$(echo ${name} | sed -E -e "s|/home.*?site-packages/||g" -e "s|/|.|g" -e "s/.cpython-3.*-x86(_64)?-cygwin.dll//g")
done
- name: Test with pytest
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
python3.8 -m pip install pytest
python3.8 -m pip install .
python3.8 setup.py check
python3.8 -m pytest
python3.8 -m pytest --pyargs py_toeplitz --doctest-modules
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v1
Expand Down
6 changes: 3 additions & 3 deletions asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@
// "pip+emcee": [""], // emcee is only available for install with pip.
// },
"matrix": {
"numpy": ["1.16.6"],
"scipy": ["1.2.3"],
"cython": ["0.29.15"],
"numpy": ["1.20.0"],
"scipy": ["1.6.0"],
"cython": ["0.29.21"],
".": [""],
},

Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-r requirements.txt
cython>=0.16
numpy
scipy>-0.16.0
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-r requirements.txt
pytest-cov
hypothesis[numpy]>=4.38.0
scipy
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,5 @@ python_requires= >=2.7, <4, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
[options.packages.find]
where=src

[bdist_wheel]
universal=True

[sdist]
formats=bztar,zip,gztar