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

Add dev release #102

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
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: /.*/