-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test pypi publish * update * format
- Loading branch information
Showing
3 changed files
with
164 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# Copyright 2024 Ant Group Co., Ltd. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Use the latest 2.1 version of CircleCI pipeline process engine. | ||
# See: https://circleci.com/docs/2.0/configuration-reference | ||
version: 2.1 | ||
|
||
parameters: | ||
GHA_Action: | ||
type: string | ||
default: "" | ||
GHA_Actor: | ||
type: string | ||
default: "" | ||
GHA_Event: | ||
type: string | ||
default: "" | ||
|
||
executors: | ||
linux_x64_executor: # declares a reusable executor | ||
docker: | ||
- image: secretflow/release-ci:latest | ||
resource_class: 2xlarge+ | ||
shell: /bin/bash --login -eo pipefail | ||
linux_aarch64_executor: | ||
docker: | ||
- image: secretflow/release-ci-aarch64:latest | ||
resource_class: arm.2xlarge | ||
shell: /bin/bash --login -eo pipefail | ||
macos_arm64_executor: | ||
macos: | ||
xcode: 15.1.0 | ||
resource_class: macos.m1.large.gen1 | ||
|
||
commands: | ||
pip_publish: | ||
parameters: | ||
python_ver: | ||
type: string | ||
steps: | ||
- run: | ||
name: "build package and publish" | ||
command: | | ||
conda create -n build python=<< parameters.python_ver >> -y | ||
conda activate build | ||
python3 -m pip install twine | ||
cd dataproxy_sdk/python | ||
python setup.py bdist_wheel | ||
python3 -m twine upload -r pypi -u __token__ -p ${PYPI_TWINE_TOKEN} dist/*.whl | ||
# Define a job to be invoked later in a workflow. | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs | ||
jobs: | ||
linux_publish: | ||
parameters: | ||
python_ver: | ||
type: string | ||
executor: | ||
type: string | ||
executor: <<parameters.executor>> | ||
steps: | ||
- checkout | ||
- pip_publish: | ||
python_ver: << parameters.python_ver >> | ||
|
||
macOS_publish: | ||
parameters: | ||
python_ver: | ||
type: string | ||
executor: | ||
type: string | ||
executor: <<parameters.executor>> | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Install homebrew dependencies" | ||
command: | | ||
brew install bazelisk cmake ninja libomp wget go | ||
- run: | ||
name: "Install Miniconda" | ||
command: | | ||
wget https://repo.anaconda.com/miniconda/Miniconda3-py310_24.1.2-0-MacOSX-arm64.sh -O ~/miniconda.sh | ||
bash ~/miniconda.sh -b -p $HOME/miniconda | ||
source $HOME/miniconda/bin/activate | ||
conda init zsh bash | ||
- pip_publish: | ||
python_ver: << parameters.python_ver >> | ||
|
||
# Invoke jobs via workflows | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows | ||
workflows: | ||
publish: | ||
jobs: | ||
- linux_publish: | ||
matrix: | ||
parameters: | ||
python_ver: ["3.9", "3.10", "3.11"] | ||
executor: ["linux_x64_executor", "linux_aarch64_executor"] | ||
# This is mandatory to trigger a pipeline when pushing a tag | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
- macOS_publish: | ||
matrix: | ||
parameters: | ||
python_ver: ["3.9", "3.10", "3.11"] | ||
executor: ["macos_arm64_executor"] | ||
# This is mandatory to trigger a pipeline when pushing a tag | ||
filters: | ||
tags: | ||
only: /^v.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2024 Ant Group Co., Ltd. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
--- | ||
name: "Publish SDK Python Package" | ||
on: | ||
release: | ||
types: [published] | ||
permissions: read-all | ||
jobs: | ||
trigger-circleci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: secretflow-serving-deploy | ||
id: secretflow-serving-deploy | ||
uses: CircleCI-Public/[email protected] | ||
env: | ||
CCI_TOKEN: ${{ secrets.CCI_TOKEN }} |