From b901e2c8aa5f29b51ca72abaf138935aa5856993 Mon Sep 17 00:00:00 2001 From: w-gc <25614556+w-gc@users.noreply.github.com> Date: Thu, 9 Jan 2025 22:47:19 +0800 Subject: [PATCH] (chore) refine circle ci scripts (#964) --- .circleci/asan-config.yml | 10 +++++++++- .circleci/continue-config.yml | 19 +++++++++++++++++-- .circleci/release-config.yml | 3 ++- MODULE.bazel | 2 +- src/MODULE.bazel | 2 +- src/libspu/version.h | 2 +- version.bzl | 2 +- 7 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.circleci/asan-config.yml b/.circleci/asan-config.yml index fb123740..d9bcde06 100644 --- a/.circleci/asan-config.yml +++ b/.circleci/asan-config.yml @@ -51,9 +51,17 @@ jobs: command: | set +e declare -i test_status - bazel test //libspu/... --features=asan --test_timeout=500 --ui_event_filters=-info,-debug,-warning --test_output=errors | tee test_result.log; test_status=${PIPESTATUS[0]} + pushd src + bazel test //... --features=asan --test_timeout=500 --ui_event_filters=-info,-debug,-warning --test_output=errors | tee test_result.log; test_status=${PIPESTATUS[0]} + sh ../../devtools/rename-junit-xml.sh + popd + + bazel test //... --features=asan --test_timeout=500 --ui_event_filters=-info,-debug,-warning --test_output=errors | tee -a test_result.log; test_status=${PIPESTATUS[0]} sh ../devtools/rename-junit-xml.sh + + cp -r src/test-results/ test-results/ + cp -r src/test-testlogs/ test-testlogs/ find bazel-testlogs/ -type f -name "test.log" -print0 | xargs -0 tar -cvzf test_logs.tar.gz exit ${test_status} diff --git a/.circleci/continue-config.yml b/.circleci/continue-config.yml index 1f378c42..c468537f 100644 --- a/.circleci/continue-config.yml +++ b/.circleci/continue-config.yml @@ -59,15 +59,30 @@ commands: ../devtools/bazel_cache_setup.py --in_file=../gcs.data --out_file=../gcs.json --min_download - run: name: "build" - command: bazel --version && python3 --version && bazel run //:requirements-dev.update && bazel build <> -c opt --ui_event_filters=-info,-debug,-warning + command: | + bazel --version && python3 --version && bazel run //:requirements-dev.update + + # build module spulib + cd src && bazel build <> -c opt --ui_event_filters=-info,-debug,-warning + + # build module spu + cd - && bazel build <> -c opt --ui_event_filters=-info,-debug,-warning - run: name: "test" command: | set +e declare -i test_status - bazel test <> <> -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors| tee test_result.log; test_status=${PIPESTATUS[0]} + pushd src + bazel test <> <> -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors | tee test_result.log; test_status=${PIPESTATUS[0]} + sh ../../devtools/rename-junit-xml.sh + popd + + bazel test <> <> -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors | tee -a test_result.log; test_status=${PIPESTATUS[0]} sh ../devtools/rename-junit-xml.sh + + cp -r src/test-results/ test-results/ + cp -r src/test-testlogs/ test-testlogs/ find bazel-testlogs/ -type f -name "test.log" -print0 | xargs -0 tar -cvzf test_logs.tar.gz exit ${test_status} diff --git a/.circleci/release-config.yml b/.circleci/release-config.yml index 43094034..67f3bee3 100644 --- a/.circleci/release-config.yml +++ b/.circleci/release-config.yml @@ -53,7 +53,8 @@ commands: conda activate build if [ ! -e "/usr/bin/python3" ]; then ln -s `which python3` /usr/bin/python3; fi - bazel build //:spu_wheel -c opt --@rules_python//python/config_settings:python_version=<< parameters.python_ver >> + cd src && bazel build //... -c opt --ui_event_filters=-info,-debug,-warning + cd - && bazel build //:spu_wheel -c opt --@rules_python//python/config_settings:python_version=<< parameters.python_ver >> python3 -m pip install twine ls bazel-bin/spu*.whl diff --git a/MODULE.bazel b/MODULE.bazel index d359df66..2a8406fd 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -21,7 +21,7 @@ module( name = "spu", - version = "0.9.4.dev20250108", + version = "0.9.4.dev20250109", compatibility_level = 1, ) diff --git a/src/MODULE.bazel b/src/MODULE.bazel index c4208022..5b4919c6 100644 --- a/src/MODULE.bazel +++ b/src/MODULE.bazel @@ -21,7 +21,7 @@ module( name = "spulib", - version = "0.9.4.dev20250108", + version = "0.9.4.dev20250109", compatibility_level = 1, ) diff --git a/src/libspu/version.h b/src/libspu/version.h index f3418798..3b51ecac 100644 --- a/src/libspu/version.h +++ b/src/libspu/version.h @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#define SPU_VERSION "0.9.4.dev20250108" +#define SPU_VERSION "0.9.4.dev20250109" #include diff --git a/version.bzl b/version.bzl index 083b947c..74d916a6 100644 --- a/version.bzl +++ b/version.bzl @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -SPU_VERSION = "0.9.4.dev20250108" +SPU_VERSION = "0.9.4.dev20250109"