From aed5822ece7637fe6f29ec91b62f1d5b49236ac2 Mon Sep 17 00:00:00 2001 From: CnlPepper Date: Sun, 27 Jul 2025 21:20:49 +0100 Subject: [PATCH] Experimental cibuildwheel setup. --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 3 +-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..4bb0c729 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: Build + +on: [push, pull_request] + +jobs: + build_wheels: + name: Build wheels on ubuntu-latest + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build wheels + uses: pypa/cibuildwheel@v3.1.1 + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels + path: ./wheelhouse/*.whl + build_sdist: + name: Build SDist + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Optional, use if you use setuptools_scm + submodules: true # Optional, use if you have submodules + - name: Build SDist + run: pipx run build --sdist + - uses: actions/upload-artifact@v4 + with: + name: cibw-sdist + path: dist/*.tar.gz \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9734d021..1038726b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,6 @@ jobs: strategy: fail-fast: false matrix: - numpy-version: ["numpy"] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: Checkout code @@ -21,7 +20,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install Python dependencies - run: python -m pip install --prefer-binary meson-python meson ninja setuptools setuptools-scm "cython>=3.1" "matplotlib>=3,<4" ${{ matrix.numpy-version }} + run: python -m pip install --prefer-binary meson-python meson ninja setuptools setuptools-scm "cython>=3.1" "matplotlib>=3,<4" numpy - name: Build and install Raysect run: dev/install_editable.sh - name: Run tests