Skip to content

Commit

Permalink
Switch from tox to nox to align with PyO3 and thereby hopefully get a…
Browse files Browse the repository at this point in the history
… working CI on Windows Server 2022.
  • Loading branch information
adamreichold committed Feb 11, 2022
1 parent 7306517 commit 212d959
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 44 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
platform: [
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" },
{ os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
{ os: "windows-2019", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" },
{ os: "windows-2019", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" },
{ os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" },
{ os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" },
]
include:
# NumPy does not provide pre-built wheels for PyPy on macOS and Windows
Expand Down Expand Up @@ -76,13 +76,12 @@ jobs:
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
- name: Test example
run: |
pip install tox
tox -c examples/simple-extension
pip install nox
nox -f examples/simple-extension/noxfile.py
env:
CARGO_TERM_VERBOSE: true
CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }}
RUST_BACKTRACE: 1
TOX_TESTENV_PASSENV: CARGO_BUILD_TARGET

check-msrv:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -131,9 +130,8 @@ jobs:
shell: python
- name: Test example
run: |
pip install tox
tox
working-directory: examples/simple-extension
pip install nox
nox -f examples/simple-extension/noxfile.py
examples:
runs-on: ubuntu-latest
Expand All @@ -155,9 +153,9 @@ jobs:
continue-on-error: true
- name: Test examples
run: |
pip install tox
tox -c examples/linalg
tox -c examples/parallel
pip install nox
nox -f examples/linalg/noxfile.py
nox -f examples/parallel/noxfile.py
coverage:
runs-on: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions examples/linalg/noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import nox


@nox.session
def tests(session):
session.install('pip', 'numpy', 'pytest')
session.run('pip', 'install', '.', '-v')
session.run('pytest')
11 changes: 0 additions & 11 deletions examples/linalg/tox.ini

This file was deleted.

8 changes: 8 additions & 0 deletions examples/parallel/noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import nox


@nox.session
def tests(session):
session.install('pip', 'numpy', 'pytest')
session.run('pip', 'install', '.', '-v')
session.run('pytest')
11 changes: 0 additions & 11 deletions examples/parallel/tox.ini

This file was deleted.

8 changes: 8 additions & 0 deletions examples/simple-extension/noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import nox


@nox.session
def tests(session):
session.install('pip', 'numpy', 'pytest')
session.run('pip', 'install', '.', '-v')
session.run('pytest')
11 changes: 0 additions & 11 deletions examples/simple-extension/tox.ini

This file was deleted.

0 comments on commit 212d959

Please sign in to comment.