Skip to content

Commit

Permalink
Tweak ci (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinxc authored Aug 4, 2023
1 parent 28b6f56 commit fbe8002
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 50 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ workflows:
only: /.*/
testpypi-workflow:
when:
equal: [ "test_pypi", << pipeline.parameters.GHA_Meta >> ]
equal: [ "dev_publish", << pipeline.parameters.GHA_Meta >> ]
jobs:
- continuation/continue:
configuration_path: .circleci/testpypi-config.yml
configuration_path: .circleci/dev-release-config.yml
2 changes: 0 additions & 2 deletions .circleci/continue-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ jobs:
macOS_ut:
macos:
xcode: 14.3
environment:
HOMEBREW_NO_AUTO_UPDATE: 1
resource_class: macos.m1.large.gen1
steps:
- checkout
Expand Down
37 changes: 2 additions & 35 deletions .circleci/testpypi-config.yml → .circleci/dev-release-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,42 +34,10 @@ parameters:
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
macOS_arm64_publish:
macos:
xcode: 14.2
environment:
HOMEBREW_NO_AUTO_UPDATE: 1
resource_class: macos.m1.large.gen1
steps:
- checkout
- run:
name: "Install homebrew dependencies"
command: |
brew install bazel cmake ninja libomp wget go
(cd /opt/homebrew/Cellar/bazel/*.*.*/libexec/bin && curl -fLO https://github.com/bazelbuild/bazel/releases/download/6.2.1/bazel-6.2.1-darwin-arm64 && chmod +x bazel-6.2.1-darwin-arm64)
- 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 zsh bash
- run:
name: "build package and publish"
command: |
set +e
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 testpypi -u __token__ -p ${TEST_PYPI_TWINE_TOKEN} dist/*.whl
linux_publish:
docker:
- image: secretflow/release-ci:latest
resource_class: 2xlarge
resource_class: 2xlarge+
shell: /bin/bash --login -eo pipefail
steps:
- checkout
Expand All @@ -84,12 +52,11 @@ jobs:
python3 -m pip install twine
ls dist/*.whl
python3 -m twine upload -r testpypi -u __token__ -p ${TEST_PYPI_TWINE_TOKEN} 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
- macOS_arm64_publish
10 changes: 3 additions & 7 deletions .circleci/release-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ parameters:
jobs:
macOS_x64_publish:
macos:
xcode: 14.2
environment:
HOMEBREW_NO_AUTO_UPDATE: 1
xcode: 14.3
resource_class: macos.x86.medium.gen2
parameters:
python_ver:
Expand Down Expand Up @@ -68,9 +66,7 @@ jobs:
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
xcode: 14.3
resource_class: macos.m1.large.gen1
parameters:
python_ver:
Expand Down Expand Up @@ -104,7 +100,7 @@ jobs:
linux_publish:
docker:
- image: secretflow/release-ci:latest
resource_class: 2xlarge
resource_class: 2xlarge+
parameters:
python_ver:
type: string
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: "Publish TestPypi Package"
name: "Publish Dev Package"

on:
workflow_dispatch:
Expand All @@ -21,10 +21,10 @@ jobs:
trigger-circleci:
runs-on: ubuntu-latest
steps:
- name: secretflow-spu-testpypi
id: secretflow-spu-testpypi
- name: secretflow-spu-dev-publish
id: secretflow-spu-dev-publish
uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.1.0
with:
GHA_Meta: "test_pypi"
GHA_Meta: "dev_publish"
env:
CCI_TOKEN: ${{ secrets.CCI_TOKEN }}

0 comments on commit fbe8002

Please sign in to comment.