From 2cac954e1ea21102812e47fd823dd1c269505de3 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 10 Jun 2022 13:57:06 -0400 Subject: [PATCH 1/8] CI: Run tests in Cygwin for Cygwin CI --- .github/workflows/tests-cygwin.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests-cygwin.yml b/.github/workflows/tests-cygwin.yml index 011dd11e9..77aca9996 100644 --- a/.github/workflows/tests-cygwin.yml +++ b/.github/workflows/tests-cygwin.yml @@ -14,34 +14,35 @@ jobs: strategy: fail-fast: false matrix: - python: - - '3.10' + python-minor: + - '9' steps: - name: Checkout uses: actions/checkout@v2 - - name: Set up target Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Setup Cygwin uses: cygwin/cygwin-install-action@v2 + with: + packages: >- + python3${{ matrix.python-minor }} + python3${{ matrix.python-minor }}-pip - name: Install nox + shell: bash.exe -eo pipefail -o igncr "{0}" run: | - python -m pip install nox + /usr/bin/python -m pip install nox nox --version - name: Run tests - run: nox -s test-${{ matrix.python }} + shell: bash.exe -eo pipefail -o igncr "{0}" + run: nox -s test-3.${{ matrix.python-minor }} - name: Send coverage report uses: codecov/codecov-action@v1 env: - PYTHON: cygwin-${{ matrix.python }} + PYTHON: cygwin-3.${{ matrix.python-minor }} with: flags: tests env_vars: PYTHON - name: cygwin-${{ matrix.python }} + name: cygwin-3.${{ matrix.python-minor }} From 657af33d30a0c6f9f7de6a801df4639a9116ffb2 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 10 Jun 2022 16:34:26 -0400 Subject: [PATCH 2/8] CI: Include /usr/local/bin in PATH. --- .github/workflows/tests-cygwin.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests-cygwin.yml b/.github/workflows/tests-cygwin.yml index 77aca9996..ab2a61962 100644 --- a/.github/workflows/tests-cygwin.yml +++ b/.github/workflows/tests-cygwin.yml @@ -30,12 +30,16 @@ jobs: - name: Install nox shell: bash.exe -eo pipefail -o igncr "{0}" + env: + PATH: "/bin:/usr/bin:/usr/local/bin:/usr/lib/lapack" run: | /usr/bin/python -m pip install nox nox --version - name: Run tests shell: bash.exe -eo pipefail -o igncr "{0}" + env: + PATH: "/bin:/usr/bin:/usr/local/bin:/usr/lib/lapack" run: nox -s test-3.${{ matrix.python-minor }} - name: Send coverage report From 641cad4eaecb5770ff450713b36bd5a5b5ed476c Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 10 Jun 2022 16:41:21 -0400 Subject: [PATCH 3/8] CI: Add cmake et al. to Cygwin install. Hopefully this lets test setup complete. --- .github/workflows/tests-cygwin.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests-cygwin.yml b/.github/workflows/tests-cygwin.yml index ab2a61962..f19175de3 100644 --- a/.github/workflows/tests-cygwin.yml +++ b/.github/workflows/tests-cygwin.yml @@ -27,6 +27,7 @@ jobs: packages: >- python3${{ matrix.python-minor }} python3${{ matrix.python-minor }}-pip + cmake make ninja - name: Install nox shell: bash.exe -eo pipefail -o igncr "{0}" From 6a39c19fb5897c1b0ed2488a9f2b83d3d3c4face Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 10 Jun 2022 16:45:13 -0400 Subject: [PATCH 4/8] CI: Add gcc to Cygwin run --- .github/workflows/tests-cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-cygwin.yml b/.github/workflows/tests-cygwin.yml index f19175de3..ecce60431 100644 --- a/.github/workflows/tests-cygwin.yml +++ b/.github/workflows/tests-cygwin.yml @@ -27,7 +27,7 @@ jobs: packages: >- python3${{ matrix.python-minor }} python3${{ matrix.python-minor }}-pip - cmake make ninja + cmake make ninja gcc-core - name: Install nox shell: bash.exe -eo pipefail -o igncr "{0}" From 17e438dc64b0bd5c53f3d5384f5b3e0c7875f76c Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 10 Jun 2022 16:49:32 -0400 Subject: [PATCH 5/8] CI: Add g++ compiler to Cygwin CI run. --- .github/workflows/tests-cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-cygwin.yml b/.github/workflows/tests-cygwin.yml index ecce60431..b92a5d221 100644 --- a/.github/workflows/tests-cygwin.yml +++ b/.github/workflows/tests-cygwin.yml @@ -27,7 +27,7 @@ jobs: packages: >- python3${{ matrix.python-minor }} python3${{ matrix.python-minor }}-pip - cmake make ninja gcc-core + cmake make ninja gcc-core gcc-g++ - name: Install nox shell: bash.exe -eo pipefail -o igncr "{0}" From e8f80e8550e871ef53c40be81d1932b429c91f23 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 10 Jun 2022 16:57:55 -0400 Subject: [PATCH 6/8] CI: Add git to Cygwin CI run. --- .github/workflows/tests-cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-cygwin.yml b/.github/workflows/tests-cygwin.yml index b92a5d221..9d85ee061 100644 --- a/.github/workflows/tests-cygwin.yml +++ b/.github/workflows/tests-cygwin.yml @@ -27,7 +27,7 @@ jobs: packages: >- python3${{ matrix.python-minor }} python3${{ matrix.python-minor }}-pip - cmake make ninja gcc-core gcc-g++ + cmake make ninja gcc-core gcc-g++ git - name: Install nox shell: bash.exe -eo pipefail -o igncr "{0}" From 3852b780fd6ddd03db5cb0c466edda876a854a3a Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 10 Jun 2022 17:14:39 -0400 Subject: [PATCH 7/8] TST: Specify shared library extension for Cygwin Also make the Windows extension match what I've been told is the common Windows practice. --- tests/test_wheel.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_wheel.py b/tests/test_wheel.py index 178ce1582..1dab5d35a 100644 --- a/tests/test_wheel.py +++ b/tests/test_wheel.py @@ -39,6 +39,12 @@ elif platform.system() == 'Darwin': SHARED_LIB_EXT = 'dylib' elif platform.system() == 'Windows': + # I'm using import library (link-time) rather than dynamic library (run-time) + # because that's what was already here for Cygwin + SHARED_LIB_EXT = 'lib' +elif platform.system().startswith("CYGWIN"): + # I'm using import library (link-time) rather than dynamic library (run-time) + # because that's what was already here for Cygwin SHARED_LIB_EXT = 'dll.a' else: raise NotImplementedError(f'Unknown system: {platform.system()}') From 905a05a9373ae8a7d6bb58247c3abdb672232f08 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Fri, 10 Jun 2022 17:31:20 -0400 Subject: [PATCH 8/8] CI: Try to ensure Cygwin tests start in right place There's a bunch of failures due to "git: not in repository" errors, so let's try to stay in a repository. --- .github/workflows/tests-cygwin.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-cygwin.yml b/.github/workflows/tests-cygwin.yml index 9d85ee061..043b68e1f 100644 --- a/.github/workflows/tests-cygwin.yml +++ b/.github/workflows/tests-cygwin.yml @@ -18,6 +18,9 @@ jobs: - '9' steps: + - name: Tell git to use proper newlines + run: git config --global core.autocrlf input + - name: Checkout uses: actions/checkout@v2 @@ -33,6 +36,8 @@ jobs: shell: bash.exe -eo pipefail -o igncr "{0}" env: PATH: "/bin:/usr/bin:/usr/local/bin:/usr/lib/lapack" + TMP: "/tmp" + TEMP: "/tmp" run: | /usr/bin/python -m pip install nox nox --version @@ -41,7 +46,12 @@ jobs: shell: bash.exe -eo pipefail -o igncr "{0}" env: PATH: "/bin:/usr/bin:/usr/local/bin:/usr/lib/lapack" - run: nox -s test-3.${{ matrix.python-minor }} + CHERE_INVOKING: 1 + TMP: "/tmp" + TEMP: "/tmp" + run: | + cd "${GITHUB_WORKSPACE}" + nox -s test-3.${{ matrix.python-minor }} - name: Send coverage report uses: codecov/codecov-action@v1