From 827a7f57d400d57689ca2a1bf689c467d817d570 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 10 Jun 2024 17:39:29 -0400 Subject: [PATCH 1/2] ci: faster wheel builds Signed-off-by: Henry Schreiner --- .github/workflows/build-wheels.yml | 26 +++++++++++++++++++------- .github/workflows/packaging-test.yml | 4 ++-- awkward-cpp/.gitignore | 1 + cibuildwheel.toml | 1 + noxfile.py | 3 ++- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 99e59f4f64..7c9d23b3dc 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,15 +94,18 @@ 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 - - uses: pypa/cibuildwheel@v2.17.0 + - uses: pypa/cibuildwheel@v2.19 env: CIBW_BUILD: "${{ matrix.build }}*" CIBW_ARCHS: ${{ matrix.arch }} @@ -138,17 +144,20 @@ 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 - uses: docker/setup-qemu-action@v3.0.0 - - uses: pypa/cibuildwheel@v2.17.0 + - uses: pypa/cibuildwheel@v2.19 env: CIBW_BUILD: cp${{ matrix.python }}-* CIBW_ARCHS: ${{ matrix.arch }} @@ -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 3fc5d9f678..eaed8f0f64 100644 --- a/.github/workflows/packaging-test.yml +++ b/.github/workflows/packaging-test.yml @@ -65,7 +65,7 @@ jobs: - name: Prepare build files run: pipx run nox -s prepare - - uses: pypa/cibuildwheel@v2.17.0 + - uses: pypa/cibuildwheel@v2.19 env: CIBW_ARCHS_MACOS: universal2 CIBW_BUILD: cp39-win_amd64 cp310-manylinux_x86_64 cp38-macosx_universal2 @@ -73,7 +73,7 @@ jobs: config-file: cibuildwheel.toml package-dir: awkward-cpp - - uses: pypa/cibuildwheel@v2.17.0 + - uses: pypa/cibuildwheel@v2.19 if: matrix.os == 'ubuntu-latest' env: CIBW_BUILD: cp312-manylinux_x86_64 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", From 8df4d7d4fb19f0724bbba444e81f780536ce5859 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 11 Jun 2024 12:50:51 -0400 Subject: [PATCH 2/2] Update packaging-test.yml --- .github/workflows/packaging-test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/packaging-test.yml b/.github/workflows/packaging-test.yml index 7af2fabfc1..8317cc58a2 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