Skip to content

Commit

Permalink
Add aarch64 publish (#434)
Browse files Browse the repository at this point in the history
Resolved #224
  • Loading branch information
anakinxc authored Dec 12, 2023
1 parent 26f85f5 commit 9f6d31b
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 8 deletions.
28 changes: 25 additions & 3 deletions .circleci/dev-release-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ parameters:
type: string
default: ""


# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
linux_publish:
linux_x64_publish:
docker:
- image: secretflow/release-ci:latest
resource_class: 2xlarge+
Expand All @@ -52,6 +51,25 @@ jobs:
python3 -m pip install twine
ls dist/*.whl
python3 -m twine upload -r pypi -u __token__ -p ${PYPI_TWINE_TOKEN} dist/*.whl
linux_aarch64_publish:
docker:
- image: secretflow/release-ci-aarch64:latest
resource_class: arm.2xlarge
shell: /bin/bash --login -eo pipefail
steps:
- checkout
- run:
name: "build package and publish"
command: |
conda update -n base -c defaults conda -y
conda create -n build python=3.8 -y
conda activate build
sh ./build_wheel_entrypoint.sh
python3 -m pip install twine
ls dist/*.whl
python3 -m twine upload -r pypi -u __token__ -p ${PYPI_TWINE_TOKEN} dist/*.whl
macOS_arm64_publish:
macos:
Expand Down Expand Up @@ -88,7 +106,11 @@ jobs:
workflows:
dev-publish:
jobs:
- linux_publish:
- linux_x64_publish:
filters:
tags:
only: /.*/
- linux_aarch64_publish:
filters:
tags:
only: /.*/
Expand Down
39 changes: 34 additions & 5 deletions .circleci/release-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ parameters:
type: string
default: ""


# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
Expand Down Expand Up @@ -95,7 +94,7 @@ jobs:
ls dist/*.whl
python3 -m twine upload -r pypi -u __token__ -p ${PYPI_TWINE_TOKEN} dist/*.whl
linux_publish:
linux_x64_publish:
docker:
- image: secretflow/release-ci:latest
resource_class: 2xlarge+
Expand All @@ -116,14 +115,44 @@ jobs:
python3 -m pip install twine
ls dist/*.whl
python3 -m twine upload -r pypi -u __token__ -p ${PYPI_TWINE_TOKEN} dist/*.whl
linux_aarch64_publish:
docker:
- image: secretflow/release-ci-aarch64:latest
resource_class: arm.2xlarge
parameters:
python_ver:
type: string
shell: /bin/bash --login -eo pipefail
steps:
- checkout
- run:
name: "build package and publish"
command: |
conda update -n base -c defaults conda -y
conda create -n build python=<< parameters.python_ver >> -y
conda activate build
sh ./build_wheel_entrypoint.sh
python3 -m pip install twine
ls dist/*.whl
python3 -m twine upload -r pypi -u __token__ -p ${PYPI_TWINE_TOKEN} dist/*.whl
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
publish:
jobs:
- linux_publish:
- linux_x64_publish:
matrix:
parameters:
python_ver: ["3.8", "3.9", "3.10", "3.11"]
# This is mandatory to trigger a pipeline when pushing a tag
filters:
tags:
only: /.*/
- linux_aarch64_publish:
matrix:
parameters:
python_ver: ["3.8", "3.9", "3.10", "3.11"]
Expand All @@ -134,15 +163,15 @@ workflows:
- macOS_x64_publish:
matrix:
parameters:
python_ver: ['3.8', '3.9', '3.10', '3.11']
python_ver: ["3.8", "3.9", "3.10", "3.11"]
# This is mandatory to trigger a pipeline when pushing a tag
filters:
tags:
only: /.*/
- macOS_arm64_publish:
matrix:
parameters:
python_ver: ['3.8', '3.9', '3.10', '3.11']
python_ver: ["3.8", "3.9", "3.10", "3.11"]
# This is mandatory to trigger a pipeline when pushing a tag
filters:
tags:
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ def has_ext_modules(self):
plat_name = "macosx_12_0_x86_64"
else:
plat_name = "macosx_12_0_arm64"
elif platform.machine() == "aarch64":
# Linux aarch64
plat_name = "manylinux_2_28_aarch64"

setuptools.setup(
name=setup_spec.name,
Expand Down

0 comments on commit 9f6d31b

Please sign in to comment.