-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from secretflow/main
circleci 修复 (#314)
- Loading branch information
Showing
2 changed files
with
51 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,58 +37,50 @@ executors: | |
shell: /bin/bash --login -eo pipefail | ||
|
||
commands: | ||
test: | ||
go_env: | ||
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 | ||
if [ "$ARCH" == "aarch64" ]; then | ||
ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shanghai > /etc/timezone | ||
ln -sf /usr/bin/bash /bin/sh | ||
yum update -y | ||
yum install -y wget make cmake git curl unzip gcc perl-IPC-Cmd | ||
GOLANG_DIR="/usr/local" | ||
GOLANG_VERSION="1.19.7" | ||
GOLANG_URL="https://golang.org/dl/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz" | ||
GOLANG_URL="https://golang.google.cn/dl/go${GOLANG_VERSION}.linux-arm64.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 | ||
tar -C "$GOLANG_DIR" -xzf "go${GOLANG_VERSION}.linux-arm64.tar.gz" | ||
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin | ||
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' | tee -a ~/.bashrc | ||
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $BASH_ENV | ||
fi | ||
fi | ||
test: | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- run: | ||
name: "Install the go module" | ||
command: | | ||
go install google.golang.org/protobuf/cmd/[email protected] | ||
go install github.com/t-yuki/gocover-cobertura@latest | ||
go install github.com/jstemmer/go-junit-report/v2@latest | ||
go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
- run: | ||
name: Test Kuscia | ||
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: | | ||
|
@@ -106,6 +98,7 @@ jobs: | |
executor: <<parameters.executor>> | ||
steps: | ||
- checkout | ||
- go_env | ||
- test | ||
linux_build_kuscia: | ||
parameters: | ||
|
@@ -114,6 +107,7 @@ jobs: | |
executor: <<parameters.executor>> | ||
steps: | ||
- checkout | ||
- go_env | ||
- build_kuscia | ||
image_publish: | ||
docker: | ||
|
@@ -166,19 +160,23 @@ workflows: | |
- << pipeline.parameters.GHA_Action >> | ||
- equal: [ "publish_kuscia_deps", << pipeline.parameters.GHA_Meta >> ] | ||
- equal: [ "publish_pypi", << pipeline.parameters.GHA_Meta >> ] | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /^v.*/ | ||
jobs: | ||
- unit-test: | ||
matrix: | ||
parameters: | ||
executor: [ "linux_x64_executor", "linux_aarch64_executor" ] | ||
- linux_build_kuscia: | ||
matrix: | ||
parameters: | ||
executor: [ "linux_x64_executor", "linux_aarch64_executor" ] | ||
- image_publish: | ||
requires: | ||
- linux_build_kuscia | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /^v.*/ | ||
build-kuscia-deps-workflow: | ||
when: | ||
equal: [ "publish_kuscia_deps", << pipeline.parameters.GHA_Meta >> ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters