From ed0d8277204dc75ad3796657f190bf1e8373f2e9 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 11:04:44 -0500 Subject: [PATCH 01/31] Add a cygwin build to the PR list. We'll see if this works. --- .github/workflows/cygwin-python.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/cygwin-python.yml diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml new file mode 100644 index 0000000..1920468 --- /dev/null +++ b/.github/workflows/cygwin-python.yml @@ -0,0 +1,33 @@ +name: Cygwin Build + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Install Cygwin + uses: egor-tensin/setup-cygwin@v3 + with: + platform: x64 + packages: python38-numpy python38-pytest python38-hypothesis python38-cython + - name: Install dependencies + run: | + python3.8 -m pip install --upgrade pip + python3.8 -m pip install Cython numpy scipy + python3.8 -m pip install -r requirements.txt + python3.8 -m pip install -r requirements-test.txt + - name: Test with pytest + 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 From f417501a1d4de7fb9cef349e84dbf8eff3da98bb Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 11:13:08 -0500 Subject: [PATCH 02/31] Checkout the repository in the Cygwin build. --- .github/workflows/cygwin-python.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 1920468..2646bec 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -13,6 +13,7 @@ jobs: runs-on: windows-latest steps: + - uses: actions/checkout@v2 - name: Install Cygwin uses: egor-tensin/setup-cygwin@v3 with: From 4ca35557ad6b48477e809a7fcd4a07a8c5e27a56 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 11:45:56 -0500 Subject: [PATCH 03/31] Add more requirements to the cygwin setup. --- .github/workflows/cygwin-python.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 2646bec..3156188 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -18,10 +18,10 @@ jobs: uses: egor-tensin/setup-cygwin@v3 with: platform: x64 - packages: python38-numpy python38-pytest python38-hypothesis python38-cython + packages: python38-devel python38-numpy python38-pytest python38-hypothesis python38-cython python38-pip python38-wheel python38-setuptools - name: Install dependencies run: | - python3.8 -m pip install --upgrade pip + python3.8 -m pip install --upgrade pip wheel python3.8 -m pip install Cython numpy scipy python3.8 -m pip install -r requirements.txt python3.8 -m pip install -r requirements-test.txt From 017f1fd3048b4299f2dfbc6fad2604ec55eac3f6 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 12:00:34 -0500 Subject: [PATCH 04/31] Try to cache the pip cache in the GitHub Actions cache. This should speed things up a bit. Also caches the Cygwin download cache. I don't want to try skipping setup.exe entirely, but this should help. --- .github/workflows/cygwin-python.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 3156188..2a5aabd 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -14,11 +14,30 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Setup cache for Cygwin and pip + uses: actions/cache@v2 + with: + path: | + ~/.cache/pip/ + C:\tools\cygwin\packages + key: ${{ runner.os }}-build-${{ hashFiles('requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-build- + ${{ runner.os }}- - name: Install Cygwin + id: install-cygwin uses: egor-tensin/setup-cygwin@v3 with: platform: x64 + install-dir: "C:\tools\cygwin" packages: python38-devel python38-numpy python38-pytest python38-hypothesis python38-cython python38-pip python38-wheel python38-setuptools + - name: Clean Windows PATH + uses: egor-tensin/cleanup-path@v1 + with: + dirs: ${{ steps.install-cygwin.install-dir }} + - name: Ask pip to use cache contents + run: | + bash -c "echo >~/.config/pip/pip.conf $'[install]\nprefer-binary = True'" - name: Install dependencies run: | python3.8 -m pip install --upgrade pip wheel From 47c00f3ae110d247b3dc2ede2eeea55c22e87790 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 12:07:41 -0500 Subject: [PATCH 05/31] YAML syntax fix. --- .github/workflows/cygwin-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 2a5aabd..e31bff5 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -29,7 +29,7 @@ jobs: uses: egor-tensin/setup-cygwin@v3 with: platform: x64 - install-dir: "C:\tools\cygwin" + install-dir: 'C:\tools\cygwin' packages: python38-devel python38-numpy python38-pytest python38-hypothesis python38-cython python38-pip python38-wheel python38-setuptools - name: Clean Windows PATH uses: egor-tensin/cleanup-path@v1 From 9b540801cea63b74ea825fe697bafc0108c5d0b6 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 12:09:19 -0500 Subject: [PATCH 06/31] Move cache settings to with: block where they belong. --- .github/workflows/cygwin-python.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index e31bff5..c294d95 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -20,10 +20,10 @@ jobs: path: | ~/.cache/pip/ C:\tools\cygwin\packages - key: ${{ runner.os }}-build-${{ hashFiles('requirements*.txt') }} - restore-keys: | - ${{ runner.os }}-build- - ${{ runner.os }}- + key: ${{ runner.os }}-build-${{ hashFiles('requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-build- + ${{ runner.os }}- - name: Install Cygwin id: install-cygwin uses: egor-tensin/setup-cygwin@v3 From d1c3214dafeb25ab32d7a2145186918b76cdc931 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 12:11:26 -0500 Subject: [PATCH 07/31] Fix syntax so config is actually in with: block. --- .github/workflows/cygwin-python.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index c294d95..0506f50 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -20,10 +20,10 @@ jobs: path: | ~/.cache/pip/ C:\tools\cygwin\packages - key: ${{ runner.os }}-build-${{ hashFiles('requirements*.txt') }} - restore-keys: | - ${{ runner.os }}-build- - ${{ runner.os }}- + key: ${{ runner.os }}-build-${{ hashFiles('requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-build- + ${{ runner.os }}- - name: Install Cygwin id: install-cygwin uses: egor-tensin/setup-cygwin@v3 From f5569325788d767d3436354cfab88876ba468fa7 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 12:39:18 -0500 Subject: [PATCH 08/31] Make pip config directory. --- .github/workflows/cygwin-python.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 0506f50..0cd4d49 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -37,6 +37,7 @@ jobs: dirs: ${{ steps.install-cygwin.install-dir }} - name: Ask pip to use cache contents run: | + mkdir -p ~/.config/pip bash -c "echo >~/.config/pip/pip.conf $'[install]\nprefer-binary = True'" - name: Install dependencies run: | From 34f61c5c24dc0f37679a67f85a5c55b16eaaa793 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 13:38:34 -0500 Subject: [PATCH 09/31] Wrap everything in "bash -c". Try to ensure everything actually runs in Cygwin. --- .github/workflows/cygwin-python.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 0cd4d49..c4a140b 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -37,18 +37,18 @@ jobs: dirs: ${{ steps.install-cygwin.install-dir }} - name: Ask pip to use cache contents run: | - mkdir -p ~/.config/pip + bash -c "mkdir -p ~/.config/pip" bash -c "echo >~/.config/pip/pip.conf $'[install]\nprefer-binary = True'" - name: Install dependencies run: | - python3.8 -m pip install --upgrade pip wheel - python3.8 -m pip install Cython numpy scipy - python3.8 -m pip install -r requirements.txt - python3.8 -m pip install -r requirements-test.txt + bash -c "python3.8 -m pip install --upgrade pip wheel" + bash -c "python3.8 -m pip install Cython numpy scipy" + bash -c "python3.8 -m pip install -r requirements.txt" + bash -c "python3.8 -m pip install -r requirements-test.txt" - name: Test with pytest 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 + bash -c "python3.8 -m pip install pytest" + bash -c "python3.8 -m pip install ." + bash -c "python3.8 setup.py check" + bash -c "python3.8 -m pytest" + bash -c "python3.8 -m pytest --pyargs py_toeplitz --doctest-modules" From 273a684a1638281d9beca29a460a926b366c1ca5 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 15:43:08 -0500 Subject: [PATCH 10/31] Tell SciPy which BLAS and LAPACK to use. BLAS will redirect to openblas at runtime. --- .github/workflows/cygwin-python.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index c4a140b..b8234bd 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -30,7 +30,7 @@ jobs: with: platform: x64 install-dir: 'C:\tools\cygwin' - packages: python38-devel python38-numpy python38-pytest python38-hypothesis python38-cython python38-pip python38-wheel python38-setuptools + packages: python38-devel python38-numpy python38-pytest python38-hypothesis python38-cython python38-pip python38-wheel python38-setuptools liblapack-devel libopenblas - name: Clean Windows PATH uses: egor-tensin/cleanup-path@v1 with: @@ -40,6 +40,9 @@ jobs: bash -c "mkdir -p ~/.config/pip" bash -c "echo >~/.config/pip/pip.conf $'[install]\nprefer-binary = True'" - name: Install dependencies + env: + BLAS: /usr/lib/libblas.dll.a + LAPACK: /usr/lib/liblapack.dll.a run: | bash -c "python3.8 -m pip install --upgrade pip wheel" bash -c "python3.8 -m pip install Cython numpy scipy" From 057d0e6d967c26f09518844cd0de19eba9779164 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 17:19:24 -0500 Subject: [PATCH 11/31] Condense requirements files. --- .github/workflows/cygwin-python.yml | 3 +-- requirements-dev.txt | 2 +- requirements-test.txt | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index b8234bd..fd1bdbd 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -30,7 +30,7 @@ jobs: with: platform: x64 install-dir: 'C:\tools\cygwin' - packages: python38-devel python38-numpy python38-pytest python38-hypothesis python38-cython python38-pip python38-wheel python38-setuptools liblapack-devel libopenblas + packages: python38-devel python38-numpy python38-pytest python38-hypothesis python38-cython python38-pip python38-wheel python38-setuptools liblapack-devel libopenblas gcc-fortran - name: Clean Windows PATH uses: egor-tensin/cleanup-path@v1 with: @@ -45,7 +45,6 @@ jobs: LAPACK: /usr/lib/liblapack.dll.a run: | bash -c "python3.8 -m pip install --upgrade pip wheel" - bash -c "python3.8 -m pip install Cython numpy scipy" bash -c "python3.8 -m pip install -r requirements.txt" bash -c "python3.8 -m pip install -r requirements-test.txt" - name: Test with pytest diff --git a/requirements-dev.txt b/requirements-dev.txt index c1107de..0d24446 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,3 @@ +-r requirements.txt cython>=0.16 numpy -scipy>-0.16.0 diff --git a/requirements-test.txt b/requirements-test.txt index 6509381..33e498b 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,3 +1,3 @@ +-r requirements.txt pytest-cov hypothesis[numpy]>=4.38.0 -scipy From d5f078d69b7d5cdfe7010f788c571a72ddae649d Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 17:20:36 -0500 Subject: [PATCH 12/31] Update benchmark dependency versions. --- asv.conf.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/asv.conf.json b/asv.conf.json index 889ee70..1bdf3ce 100644 --- a/asv.conf.json +++ b/asv.conf.json @@ -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"], ".": [""], }, From ab7d4227e9183663df253a2796ed7804f1c25a5d Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 17:36:14 -0500 Subject: [PATCH 13/31] Note that the cython implementation makes the wheels non-universal. --- setup.cfg | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index bb243e8..ab4ca17 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 \ No newline at end of file From f5a7fac7424781ff386cd215343d7e7722957abc Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 3 Feb 2021 17:37:22 -0500 Subject: [PATCH 14/31] Don't count linter helper files in coverage stats. They aren't going to be imported or used, and they aren't supposed to be. --- .coveragerc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.coveragerc b/.coveragerc index 291b0a3..39d874e 100644 --- a/.coveragerc +++ b/.coveragerc @@ -8,4 +8,4 @@ source=py_toeplitz fail_under=98 show_missing=True skip_covered=True -omit=*_flymake.py \ No newline at end of file +omit=*_flymake.py From 5d3a170fc33ca316040f9c278c0b3263ee8e3500 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Wed, 31 Mar 2021 12:13:56 -0400 Subject: [PATCH 15/31] Separate out wheel build and install steps, and check DLLs. I think this is also a problem here. We'll see. --- .github/workflows/cygwin-python.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index fd1bdbd..4dd3c48 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -47,6 +47,29 @@ jobs: bash -c "python3.8 -m pip install --upgrade pip wheel" bash -c "python3.8 -m pip install -r requirements.txt" bash -c "python3.8 -m pip install -r requirements-test.txt" + - name: Build wheel + run: | + bash -c "python3.8 setup.py bdist_wheel" + - name: Install wheel + run: | + bash -c "python3.8 -m pip install dist/py_toeplitz*.whl" + - name: Check that pip installed the extensions + run: | + bash -c "python3.7 -m pip show py_toeplitz + bash -c "python3.7 -m pip show -f py_toeplitz | grep .dll" + echo >list_dlls_dos.sh 'site_packages=$(python3.7 -m pip show py_toeplitz | grep Location | cut -d " " -f 2 -); + dll_list=$(for name in $(python3.7 -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.7 -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 + ' + bash -c "tr -d '\r' list_dlls_unix.sh" + bash list_dlls_unix.sh - name: Test with pytest run: | bash -c "python3.8 -m pip install pytest" From 9a319ea5eda53a2b643742c191e1c5f16717ce41 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Tue, 20 Jul 2021 15:41:56 -0400 Subject: [PATCH 16/31] Add the Cygwin bin and fallback lapack directories to PATH Being able to find the linear algebra libraries is nice. --- .github/workflows/cygwin-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 4dd3c48..aed782f 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -34,7 +34,7 @@ jobs: - name: Clean Windows PATH uses: egor-tensin/cleanup-path@v1 with: - dirs: ${{ steps.install-cygwin.install-dir }} + dirs: ${{ steps.install-cygwin.install-dir }}'\bin;'${{ steps.install-cygwin.install-dir }}'\lib\lapack' - name: Ask pip to use cache contents run: | bash -c "mkdir -p ~/.config/pip" From 58ad57ad08da17837382dc192fc26eba9c51c855 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Tue, 20 Jul 2021 15:49:30 -0400 Subject: [PATCH 17/31] Stop trying to use variables for install path Just try to remember to install it. --- .github/workflows/cygwin-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index aed782f..68a4540 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -34,7 +34,7 @@ jobs: - name: Clean Windows PATH uses: egor-tensin/cleanup-path@v1 with: - dirs: ${{ steps.install-cygwin.install-dir }}'\bin;'${{ steps.install-cygwin.install-dir }}'\lib\lapack' + dirs: 'C:\tools\cygwin\bin;C:\tools\cygwin\lib\lapack' - name: Ask pip to use cache contents run: | bash -c "mkdir -p ~/.config/pip" From ec4357b6fe9c3e5361d12808a60449e8ced43347 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Tue, 20 Jul 2021 16:52:01 -0400 Subject: [PATCH 18/31] Add C++ compiler to required packages SciPy uses C++ now. --- .github/workflows/cygwin-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 68a4540..a1f892a 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -30,7 +30,7 @@ jobs: with: platform: x64 install-dir: 'C:\tools\cygwin' - packages: python38-devel python38-numpy python38-pytest python38-hypothesis python38-cython python38-pip python38-wheel python38-setuptools liblapack-devel libopenblas gcc-fortran + 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: From a31f115296b57e38bb36f94f89a23f818fe96355 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 13 May 2022 11:14:11 -0400 Subject: [PATCH 19/31] CI: Update Cygwin build action Specify shell as bash, wrap lines, consistently use python 3.8, and change to "official" Cygwin install action. --- .github/workflows/cygwin-python.yml | 56 +++++++++++++++-------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index a1f892a..a16afe3 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -14,66 +14,70 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup cache for Cygwin and pip + - name: Setup cache for pip uses: actions/cache@v2 with: path: | ~/.cache/pip/ - C:\tools\cygwin\packages key: ${{ runner.os }}-build-${{ hashFiles('requirements*.txt') }} restore-keys: | ${{ runner.os }}-build- ${{ runner.os }}- - name: Install Cygwin id: install-cygwin - uses: egor-tensin/setup-cygwin@v3 + uses: cygwin/cygwin-install-action@v2 with: - platform: x64 - install-dir: 'C:\tools\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++ + 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:\tools\cygwin\bin;C:\tools\cygwin\lib\lapack' - name: Ask pip to use cache contents + shell: bash.exe -eo pipefail -o igncr "{0}" run: | - bash -c "mkdir -p ~/.config/pip" - bash -c "echo >~/.config/pip/pip.conf $'[install]\nprefer-binary = True'" + mkdir -p ~/.config/pip + echo >~/.config/pip/pip.conf $'[install]\nprefer-binary = True' - name: Install dependencies + shell: bash.exe -eo pipefail -o igncr "{0}" env: BLAS: /usr/lib/libblas.dll.a LAPACK: /usr/lib/liblapack.dll.a run: | - bash -c "python3.8 -m pip install --upgrade pip wheel" - bash -c "python3.8 -m pip install -r requirements.txt" - bash -c "python3.8 -m pip install -r requirements-test.txt" + python3.8 -m pip install --upgrade pip wheel + 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: | - bash -c "python3.8 setup.py bdist_wheel" + python3.8 setup.py bdist_wheel - name: Install wheel + shell: bash.exe -eo pipefail -o igncr "{0}" run: | - bash -c "python3.8 -m pip install dist/py_toeplitz*.whl" + 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: | - bash -c "python3.7 -m pip show py_toeplitz - bash -c "python3.7 -m pip show -f py_toeplitz | grep .dll" - echo >list_dlls_dos.sh 'site_packages=$(python3.7 -m pip show py_toeplitz | grep Location | cut -d " " -f 2 -); - dll_list=$(for name in $(python3.7 -m pip show -f py_toeplitz | grep -F .dll); do echo ${site_packages}/${name}; done) + 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.7 -c "import "$(echo ${name} | sed -E -e "s|/home.*?site-packages/||g" -e "s|/|.|g" -e "s/.cpython-3.-x86(_64)?-cygwin.dll//g") + 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 - ' - bash -c "tr -d '\r' list_dlls_unix.sh" - bash list_dlls_unix.sh - name: Test with pytest + shell: bash.exe -eo pipefail -o igncr "{0}" run: | - bash -c "python3.8 -m pip install pytest" - bash -c "python3.8 -m pip install ." - bash -c "python3.8 setup.py check" - bash -c "python3.8 -m pytest" - bash -c "python3.8 -m pytest --pyargs py_toeplitz --doctest-modules" + 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 From 5159099e3b98127cc15f382d3ca04fb4b7b2bce3 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 13 May 2022 11:17:19 -0400 Subject: [PATCH 20/31] CI: Update tested python versions. Drop 3.5, add 3.8-3.10. --- .github/workflows/pythonpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 78d4bba..24b279a 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -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 From 26b8e1fbb9a5dc219b0d44f79b7683fefbd87aac Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 13 May 2022 11:23:33 -0400 Subject: [PATCH 21/31] CI: Specify python versions as strings. Hopefully this lets install-python try for 3.10 instead of 3.1 --- .github/workflows/pythonpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 24b279a..655bc85 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -15,7 +15,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [2.7, 3.6, 3.7, 3.8, 3.9, 3.10] + python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v1 From eb8ca1607c8dfd61da3ad2a3ec5205f5bd855ac8 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 13 May 2022 12:37:13 -0400 Subject: [PATCH 22/31] CI: Specify SciPy version to install. Unpatched SciPy 1.7+ doesn't install on Cygwin --- .github/workflows/cygwin-python.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index a16afe3..f910fb5 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -47,7 +47,8 @@ jobs: BLAS: /usr/lib/libblas.dll.a LAPACK: /usr/lib/liblapack.dll.a run: | - python3.8 -m pip install --upgrade pip wheel + python3.8 -m pip install --upgrade pip wheel 'setuptools<60' + python3.8 -m pip install 'scipy<1.7' python3.8 -m pip install -r requirements.txt python3.8 -m pip install -r requirements-test.txt - name: Build wheel From 9622f5cf6d59773a1632a5191253e167a3e0b8c4 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 13 May 2022 15:43:42 -0400 Subject: [PATCH 23/31] CI: Specify build dependencies for install SciPy install fails for some reason. --- .github/workflows/cygwin-python.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index f910fb5..fc24cb9 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -36,6 +36,11 @@ jobs: uses: egor-tensin/cleanup-path@v1 with: dirs: 'C:\tools\cygwin\bin;C:\tools\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: | @@ -46,8 +51,14 @@ jobs: 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.*' python3.8 -m pip install 'scipy<1.7' python3.8 -m pip install -r requirements.txt python3.8 -m pip install -r requirements-test.txt From 4c48b6052837287d4c970990e1ad9ab757699cbf Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Sat, 14 May 2022 08:13:05 -0400 Subject: [PATCH 24/31] CI: Check that NumPy imports --- .github/workflows/cygwin-python.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index fc24cb9..1448cc5 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -46,7 +46,7 @@ jobs: run: | mkdir -p ~/.config/pip echo >~/.config/pip/pip.conf $'[install]\nprefer-binary = True' - - name: Install dependencies + - name: Install build dependencies shell: bash.exe -eo pipefail -o igncr "{0}" env: BLAS: /usr/lib/libblas.dll.a @@ -59,6 +59,22 @@ jobs: 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: | + 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.7' python3.8 -m pip install -r requirements.txt python3.8 -m pip install -r requirements-test.txt From 6f6d198a5c7fe19ea8f7c5d239d3113f4a1f885f Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Sat, 14 May 2022 08:52:01 -0400 Subject: [PATCH 25/31] CI: Check NumPy DLLs. --- .github/workflows/cygwin-python.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 1448cc5..7c0addb 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -62,6 +62,10 @@ jobs: - 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" From 19f80b794a43c86efe9adebcefc33328dc398537 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Sat, 14 May 2022 08:57:32 -0400 Subject: [PATCH 26/31] CI: Update path to include current Cygwin dir I left it at the defaults for the old Cygwin directory --- .github/workflows/cygwin-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 7c0addb..98d0cba 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -35,7 +35,7 @@ jobs: - name: Clean Windows PATH uses: egor-tensin/cleanup-path@v1 with: - dirs: 'C:\tools\cygwin\bin;C:\tools\cygwin\lib\lapack' + dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack' - name: Specify python version shell: bash.exe -eo pipefail -o igncr "{0}" run: | From 7ac59a0682254ddb2c9d1b8377706f38983c5ffa Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 20 May 2022 14:44:16 -0400 Subject: [PATCH 27/31] CI: Update SciPy version on Cygwin See if this fixes the weird compile error. --- .github/workflows/cygwin-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 98d0cba..e73ac98 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -79,7 +79,7 @@ jobs: NPY_BLAS_LIBS: -lblas NPY_LAPACK_LIBS: -llapack -lblas run: | - python3.8 -m pip install 'scipy<1.7' + python3.8 -m pip install 'scipy>=1.8.1' python3.8 -m pip install -r requirements.txt python3.8 -m pip install -r requirements-test.txt - name: Build wheel From fe2e10eeb1143fb9e8b66225ac0b1de7031cc82e Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Sun, 29 May 2022 14:02:18 -0400 Subject: [PATCH 28/31] CI: Revert back to using SciPy 1.6 Should update to 1.9 once that's available. --- .github/workflows/cygwin-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index e73ac98..4945710 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -79,7 +79,7 @@ jobs: NPY_BLAS_LIBS: -lblas NPY_LAPACK_LIBS: -llapack -lblas run: | - python3.8 -m pip install 'scipy>=1.8.1' + python3.8 -m pip install 'scipy!=1.7.*,!=1.8.*' python3.8 -m pip install -r requirements.txt python3.8 -m pip install -r requirements-test.txt - name: Build wheel From 1f944441e7a6f9cd2d82de06d1ff2966138f8fda Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 10 Jun 2022 13:21:29 -0400 Subject: [PATCH 29/31] CI: Try installing SciPy 1.5 This used to work. I should check what the versions were back when I was testing this with tox. --- .github/workflows/cygwin-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 4945710..70461ef 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -79,7 +79,7 @@ jobs: NPY_BLAS_LIBS: -lblas NPY_LAPACK_LIBS: -llapack -lblas run: | - python3.8 -m pip install 'scipy!=1.7.*,!=1.8.*' + python3.8 -m pip install 'scipy!=1.6.*,!=1.7.*,!=1.8.*' python3.8 -m pip install -r requirements.txt python3.8 -m pip install -r requirements-test.txt - name: Build wheel From 27315e78e74404a76f671af789a590f3ffeb585f Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 10 Jun 2022 14:02:51 -0400 Subject: [PATCH 30/31] CI: Try adding Cygwin job with SciPy <1.0 --- .github/workflows/cygwin-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index 70461ef..c7e71e5 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -79,7 +79,7 @@ jobs: NPY_BLAS_LIBS: -lblas NPY_LAPACK_LIBS: -llapack -lblas run: | - python3.8 -m pip install 'scipy!=1.6.*,!=1.7.*,!=1.8.*' + python3.8 -m pip install 'scipy<1.0' python3.8 -m pip install -r requirements.txt python3.8 -m pip install -r requirements-test.txt - name: Build wheel From 450dd860401b61d26b62a80d89768bb0a47a23ed Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 10 Jun 2022 16:32:52 -0400 Subject: [PATCH 31/31] CI: Try using SciPy 1.2 --- .github/workflows/cygwin-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cygwin-python.yml b/.github/workflows/cygwin-python.yml index c7e71e5..7f32924 100644 --- a/.github/workflows/cygwin-python.yml +++ b/.github/workflows/cygwin-python.yml @@ -79,7 +79,7 @@ jobs: NPY_BLAS_LIBS: -lblas NPY_LAPACK_LIBS: -llapack -lblas run: | - python3.8 -m pip install 'scipy<1.0' + 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