diff --git a/.circleci/config.yml b/.circleci/config.yml index 1ad2d024..60c39be0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,6 +27,7 @@ workflows: config-path: .circleci/continue-config.yml mapping: | yacl/.* build-and-run true + bazel/.* build-and-run true .bazelrc build-and-run true .circleci/.* build-and-run true bazel/.* build-and-run true diff --git a/.circleci/continue-config.yml b/.circleci/continue-config.yml index 3aab412b..3b7a447f 100644 --- a/.circleci/continue-config.yml +++ b/.circleci/continue-config.yml @@ -28,7 +28,7 @@ jobs: # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor docker: - - image: registry.hub.docker.com/secretflow/ubuntu-base-ci:0.4 + - image: secretflow/ubuntu-base-ci:latest resource_class: 2xlarge # Add steps to the job # See: https://circleci.com/docs/2.0/configuration-reference/#steps @@ -53,6 +53,39 @@ jobs: path: test_binary.tar.gz - store_artifacts: path: test_logs.tar.gz + linux_arm_ut: + # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor + docker: + - image: secretflow/ubuntu-base-ci:latest + resource_class: arm-xlarge + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + - checkout + - when: + condition: + equal: [ main, << pipeline.git.branch >> ] + steps: + - run: + name: "build and test" + command: | + set +e + declare -i test_status + bazel test //... -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors --jobs 16 | tee test_result.log; test_status=${PIPESTATUS[0]} + + git clone https://github.com/secretflow/devtools.git + sh devtools/rename-junit-xml.sh + + find bazel-bin/ -executable -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} + - store_test_results: + path: test-results + - store_artifacts: + path: test_binary.tar.gz + - store_artifacts: + path: test_logs.tar.gz macOS_ut: macos: xcode: 14.2 @@ -97,4 +130,5 @@ workflows: when: << pipeline.parameters.build-and-run >> jobs: - linux_ut + - linux_arm_ut - macOS_ut diff --git a/bazel/patches/brpc_pr_2156.patch b/bazel/patches/brpc_pr_2156.patch index effe6f9c..e246b8fb 100644 --- a/bazel/patches/brpc_pr_2156.patch +++ b/bazel/patches/brpc_pr_2156.patch @@ -240,7 +240,7 @@ index e81f631cc..4f77e9587 100644 } -#if defined(NOT_ALLOW_OPTIMIZE_THREAD_LOCAL_ACCESS) -+#ifdef NDEBUG ++#if defined(__aarch64__) || defined(__arm64__) +// Clang compiler is incorrectly caching the address of thread_local variables +// across a suspend-point. The following macros used to disable the volatile +// thread local access optimization.