Skip to content

Commit 2f0edcd

Browse files
committed
docs: rework CI a bit
1 parent 3d5218d commit 2f0edcd

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -704,14 +704,11 @@ jobs:
704704
- name: Install Doxygen
705705
run: sudo apt-get install -y doxygen librsvg2-bin # Changed to rsvg-convert in 20.04
706706

707-
- name: Install docs & setup requirements
708-
run: python3 -m pip install -r docs/requirements.txt
709-
710707
- name: Build docs
711-
run: python3 -m sphinx -W -b html docs docs/.build
708+
run: pipx run nox -s docs
712709

713710
- name: Make SDist
714-
run: python3 setup.py sdist
711+
run: pipx run nox -s build -- --sdist
715712

716713
- run: git status --ignored
717714

@@ -723,7 +720,7 @@ jobs:
723720
- name: Compare Dists (headers only)
724721
working-directory: include
725722
run: |
726-
python3 -m pip install --user -U ../dist/*
723+
python3 -m pip install --user -U ../dist/*.tar.gz
727724
installed=$(python3 -c "import pybind11; print(pybind11.get_include() + '/pybind11')")
728725
diff -rq $installed ./pybind11
729726

noxfile.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ def docs(session: nox.Session) -> None:
5757
session.chdir("docs")
5858

5959
if "pdf" in session.posargs:
60-
session.run("sphinx-build", "-M", "latexpdf", ".", "_build")
60+
session.run("sphinx-build", "-b", "latexpdf", ".", "_build")
6161
return
6262

63-
session.run("sphinx-build", "-M", "html", ".", "_build")
63+
session.run("sphinx-build", "-b", "html", ".", "_build")
6464

6565
if "serve" in session.posargs:
6666
session.log("Launching docs at http://localhost:8000/ - use Ctrl-C to quit")
@@ -85,5 +85,7 @@ def build(session: nox.Session) -> None:
8585
"""
8686

8787
session.install("build")
88-
session.run("python", "-m", "build")
89-
session.run("python", "-m", "build", env={"PYBIND11_GLOBAL_SDIST": "1"})
88+
session.run("python", "-m", "build", *session.posargs)
89+
session.run(
90+
"python", "-m", "build", *session.posargs, env={"PYBIND11_GLOBAL_SDIST": "1"}
91+
)

0 commit comments

Comments
 (0)