Skip to content

Commit

Permalink
Update wheel build action. (#709)
Browse files Browse the repository at this point in the history
* Update wheel build action.

* Tweak.

* Try Python 3.11

* Wheel builds failed, try and fix.

        /private/var/folders/3s/vfzpb5r51gs6y328rmlgzm7c0000gn/T/pip-build-env-e7qklsbm/overlay/lib/python3.8/site-packages/nanobind/src/nb_type.cpp:207:13: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer

* Fix

* Fix.

---------

Co-authored-by: Garth N. Wells <[email protected]>
  • Loading branch information
jhale and garth-wells authored Nov 8, 2023
1 parent 9d6c645 commit 6f9f5d5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
os: [ubuntu-latest, macos-12, macos-13]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.basix_ref }}

Expand All @@ -54,7 +54,7 @@ jobs:
platforms: arm64

- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
uses: pypa/cibuildwheel@v2.16.2

- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand All @@ -65,7 +65,7 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.basix_ref }}

Expand All @@ -92,14 +92,14 @@ jobs:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.5.1
- uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ github.event.inputs.pypi_publish == 'true' }}
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
repository_url: https://upload.pypi.org/legacy/

- uses: pypa/gh-action-pypi-publish@v1.5.1
- uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ github.event.inputs.test_pypi_publish == 'true' }}
with:
user: __token__
Expand Down
7 changes: 6 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
cmake_minimum_required(VERSION 3.19)

PROJECT(basix_nanobind VERSION "0.8.0.0" LANGUAGES CXX)
# nanobind uses aligned deallocators only present on macOS > 10.14
if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
endif()
project(basix_nanobind VERSION "0.8.0.0" LANGUAGES CXX)

# Set C++ standard
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)


# See https://gitlab.kitware.com/cmake/cmake/-/issues/16414
if(TARGET basix)
add_library(Basix::basix ALIAS basix)
Expand Down

0 comments on commit 6f9f5d5

Please sign in to comment.