Skip to content

Commit

Permalink
Switch to using the cibuildwheel action and cleanup directory between…
Browse files Browse the repository at this point in the history
… builds

The build directory appears to be left intact between builds for the
different cpython versions. Lets ensure everything is done correctly by
deleting the build directory to force a complete rebuild.
  • Loading branch information
imciner2 committed Jun 19, 2024
1 parent 5e4c611 commit 464354c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
python-version: '3.12'

- name: Build wheels
uses: pypa/cibuildwheel@v2.19.1
env:
CIBW_BUILD: "cp3*"
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*"
Expand All @@ -47,13 +48,13 @@ jobs:
CIBW_TEST_COMMAND: "pytest {project}/tests"
# Skip testing on arm64 Python 3.8 because it uses the x86_64 executable, not the arm executable
CIBW_TEST_SKIP: "cp38-macosx_*:arm64"
# Clean the build directory between builds
CIBW_BEFORE_BUILD: >-
rm -rf {package}/build
CIBW_ENVIRONMENT_LINUX: CMAKE_GENERATOR="Unix Makefiles"
CIBW_ENVIRONMENT_MACOS: CMAKE_GENERATOR="Unix Makefiles" CMAKE_OSX_ARCHITECTURES=${{ matrix.osx_arch }}
CIBW_ENVIRONMENT_WINDOWS: CMAKE_GENERATOR="Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM=x64
CIBW_BUILD_VERBOSITY: 1
run: |
python -m pip install cibuildwheel build
python -m cibuildwheel --output-dir wheelhouse

- name: Build source
if: startsWith(matrix.os, 'ubuntu')
Expand All @@ -74,6 +75,7 @@ jobs:
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse
if-no-files-found: error

merge_artifacts:
name: Merge wheel artifacts from build_wheels OS matrix jobs
Expand Down

0 comments on commit 464354c

Please sign in to comment.