Skip to content

Commit

Permalink
Update continue-config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinxc authored Nov 9, 2023
1 parent d486b18 commit b0674fd
Showing 1 changed file with 51 additions and 53 deletions.
104 changes: 51 additions & 53 deletions .circleci/continue-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,61 +104,59 @@ jobs:
resource_class: macos.m1.large.gen1
steps:
- checkout
- when:
steps:
- restore_cache:
name: "Restore build cache"
key: spu-build-comp-{{ arch }}-
- run:
name: Checkout devtools
command: git clone https://github.com/secretflow/devtools.git ../devtools
- run:
name: Decompress cache
command: sh ../devtools/decompress-build-cache.sh spu_build_cache
- run:
name: "Install homebrew dependencies"
command: brew install bazelisk cmake ninja libomp wget go md5sha1sum
- 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
pip install -r requirements.txt
pip install -r requirements-dev.txt
- run:
name: "build"
command: bazel build //... -c opt --ui_event_filters=-info,-debug,-warning --disk_cache=~/.cache/spu_build_cache
- run:
name: "test"
command: |
set +e
declare -i test_status
bazel test //... -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors --disk_cache=~/.cache/spu_build_cache | tee test_result.log; test_status=${PIPESTATUS[0]}
- restore_cache:
name: "Restore build cache"
key: spu-build-comp-{{ arch }}-
- run:
name: Checkout devtools
command: git clone https://github.com/secretflow/devtools.git ../devtools
- run:
name: Decompress cache
command: sh ../devtools/decompress-build-cache.sh spu_build_cache
- run:
name: "Install homebrew dependencies"
command: brew install bazelisk cmake ninja libomp wget go md5sha1sum
- 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
pip install -r requirements.txt
pip install -r requirements-dev.txt
- run:
name: "build"
command: bazel build //... -c opt --ui_event_filters=-info,-debug,-warning --disk_cache=~/.cache/spu_build_cache
- run:
name: "test"
command: |
set +e
declare -i test_status
bazel test //... -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors --disk_cache=~/.cache/spu_build_cache | tee test_result.log; test_status=${PIPESTATUS[0]}
sh ../devtools/rename-junit-xml.sh
find bazel-bin/ -perm +111 -type f -name "*_test" -print0 | xargs -0 tar -cvzf test_binary.tar.gz
find bazel-testlogs/ -type f -name "test.log" -print0 | xargs -0 tar -cvzf test_logs.tar.gz
sh ../devtools/rename-junit-xml.sh
find bazel-bin/ -perm +111 -type f -name "*_test" -print0 | xargs -0 tar -cvzf test_binary.tar.gz
find bazel-testlogs/ -type f -name "test.log" -print0 | xargs -0 tar -cvzf test_logs.tar.gz
exit ${test_status}
- run:
name: Cleanup and compress cache
command: |
sh ../devtools/clean_disk_cache.sh ~/.cache/spu_build_cache
sh ../devtools/compress-build-cache.sh spu_build_cache
when: always
- save_cache:
key: spu-build-comp-{{ arch }}-{{ .Environment.CIRCLE_BUILD_NUM }}
paths:
- ~/.cache/spu_build_cache.tar.gz
when: always
- store_test_results:
path: test-results
- store_artifacts:
path: test_binary.tar.gz
- store_artifacts:
path: test_logs.tar.gz
exit ${test_status}
- run:
name: Cleanup and compress cache
command: |
sh ../devtools/clean_disk_cache.sh ~/.cache/spu_build_cache
sh ../devtools/compress-build-cache.sh spu_build_cache
when: always
- save_cache:
key: spu-build-comp-{{ arch }}-{{ .Environment.CIRCLE_BUILD_NUM }}
paths:
- ~/.cache/spu_build_cache.tar.gz
when: always
- store_test_results:
path: test-results
- store_artifacts:
path: test_binary.tar.gz
- store_artifacts:
path: test_logs.tar.gz

# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
Expand Down

0 comments on commit b0674fd

Please sign in to comment.