diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ddb950b..d0dd24dc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,6 +58,36 @@ jobs: - store_artifacts: path: dist + build-linux-aarch64-core: + machine: + image: ubuntu-2204:2023.04 + resource_class: arm.medium + environment: + CIBW_ARCHS: "aarch64" + CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*" + steps: + - checkout + - compress_ext + - restore_cache: + key: ext-linux-aarch64-{{ checksum "ext_concat" }} + - run: + name: Install build dependencies and cibuildwheel + command: | + sudo apt-get update + sudo apt-get install -y python3 python3-venv python3-pip git build-essential + python3 -m pip install --upgrade pip + python3 -m pip install cibuildwheel + - run: + name: Build wheels (Linux aarch64) + command: | + cibuildwheel --platform linux --archs aarch64 + - save_cache: + key: ext-linux-aarch64-{{ checksum "ext_concat" }} + paths: + - src/tmlt/core/ext + - store_artifacts: + path: wheelhouse + workflows: build-core-mac-wheels-workflow: jobs: @@ -73,3 +103,9 @@ workflows: only: dev tags: only: /.*/ + - build-linux-aarch64-core: + filters: + branches: + only: dev + tags: + only: /.*/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad615655..3e04cda8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -124,6 +124,32 @@ package: interruptible: true tags: [saas-linux-large-amd64] +# Build Linux aarch64 wheels via cibuildwheel/QEMU in Docker +package_linux_aarch64: + extends: .base + stage: setup + needs: [] + image: registry.gitlab.com/tumult-labs/ops/ci/linux:python3.9 + services: + - name: docker:dind + entrypoint: ["env", "-u", "DOCKER_HOST"] + command: ["dockerd-entrypoint.sh"] + variables: + DOCKER_HOST: tcp://docker:2375/ + DOCKER_DRIVER: overlay2 + DOCKER_TLS_CERTDIR: "" + # Tell cibuildwheel to build only Linux aarch64 wheels + CIBW_ARCHS_LINUX: "aarch64" + CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*" + script: + - curl -sSL https://get.docker.com/ | sh + - nox -s build + artifacts: + paths: ["dist/"] + timeout: 45m + interruptible: true + tags: [saas-linux-large-amd64] + # Requires the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY variables to be set. # We use an access key from the core-ci AWS user, which has permissions to list # and modify all objects in the tumult.core-wheel-cache bucket. @@ -467,7 +493,7 @@ audit: publish: stage: release - dependencies: [get_mac_wheels, package] + dependencies: [get_mac_wheels, package, package_linux_aarch64] image: registry.gitlab.com/tumult-labs/ops/ci/linux:python3.9 script: - poetry publish -u __token__ -p "${RELEASE_PYPI_TOKEN}" diff --git a/ext/build.py b/ext/build.py index dab39abf..08f01503 100755 --- a/ext/build.py +++ b/ext/build.py @@ -11,7 +11,7 @@ build_command = ["bash", str(build_dir / "build.sh")] SUPPORTED_PLATFORMS = ["Linux", "Darwin"] -SUPPORTED_ARCHITECTURES = ["x86_64", "arm64"] +SUPPORTED_ARCHITECTURES = ["x86_64", "arm64", "aarch64"] def check_platform(): diff --git a/pyproject.toml b/pyproject.toml index 23063992..a9e82cf8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ readme = "README.md" authors = [] license = "Apache-2.0" -dynamic = ["version"] +version = "0.18.2+hotfix.pr" classifiers = [ "Development Status :: 4 - Beta", @@ -110,13 +110,9 @@ scripting = [ # Build configuration [build-system] -requires = ["hatchling", "uv-dynamic-versioning"] +requires = ["hatchling"] build-backend = "hatchling.build" -[tool.hatch.version] -source = "uv-dynamic-versioning" - -[tool.uv-dynamic-versioning] vcs = "git" style = "semver" # The default configuration expect vX.Y.Z, but we haven't been using the 'v' prefix.