Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable aarch64 wheel builds #2114

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 32 additions & 30 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ on:
type: boolean
default: false
push:
tags:
- "*"
# tags:
# - "*"

env:
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TILEDB: ${{ inputs.version }}
Expand All @@ -30,6 +30,7 @@ jobs:
matrix:
buildplat:
- [ubuntu-22.04, manylinux_x86_64]
- [linux-arm64-ubuntu24, manylinux_aarch64]
- [macos-13, macosx_x86_64]
- [macos-14, macosx_arm64]
- [windows-2022, win_amd64]
Expand All @@ -39,7 +40,7 @@ jobs:
- uses: actions/checkout@v4

- name: "Brew setup on macOS" # x-ref c8e49ba8f8b9ce
if: ${{ startsWith(matrix.os, 'macos-') == true }}
if: ${{ startsWith(matrix.buildplat[0], 'macos-') == true }}
run: |
set -e pipefail
brew update
Expand Down Expand Up @@ -99,6 +100,7 @@ jobs:
- macos-14
- windows-2022
- ubuntu-22.04
- linux-arm64-ubuntu24
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -134,30 +136,30 @@ jobs:
pip uninstall -y pandas
pytest -vv --showlocals $PROJECT_CWD

upload_pypi:
needs: [build_wheels, test_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
outputs:
package_version: ${{ steps.get_package_version.outputs.package_version }}
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true

- id: get_package_version
run: |
echo "package_version=$(ls dist/ | head -n 1 | cut -d - -f 2)" >> "$GITHUB_OUTPUT"

- name: Upload to test-pypi
if: inputs.test_pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

- name: Upload to pypi
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1
# upload_pypi:
# needs: [build_wheels, test_sdist]
# runs-on: ubuntu-latest
# environment: pypi
# permissions:
# id-token: write
# outputs:
# package_version: ${{ steps.get_package_version.outputs.package_version }}
# steps:
# - uses: actions/download-artifact@v4
# with:
# path: dist
# merge-multiple: true
#
# - id: get_package_version
# run: |
# echo "package_version=$(ls dist/ | head -n 1 | cut -d - -f 2)" >> "$GITHUB_OUTPUT"
#
# - name: Upload to test-pypi
# if: inputs.test_pypi
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/
#
# - name: Upload to pypi
# if: startsWith(github.ref, 'refs/tags/')
# uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ if (NOT TileDB_FOUND)
message(STATUS "Downloading TileDB default version ...")
# Download latest release
fetch_prebuilt_tiledb(
VERSION 2.26.2
RELLIST_HASH SHA256=86c19d7c5246cb18e370a4272cead63ea84bd651789842e618de4d57d4510522
VERSION 2.27.0-rc3
RELLIST_HASH SHA256=cfe40c6ec0fd60c3df18833019a1239543b630553bf01a3016997176f86bd9a5
)
endif()
find_package(TileDB REQUIRED)
Expand Down
9 changes: 7 additions & 2 deletions cmake/DownloadTileDB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ function(detect_artifact_name OUT_VAR)
SET(${OUT_VAR} TILEDB_MACOS-ARM64 PARENT_SCOPE)
endif()
else() # Linux
SET(${OUT_VAR} TILEDB_LINUX-X86_64 PARENT_SCOPE)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
SET(${OUT_VAR} TILEDB_LINUX-ARM64 PARENT_SCOPE)
else()
SET(${OUT_VAR} TILEDB_LINUX-X86_64 PARENT_SCOPE)
endif()
endif()
endfunction()

Expand All @@ -113,6 +117,7 @@ function(fetch_prebuilt_tiledb)
if(NOT FETCH_PREBUILT_TILEDB_ARTIFACT_NAME)
detect_artifact_name(FETCH_PREBUILT_TILEDB_ARTIFACT_NAME)
endif()
message(STATUS "Detected TileDB artifact name: ${FETCH_PREBUILT_TILEDB_ARTIFACT_NAME}")

string(STRIP ${HASH_${FETCH_PREBUILT_TILEDB_ARTIFACT_NAME}} HASH_${FETCH_PREBUILT_TILEDB_ARTIFACT_NAME})
FetchContent_Declare(
Expand All @@ -122,4 +127,4 @@ function(fetch_prebuilt_tiledb)
)
FetchContent_MakeAvailable(tiledb)
set(TileDB_DIR ${tiledb_SOURCE_DIR}/lib/cmake/TileDB PARENT_SCOPE)
endfunction()
endfunction()
Loading