diff --git a/.github/workflows/wheel-smoke.yml b/.github/workflows/wheel-smoke.yml new file mode 100644 index 0000000000..622faa5c28 --- /dev/null +++ b/.github/workflows/wheel-smoke.yml @@ -0,0 +1,26 @@ + +name: pygambit wheel smoke test + +on: + pull_request: + +jobs: + windows-cp314: + runs-on: windows-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + + steps: + - uses: actions/checkout@v7 + - name: Set up Python + uses: actions/setup-python@v7 + with: + python-version: '3.x' + - name: Set up dependencies + run: | + python -m pip install --upgrade pip + pip install cibuildwheel + - name: Build and smoke-test cp314 Windows wheel + run: | + python -m cibuildwheel --output-dir wheelhouse/ + env: + CIBW_BUILD: "cp314-win_amd64" diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index c7232128c8..fecbdf1310 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -10,8 +10,14 @@ on: workflow_dispatch: jobs: - windows: - runs-on: windows-latest + wheels: + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest, macos-14] + python-tag: [cp310, cp311, cp312, cp313, cp314] + + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v7 @@ -22,14 +28,15 @@ jobs: - name: Set up dependencies run: | python -m pip install --upgrade pip - pip install cython nose2 wheel lxml numpy scipy cibuildwheel - - name: Build wheels + pip install cibuildwheel + - name: Build and smoke-test wheel run: | python -m cibuildwheel --output-dir wheelhouse/ env: - CIBW_SKIP: "pp*" + CIBW_BUILD: "${{ matrix.python-tag }}-*" - uses: actions/upload-artifact@v7 with: + name: wheels-${{ matrix.os }}-${{ matrix.python-tag }} path: ./wheelhouse/*.whl sdist: diff --git a/pyproject.toml b/pyproject.toml index 6826e78f2d..a372019429 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -137,6 +137,10 @@ markers = [ "catalog_update: tests of catalog/build.py", ] +[tool.cibuildwheel] +skip = "pp* *t" +test-command = "python -c \"import pygambit; g = pygambit.Game.new_table([2, 2]); assert g\"" + [tool.setuptools] packages = ["pygambit", "pygambit.cli"] package-dir = { "pygambit" = "src/pygambit" }