Skip to content

Commit

Permalink
repo-sync-2024-07-16T11:00:15+0800 (#378)
Browse files Browse the repository at this point in the history
* repo-sync-2024-07-16T11:00:15+0800

* repo-sync-2024-07-17T10:27:38+0800

* Fix/circleci (#338)

* fix circleci

* update name

* update name

* update

* update

* update version

* fix golangci-lint

* update sf version

---------

Co-authored-by: yushiqie <[email protected]>
  • Loading branch information
YanZhuangz and yushiqie authored Jul 17, 2024
1 parent 7663c20 commit 8032a3a
Show file tree
Hide file tree
Showing 334 changed files with 10,342 additions and 4,906 deletions.
90 changes: 27 additions & 63 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,75 +27,38 @@ parameters:
executors:
linux_x64_executor: # declares a reusable executor
docker:
- image: secretflow/kuscia-ci:0.4
- image: secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia-ci:0.5
resource_class: 2xlarge
shell: /bin/bash --login -eo pipefail
linux_aarch64_executor:
docker:
- image: secretflow/ubuntu-base-ci:latest
- image: secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia-ci:0.5
resource_class: arm.2xlarge
shell: /bin/bash --login -eo pipefail

commands:
test:
steps:
- checkout
- setup_remote_docker
- run:
name: "install go"
command: |
ARCH=$(uname -m)
case "$ARCH" in
x86_64) ARCH="amd64";;
aarch64) ARCH="arm64";;
*) echo "Unsupported architecture"; exit 1;;
esac
GOLANG_DIR="/usr/local"
GOLANG_VERSION="1.19.7"
GOLANG_URL="https://golang.org/dl/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz"
if ! command -v go &> /dev/null; then
wget "$GOLANG_URL"
tar -C "$GOLANG_DIR" -xzf "go${GOLANG_VERSION}.linux-${ARCH}.tar.gz"
echo 'export PATH=$PATH:/usr/local/go/bin' | tee -a ~/.bashrc
echo 'export PATH=$PATH:/usr/local/go/bin' >> $BASH_ENV
source ~/.bashrc
fi
- run:
name: Test Kuscia
name: "kuscia test"
command: make test
build_kuscia:
steps:
- setup_remote_docker
- run:
name: "install go"
command: |
ARCH=$(uname -m)
case "$ARCH" in
x86_64) ARCH="amd64";;
aarch64) ARCH="arm64";;
*) echo "Unsupported architecture"; exit 1;;
esac
GOLANG_DIR="/usr/local"
GOLANG_VERSION="1.19.7"
GOLANG_URL="https://golang.org/dl/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz"
if ! command -v go &> /dev/null; then
wget "$GOLANG_URL"
tar -C "$GOLANG_DIR" -xzf "go${GOLANG_VERSION}.linux-${ARCH}.tar.gz"
echo 'export PATH=$PATH:/usr/local/go/bin' | tee -a ~/.bashrc
echo 'export PATH=$PATH:/usr/local/go/bin' >> $BASH_ENV
source ~/.bashrc
fi
- checkout
- run:
name: "make build"
command: |
git config --global --add safe.directory ./
make build
- store_artifacts:
path: build
DIR="/tmp/build/linux"
mkdir -p $DIR
cp -rf ./build/linux/* $DIR
- persist_to_workspace:
root: /tmp/build
paths:
- linux
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/configuration-reference/#jobs
jobs:
Expand All @@ -117,37 +80,41 @@ jobs:
- build_kuscia
image_publish:
docker:
- image: secretflow/kuscia-ci:0.4
- image: cimg/deploy:2023.06.1
shell: /bin/bash --login -eo pipefail
steps:
- attach_workspace:
at: build
- checkout
- setup_remote_docker
- attach_workspace:
at: /tmp/build
- run:
name: Build image and publish
command: |
set -ex
mv /tmp/build/linux ./build/
CIRCLETAG=$(echo ${CIRCLE_TAG} | sed 's/v//')
IMAGE = "secretflow/kuscia"
ALIYUN_IMAGE = "secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia"
IMAGE="secretflow/kuscia"
ALIYUN_IMAGE="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia"
# login kuscia dockerhub registry
docker login -u secretflow -p ${DOCKER_DEPLOY_TOKEN}
docker buildx create --name kuscia --platform linux/arm64,linux/amd64 --use
docker buildx build -t ${IMAGE}:${CIRCLETAG} --platform linux/arm64,linux/amd64 -f ./build/dockerfile/kuscia-anolis.Dockerfile . --push
#docker buildx build -t ${IMAGE}:latest --platform linux/arm64,linux/amd64 -f ./build/dockerfile/kuscia-anolis.Dockerfile . --push
# login kuscia aliyun registry
docker login -u ${ALIYUN_DOCKER_USERNAME} -p ${ALIYUN_DOCKER_PASSWORD} secretflow-registry.cn-hangzhou.cr.aliyuncs.com
#docker buildx build -t ${ALIYUN_IMAGE}:latest --platform linux/arm64,linux/amd64 -f ./build/dockerfile/kuscia-anolis.Dockerfile . --push
docker buildx build -t ${ALIYUN_IMAGE}:${CIRCLETAG} --platform linux/arm64,linux/amd64 -f ./build/dockerfile/kuscia-anolis.Dockerfile . --push
# Orchestrate jobs using workflows
# See: https://circleci.com/docs/configuration-reference/#workflows
workflows:
unit-test:
kuscia-workflow:
when:
and:
- not: << pipeline.parameters.GHA_Action >>
Expand All @@ -157,18 +124,15 @@ workflows:
matrix:
parameters:
executor: [ "linux_x64_executor", "linux_aarch64_executor" ]
build-workflow:
when:
not:
or:
- << pipeline.parameters.GHA_Action >>
- equal: [ "publish_kuscia_deps", << pipeline.parameters.GHA_Meta >> ]
- equal: [ "publish_pypi", << pipeline.parameters.GHA_Meta >> ]
jobs:
- linux_build_kuscia:
matrix:
parameters:
executor: [ "linux_x64_executor", "linux_aarch64_executor" ]
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
- image_publish:
requires:
- linux_build_kuscia
Expand Down
32 changes: 5 additions & 27 deletions .circleci/deps-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ parameters:
executors:
linux_x64_executor: # declares a reusable executor
docker:
- image: secretflow/kuscia-ci:0.4
- image: secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia-ci:0.5
resource_class: 2xlarge
shell: /bin/bash --login -eo pipefail
linux_aarch64_executor:
docker:
- image: secretflow/ubuntu-base-ci:latest
- image: secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia-ci:0.5
resource_class: arm.2xlarge
shell: /bin/bash --login -eo pipefail

Expand All @@ -36,28 +36,6 @@ commands:
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: "install go"
command: |
ARCH=$(uname -m)
case "$ARCH" in
x86_64) ARCH="amd64";;
aarch64) ARCH="arm64";;
*) echo "Unsupported architecture"; exit 1;;
esac
GOLANG_DIR="/opt"
GOLANG_VERSION="1.19.7"
GOLANG_URL="https://golang.org/dl/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz"
if ! command -v go &> /dev/null; then
wget "$GOLANG_URL"
tar -C "$GOLANG_DIR" -xzf "go${GOLANG_VERSION}.linux-${ARCH}.tar.gz"
echo 'export PATH=$PATH:/opt/go/bin' | tee -a ~/.bashrc
echo 'export PATH=$PATH:/opt/go/bin' >> $BASH_ENV
source ~/.bashrc
fi
- run:
name: "make build"
command: |
Expand All @@ -78,7 +56,7 @@ jobs:
- build_kuscia_deps
image_publish:
docker:
- image: secretflow/kuscia-ci:0.4
- image: cimg/deploy:2023.06.1
shell: /bin/bash --login -eo pipefail
steps:
- attach_workspace:
Expand All @@ -88,7 +66,7 @@ jobs:
- run:
name: Build image and publish
command: |
DEPS_IMAGE = secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia-deps:<< pipeline.parameters.DEPS_Tag >>
DEPS_IMAGE=secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia-deps:<< pipeline.parameters.DEPS_Tag >>
# login kuscia aliyun registry
docker login -u ${ALIYUN_DOCKER_USERNAME} -p ${ALIYUN_DOCKER_PASSWORD} secretflow-registry.cn-hangzhou.cr.aliyuncs.com
Expand All @@ -107,4 +85,4 @@ workflows:
executor: [ "linux_x64_executor", "linux_aarch64_executor" ]
- image_publish:
requires:
- linux_build_kuscia_deps
- linux_build_kuscia_deps
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/Consulting_issue_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Consulting issue template
description: Thank you for reporting the issue!
body:
- type: markdown
attributes:
value: |
Please ensure that you are reporting the consultation issue on GitHub.(Api Usage/Feature/Document/Others)
Please post on our [discussions](https://github.com/secretflow/kuscia/discussions) instead if you want to ask questions or share ideas.
- type: dropdown
id: issue-type
attributes:
label: Issue Type
description: What type of issue would you like to report?
multiple: false
options:
- Api Usage
- Feature
- Document
- Others
validations:
required: true
- type: dropdown
id: searched-for-existing-issues
attributes:
label: Search for existing issues similar to yours
description: Existing [documents](https://www.secretflow.org.cn/zh-CN/docs/kuscia/main/) and [issues](https://github.com/secretflow/kuscia/issues)
options:
- 'Yes'
- 'No'
validations:
required: true
- type: input
id: kuscia-version
attributes:
label: Kuscia Version
description:
placeholder: e.g., kuscia 0.7.0b0
validations:
required: true
- type: input
id: link
attributes:
label: Link to Relevant Documentation
description: For faster problem-solving, if there are relevant documents, please attach links.
placeholder: e.g.,https://www.secretflow.org.cn/zh-CN/docs/kuscia/main/reference/concepts
validations:
required: false
- type: textarea
id: Question-Details
attributes:
label: Question Details
description: Please provide a detailed description of the problem you have encountered, including the performance of the problem, the difference between expected and actual behavior, and the solutions you have tried. This will help us understand and solve your problem faster.
placeholder: Describe the questions you want to consult and what you want to do
value:
render: shell
validations:
required: true
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Kuscia Issue Template
name: Error Issue Template
description: Thank you for reporting the issue!
body:
- type: markdown
attributes:
value: |
Please make sure that you report a code/doc bug, feature request or build/installation bug on GitHub.
Please ensure that you are reporting the consultation issue on GitHub.(Install/Deploy、Running、Document、Other)
Please post on our [discussions](https://github.com/secretflow/kuscia/discussions) instead if you want to ask questions or share ideas.
- type: dropdown
id: issue-type
Expand All @@ -13,56 +13,56 @@ body:
description: What type of issue would you like to report?
multiple: false
options:
- Bug
- Build/Install
- Feature Request
- Documentation Feature Request
- Documentation Bug
- Install/Deploy
- Running
- Document
- Others
validations:
required: true
- type: dropdown
id: deployment
id: searched-for-existing-issues
attributes:
label: Deployment
description: Kuscia Deployed by
label: Search for existing issues similar to yours
description: Existing [documents](https://www.secretflow.org.cn/zh-CN/docs/kuscia/main/) and [issues](https://github.com/secretflow/kuscia/issues)
options:
- docker
- k8s
- 'Yes'
- 'No'
validations:
required: true
- type: input
id: kuscia-version
id: OS
attributes:
label: Kuscia Version
label: OS Platform and Distribution
description:
placeholder: e.g., kuscia 0.7.0b0
placeholder: e.g., Linux Ubuntu 18.04
validations:
required: true
- type: input
id: OS
id: kuscia-version
attributes:
label: OS Platform and Distribution
label: Kuscia Version
description:
placeholder: e.g., Linux Ubuntu 18.04
placeholder: e.g., kuscia 0.7.0b0
validations:
required: true
- type: input
id: docker-version
- type: dropdown
id: deployment
attributes:
label: Docker version
description: e.g., Docker 20.10.8
placeholder: e.g., Docker 20.10.8
label: Deployment
description: Kuscia Deployed by
options:
- docker
- k8s
validations:
required: false
required: true
- type: input
id: k8s-version
id: deployment-version
attributes:
label: K8s version
label: deployment Version
description:
placeholder: e.g., 1.26.11
placeholder: docker/k8s version
validations:
required: false
required: true
- type: dropdown
id: running-app-type
attributes:
Expand Down Expand Up @@ -128,4 +128,4 @@ body:
value:
render: shell
validations:
required: true
required: true
Loading

0 comments on commit 8032a3a

Please sign in to comment.