Skip to content

Commit 258ecf8

Browse files
authored
ci: use uv (#46)
* ci: use uv Signed-off-by: Henry Schreiner <[email protected]> * ci: optimize for speed Signed-off-by: Henry Schreiner <[email protected]> --------- Signed-off-by: Henry Schreiner <[email protected]>
1 parent e80063e commit 258ecf8

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,21 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
runs-on: [ubuntu-latest, macos-latest, windows-latest]
25+
session: [dist, test]
2526

26-
name: Check on ${{ matrix.runs-on }}
27+
name: ${{ matrix.session }} on ${{ matrix.runs-on }}
2728

2829
steps:
29-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
3031
- uses: awvwgk/setup-fortran@main
3132
id: setup-fortran
33+
if: runner.os != 'Windows' # We aren't using this yet, and takes 4 mins to setup
3234
with:
3335
compiler: gcc
3436
version: 11
35-
- uses: wntrblm/[email protected]
36-
- run: nox
37+
- uses: yezz123/setup-uv@v4
38+
- uses: wntrblm/[email protected]
39+
- run: nox -s ${{ matrix.session }}
3740

3841
pass:
3942
if: always()

noxfile.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import nox
44

5+
nox.needs_version = ">=2024.4.15"
6+
nox.options.default_venv_backend = "uv|virtualenv"
7+
58
hello_list = ["hello-pure", "hello-cpp", "hello-pybind11", "hello-cython"]
69
if not sys.platform.startswith("win"):
710
hello_list.extend(["hello-cmake-package", "pi-fortran"])
@@ -15,7 +18,8 @@ def dist(session: nox.Session, module: str) -> None:
1518
session.install("build")
1619

1720
# Builds SDist and wheel
18-
session.run("python", "-m", "build")
21+
opt = ["--installer=uv"] if session.venv_backend == "uv" else []
22+
session.run("python", "-m", "build", *opt)
1923

2024

2125
@nox.session

0 commit comments

Comments
 (0)