Skip to content

Commit 1628eb0

Browse files
authored
ci: disable ThriftController by default (#152)
1 parent 20c4185 commit 1628eb0

File tree

5 files changed

+16
-47
lines changed

5 files changed

+16
-47
lines changed

.github/workflows/build.yml

-21
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,6 @@ jobs:
9292
with:
9393
sdk-version: 22621
9494

95-
# Download host arch tools for Thrift of ThriftControlUnit
96-
- name: Download host tools from MaaDeps
97-
env:
98-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99-
run: |
100-
python3 tools/maadeps-download.py x64-windows
101-
10295
- name: Bootstrap MaaDeps
10396
env:
10497
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -167,13 +160,6 @@ jobs:
167160
with:
168161
remove_stale_cache: false
169162

170-
# Download host arch tools for Thrift of ThriftControlUnit
171-
- name: Download host tools from MaaDeps
172-
env:
173-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
174-
run: |
175-
python3 tools/maadeps-download.py x64-linux
176-
177163
- name: Bootstrap MaaDeps
178164
env:
179165
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -237,13 +223,6 @@ jobs:
237223
brew install llvm
238224
# 17
239225

240-
# Download host arch tools for Thrift of ThriftControlUnit
241-
- name: Download host tools from MaaDeps
242-
env:
243-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
244-
run: |
245-
python3 tools/maadeps-download.py x64-osx
246-
247226
- name: Bootstrap MaaDeps
248227
env:
249228
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CMakeLists.txt

+12-8
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules")
66
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
77
set(CMAKE_MAP_IMPORTED_CONFIG_DebWithRelDeps "DebWithRelDeps;Release;")
88

9-
set(Boost_NO_WARN_NEW_VERSIONS 1)
10-
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
9+
set(Boost_NO_WARN_NEW_VERSIONS ON)
10+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1111

1212
option(USE_MAADEPS "use third-party libraries built by MaaDeps" ON)
1313

1414
option(WITH_ADB_CONTROLLER "build with adb controller" ON)
15-
option(WITH_THRIFT_CONTROLLER "build with thrift controller" ON)
16-
option(WITH_DBG_CONTROLLER "build with debugging controller" ON)
1715
option(WITH_WIN32_CONTROLLER "build with win32 controller" ON)
16+
option(WITH_DBG_CONTROLLER "build with debugging controller" ON)
17+
option(WITH_THRIFT_CONTROLLER "build with thrift controller" OFF)
1818

1919
option(WITH_GRPC "build with protobuf and grpc" OFF)
2020

@@ -42,22 +42,21 @@ if(NOT WITH_GRPC)
4242
set(BUILD_GRPC_CLI OFF)
4343
set(BUILD_GRPC_TESTING OFF)
4444
endif()
45+
4546
if(NOT WITH_DBG_CONTROLLER)
4647
message(STATUS "Dbg controller is disabled, disable BUILD_PIPELINE_TESTING")
4748
set(BUILD_PIPELINE_TESTING OFF)
4849
endif()
50+
4951
if(WITH_WIN32_CONTROLLER AND NOT WIN32)
5052
message(STATUS "Not on Windows, disable WITH_WIN32_CONTROLLER")
5153
set(WITH_WIN32_CONTROLLER OFF)
5254
endif()
53-
if(WITH_THRIFT_CONTROLLER AND MAA_CROSSCOMPILE)
54-
message(STATUS "Cross-compiling, disable WITH_THRIFT_CONTROLLER")
55-
set(WITH_THRIFT_CONTROLLER OFF)
56-
endif()
5755

5856
if(WITH_THRIFT_CONTROLLER)
5957
include(${PROJECT_SOURCE_DIR}/cmake/thrift-gen.cmake)
6058
endif()
59+
6160
if(WITH_GRPC)
6261
include(${PROJECT_SOURCE_DIR}/cmake/grpc-gen.cmake)
6362
endif()
@@ -67,9 +66,11 @@ find_package(Boost REQUIRED COMPONENTS system)
6766
find_package(ZLIB REQUIRED)
6867
find_package(fastdeploy_ppocr REQUIRED)
6968
find_package(ONNXRuntime)
69+
7070
if(WITH_THRIFT_CONTROLLER)
7171
find_package(Thrift CONFIG REQUIRED)
7272
endif()
73+
7374
if(WITH_GRPC)
7475
find_package(protobuf CONFIG REQUIRED)
7576
find_package(gRPC CONFIG REQUIRED)
@@ -82,13 +83,16 @@ add_subdirectory(tools)
8283
if(BUILD_SAMPLE)
8384
add_subdirectory(sample/cpp)
8485
endif()
86+
8587
if(BUILD_PIPELINE_TESTING)
8688
add_subdirectory(test/pipeline)
8789
add_subdirectory(test/TestingDataSet)
8890
endif()
91+
8992
if(BUILD_GRPC_TESTING)
9093
add_subdirectory(test/grpc)
9194
endif()
95+
9296
if(BUILD_DLOPEN_TESTING)
9397
add_subdirectory(test/dlopen)
9498
endif()

cmake/grpc-gen.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
set(PROTO_COMPILER ${MAADEPS_HOST_TOOLS}/protobuf/protoc${CMAKE_EXECUTABLE_SUFFIX})
2-
set(PROTO_GRPC_PLUGIN ${MAADEPS_HOST_TOOLS}/grpc/grpc_cpp_plugin${CMAKE_EXECUTABLE_SUFFIX})
1+
set(PROTO_COMPILER ${MAADEPS_TOOLS}/protobuf/protoc${CMAKE_EXECUTABLE_SUFFIX})
2+
set(PROTO_GRPC_PLUGIN ${MAADEPS_TOOLS}/grpc/grpc_cpp_plugin${CMAKE_EXECUTABLE_SUFFIX})
33

44
macro(GENERATE_GRPC_LIB LIB_NAME IN_DIR OUT_DIR GEN_SRCS)
55
file(MAKE_DIRECTORY ${OUT_DIR})

cmake/thrift-gen.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(THRIFT_COMPILER ${MAADEPS_TARGET_TOOLS}/thrift/thrift${CMAKE_EXECUTABLE_SUFFIX})
1+
set(THRIFT_COMPILER ${MAADEPS_TOOLS}/thrift/thrift${CMAKE_EXECUTABLE_SUFFIX})
22

33
macro(GENERATE_THRIFT_LIB LIB_NAME FILENAME OUTPUTDIR SOURCES)
44
file(MAKE_DIRECTORY ${OUTPUTDIR})

cmake/utils.cmake

+1-15
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,7 @@ if(APPLE)
3838
get_osx_architecture()
3939
endif(APPLE)
4040

41-
if(WIN32)
42-
set(MAADEPS_HOST_TRIPLET "x64-windows")
43-
elseif(APPLE)
44-
set(MAADEPS_HOST_TRIPLET "x64-osx")
45-
else()
46-
set(MAADEPS_HOST_TRIPLET "x64-linux")
47-
endif()
48-
set(MAADEPS_HOST_TOOLS ${MAA_DEPS_DIR}/vcpkg/installed/${MAADEPS_HOST_TRIPLET}/tools)
4941
if(NOT DEFINED MAADEPS_TRIPLET)
5042
detect_maadeps_triplet(MAADEPS_TRIPLET)
5143
endif()
52-
set(MAADEPS_TARGET_TOOLS ${MAA_DEPS_DIR}/vcpkg/installed/${MAADEPS_TRIPLET}/tools)
53-
54-
if(maa-${MAADEPS_HOST_TRIPLET} STREQUAL ${MAADEPS_TRIPLET})
55-
set(MAA_CROSSCOMPILE OFF)
56-
else()
57-
set(MAA_CROSSCOMPILE ON)
58-
endif()
44+
set(MAADEPS_TOOLS ${MAA_DEPS_DIR}/vcpkg/installed/${MAADEPS_TRIPLET}/tools)

0 commit comments

Comments
 (0)