From ae1ba107f962492b1273c0b573f9d5d4a010945e Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 25 Jun 2024 13:10:36 -0400 Subject: [PATCH] ci: faster wheel builds (#3146) * ci: faster wheel builds Signed-off-by: Henry Schreiner * Update packaging-test.yml --------- Signed-off-by: Henry Schreiner Co-authored-by: Jim Pivarski --- .github/workflows/build-wheels.yml | 22 +++++++++++++++++----- .github/workflows/packaging-test.yml | 3 +++ awkward-cpp/.gitignore | 1 + cibuildwheel.toml | 1 + noxfile.py | 3 ++- 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index e86bb6749e..afce391b62 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -8,6 +8,9 @@ on: workflow_dispatch: # Use from other workflows workflow_call: + pull_request: + paths: + - .github/workflows/build-wheels.yml concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -91,10 +94,13 @@ jobs: with: submodules: true - - name: Python 3.11 + - name: Python 3.12 uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' + + - name: Setup uv + uses: yezz123/setup-uv@v4 - name: Prepare build files run: pipx run nox -s prepare @@ -138,10 +144,13 @@ jobs: with: submodules: true - - name: Python 3.10 + - name: Python 3.12 uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' + + - name: Setup uv + uses: yezz123/setup-uv@v4 - name: Prepare build files run: pipx run nox -s prepare @@ -182,11 +191,14 @@ jobs: with: submodules: true + - name: Setup uv + uses: yezz123/setup-uv@v4 + - name: Prepare build files run: pipx run nox -s prepare - name: Build distributions - run: pipx run build + run: pipx run build --installer uv - name: Check metadata run: pipx run twine check dist/* diff --git a/.github/workflows/packaging-test.yml b/.github/workflows/packaging-test.yml index debff9519b..ca24f090c3 100644 --- a/.github/workflows/packaging-test.yml +++ b/.github/workflows/packaging-test.yml @@ -62,6 +62,9 @@ jobs: with: submodules: true + - name: Setup uv + uses: yezz123/setup-uv@v4 + - name: Prepare build files run: pipx run nox -s prepare diff --git a/awkward-cpp/.gitignore b/awkward-cpp/.gitignore index 6ba1c8061e..77e27815d8 100644 --- a/awkward-cpp/.gitignore +++ b/awkward-cpp/.gitignore @@ -8,3 +8,4 @@ include/awkward/kernels.h src/awkward_cpp/_kernel_signatures.py dist +.venv diff --git a/cibuildwheel.toml b/cibuildwheel.toml index 372b80f5ab..96f94455fe 100644 --- a/cibuildwheel.toml +++ b/cibuildwheel.toml @@ -1,4 +1,5 @@ [tool.cibuildwheel] +build-frontend = "build[uv]" test-requires = ["pytest>=6", "."] test-command = """ pytest {project}/tests \ diff --git a/noxfile.py b/noxfile.py index a4fc7f5e4a..eafd77fe4a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -11,9 +11,10 @@ ALL_PYTHONS = ["3.8", "3.9", "3.10", "3.11", "3.12"] +nox.needs_version = ">=2024.3.2" +nox.options.default_venv_backend = "uv|virtualenv" nox.options.sessions = ["lint", "tests"] - requirements_dev = [ "build", "numpy",