Skip to content

Commit

Permalink
Initial Linux arm64 support (#92)
Browse files Browse the repository at this point in the history
* Fix linux arm build issues

* FIx

* Add linux arm ci

* indent

* Limit to 16 jobs for arm build

* Move to main branch only
  • Loading branch information
anakinxc authored Jul 18, 2023
1 parent 1189432 commit c4b710d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
36 changes: 35 additions & 1 deletion .circleci/continue-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -97,4 +130,5 @@ workflows:
when: << pipeline.parameters.build-and-run >>
jobs:
- linux_ut
- linux_arm_ut
- macOS_ut
2 changes: 1 addition & 1 deletion bazel/patches/brpc_pr_2156.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c4b710d

Please sign in to comment.