Skip to content

Commit

Permalink
Add dev release
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinxc committed Nov 17, 2023
1 parent f3c79d6 commit a804e59
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ workflows:
jobs:
- continuation/continue:
configuration_path: .circleci/release-config.yml
# This is mandatory to trigger a pipeline when pushing a tag
filters:
tags:
only: /.*/
only: /.*(?<!dev\d{8})$/
- continuation/continue:
configuration_path: .circleci/dev-release-config.yml
# This is mandatory to trigger a pipeline when pushing a tag
filters:
tags:
only: /.*(?<=dev\d{8})$/
80 changes: 80 additions & 0 deletions .circleci/dev-release-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# 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: ""


# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
linux_publish:
docker:
- image: registry.hub.docker.com/secretflow/release-ci:latest
resource_class: 2xlarge
shell: /bin/bash --login -eo pipefail
steps:
- checkout
- run:
name: "build package and publish"
command: |
conda create -n build python=3.8 -y
conda activate build
sh ./build_wheel_entrypoint.sh
ls dist/*.whl
python3 -m pip install twine
python3 -m twine upload -r pypi -u __token__ -p ${PYPI_TWINE_TOKEN} dist/*.whl
macOS_arm64_publish:
macos:
xcode: 14.2
environment:
HOMEBREW_NO_AUTO_UPDATE: 1
resource_class: macos.m1.large.gen1
steps:
- checkout
- run:
name: Install dependencies
command: |
brew install bazelisk cmake ninja libomp wget
- run:
name: Install Miniconda
command: |
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_23.1.0-1-MacOSX-arm64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda
source $HOME/miniconda/bin/activate
conda init bash zsh
- run:
name: "build package and publish"
command: |
conda create -n build python=3.8 -y
conda activate build
sh ./build_wheel_entrypoint.sh
ls dist/*.whl
python3 -m pip install twine
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:
dev-publish:
jobs:
- linux_publish:
filters:
tags:
only: /.*/
- macOS_arm64_publish:
filters:
tags:
only: /.*/

0 comments on commit a804e59

Please sign in to comment.