From 57d87b30c313166b35d9f9d35ae3db6137479c7b Mon Sep 17 00:00:00 2001 From: anakinxc Date: Sun, 10 Dec 2023 15:36:34 +0800 Subject: [PATCH] Enable linux arm ci --- .circleci/test.yml | 10 ++++++++-- bazel/patches/apsi.patch | 20 +++++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index ea16c6f..82fd438 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -29,7 +29,10 @@ jobs: # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor docker: - image: secretflow/ubuntu-base-ci:latest - resource_class: 2xlarge+ + parameters: + resource_class: + type: string + resource_class: << parameters.resource_class >> shell: /bin/bash --login -eo pipefail # Add steps to the job # See: https://circleci.com/docs/2.0/configuration-reference/#steps @@ -143,5 +146,8 @@ workflows: unittest: when: << pipeline.parameters.build-and-run >> jobs: - - linux_ut + - linux_ut: + matrix: + parameters: + resource_class: ["2xlarge", "arm-xlarge"] - macos_ut diff --git a/bazel/patches/apsi.patch b/bazel/patches/apsi.patch index 0de356c..10f50fb 100644 --- a/bazel/patches/apsi.patch +++ b/bazel/patches/apsi.patch @@ -1,5 +1,14 @@ +From c0ce586da1f98b8603e001852b2f467353a728b4 Mon Sep 17 00:00:00 2001 +From: anakinxc +Date: Sun, 10 Dec 2023 15:32:12 +0800 +Subject: [PATCH] patch + +--- + CMakeLists.txt | 27 +++------------------------ + 1 file changed, 3 insertions(+), 24 deletions(-) + diff --git a/CMakeLists.txt b/CMakeLists.txt -index 78d54a6..0b50650 100644 +index 78d54a6..51ec679 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,25 +140,6 @@ else() @@ -39,6 +48,15 @@ index 78d54a6..0b50650 100644 if(APSI_USE_LOG4CPLUS) target_link_libraries(apsi PUBLIC log4cplus::log4cplus) endif() +@@ -299,7 +278,7 @@ endif() + if(APSI_FOURQ_AMD64) + target_compile_options(apsi PUBLIC -D_AMD64_) + message(STATUS "FourQlib optimization: arch=AMD64") +-elseif(APSI_FOURQ_ARM64 AND UNIX) ++elseif(APSI_FOURQ_ARM64 AND UNIX AND APPLE) + message(STATUS "FourQlib optimization: arch=ARM64") + else() + target_compile_options(apsi PUBLIC -D_GENERIC_) @@ -326,7 +305,7 @@ else() endif()