Skip to content

CI: Run tests in Cygwin for Cygwin CI #1

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

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
38 changes: 27 additions & 11 deletions .github/workflows/tests-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,50 @@ jobs:
strategy:
fail-fast: false
matrix:
python:
- '3.10'
python-minor:
- '9'

steps:
- name: Tell git to use proper newlines
run: git config --global core.autocrlf input

- 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
cmake make ninja gcc-core gcc-g++ git

- name: Install nox
shell: bash.exe -eo pipefail -o igncr "{0}"
env:
PATH: "/bin:/usr/bin:/usr/local/bin:/usr/lib/lapack"
TMP: "/tmp"
TEMP: "/tmp"
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}"
env:
PATH: "/bin:/usr/bin:/usr/local/bin:/usr/lib/lapack"
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
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 }}
6 changes: 6 additions & 0 deletions tests/test_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()}')
Expand Down