From fbe8002dc37c1d3723175e64dcfa3182c35bb827 Mon Sep 17 00:00:00 2001 From: anakinxc <103552181+anakinxc@users.noreply.github.com> Date: Fri, 4 Aug 2023 21:28:35 +0800 Subject: [PATCH] Tweak ci (#283) --- .circleci/config.yml | 4 +- .circleci/continue-config.yml | 2 - ...pypi-config.yml => dev-release-config.yml} | 37 +------------------ .circleci/release-config.yml | 10 ++--- .github/workflows/test-pypi.yml | 8 ++-- 5 files changed, 11 insertions(+), 50 deletions(-) rename .circleci/{testpypi-config.yml => dev-release-config.yml} (54%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 148f38f1..8ba7f92d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/.circleci/continue-config.yml b/.circleci/continue-config.yml index be5a7a80..0a8d2822 100644 --- a/.circleci/continue-config.yml +++ b/.circleci/continue-config.yml @@ -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 diff --git a/.circleci/testpypi-config.yml b/.circleci/dev-release-config.yml similarity index 54% rename from .circleci/testpypi-config.yml rename to .circleci/dev-release-config.yml index 354e0a89..4be14c7c 100644 --- a/.circleci/testpypi-config.yml +++ b/.circleci/dev-release-config.yml @@ -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 @@ -84,7 +52,7 @@ 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 @@ -92,4 +60,3 @@ workflows: publish: jobs: - linux_publish - - macOS_arm64_publish diff --git a/.circleci/release-config.yml b/.circleci/release-config.yml index 3de3b1ae..23e2bee0 100644 --- a/.circleci/release-config.yml +++ b/.circleci/release-config.yml @@ -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: @@ -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: @@ -104,7 +100,7 @@ jobs: linux_publish: docker: - image: secretflow/release-ci:latest - resource_class: 2xlarge + resource_class: 2xlarge+ parameters: python_ver: type: string diff --git a/.github/workflows/test-pypi.yml b/.github/workflows/test-pypi.yml index 95e0e8fc..26cc8b4c 100644 --- a/.github/workflows/test-pypi.yml +++ b/.github/workflows/test-pypi.yml @@ -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: @@ -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 }}