Skip to content

Commit 212d959

Browse files
committed
Switch from tox to nox to align with PyO3 and thereby hopefully get a working CI on Windows Server 2022.
1 parent 7306517 commit 212d959

File tree

7 files changed

+33
-44
lines changed

7 files changed

+33
-44
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
platform: [
3636
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" },
3737
{ os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
38-
{ os: "windows-2019", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" },
39-
{ os: "windows-2019", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" },
38+
{ os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" },
39+
{ os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" },
4040
]
4141
include:
4242
# NumPy does not provide pre-built wheels for PyPy on macOS and Windows
@@ -76,13 +76,12 @@ jobs:
7676
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
7777
- name: Test example
7878
run: |
79-
pip install tox
80-
tox -c examples/simple-extension
79+
pip install nox
80+
nox -f examples/simple-extension/noxfile.py
8181
env:
8282
CARGO_TERM_VERBOSE: true
8383
CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }}
8484
RUST_BACKTRACE: 1
85-
TOX_TESTENV_PASSENV: CARGO_BUILD_TARGET
8685

8786
check-msrv:
8887
runs-on: ubuntu-latest
@@ -131,9 +130,8 @@ jobs:
131130
shell: python
132131
- name: Test example
133132
run: |
134-
pip install tox
135-
tox
136-
working-directory: examples/simple-extension
133+
pip install nox
134+
nox -f examples/simple-extension/noxfile.py
137135
138136
examples:
139137
runs-on: ubuntu-latest
@@ -155,9 +153,9 @@ jobs:
155153
continue-on-error: true
156154
- name: Test examples
157155
run: |
158-
pip install tox
159-
tox -c examples/linalg
160-
tox -c examples/parallel
156+
pip install nox
157+
nox -f examples/linalg/noxfile.py
158+
nox -f examples/parallel/noxfile.py
161159
162160
coverage:
163161
runs-on: ubuntu-latest

examples/linalg/noxfile.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import nox
2+
3+
4+
@nox.session
5+
def tests(session):
6+
session.install('pip', 'numpy', 'pytest')
7+
session.run('pip', 'install', '.', '-v')
8+
session.run('pytest')

examples/linalg/tox.ini

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/parallel/noxfile.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import nox
2+
3+
4+
@nox.session
5+
def tests(session):
6+
session.install('pip', 'numpy', 'pytest')
7+
session.run('pip', 'install', '.', '-v')
8+
session.run('pytest')

examples/parallel/tox.ini

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/simple-extension/noxfile.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import nox
2+
3+
4+
@nox.session
5+
def tests(session):
6+
session.install('pip', 'numpy', 'pytest')
7+
session.run('pip', 'install', '.', '-v')
8+
session.run('pytest')

examples/simple-extension/tox.ini

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)