File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed
Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 1+ # .github/toolchain-arm64.cmake (修正版)
2+
13set (CMAKE_SYSTEM_NAME Linux)
24set (CMAKE_SYSTEM_PROCESSOR aarch64)
3- set (CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
4- set (CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
5- set (CMAKE_FIND_ROOT_PATH /usr/aarch64-linux-gnu)
5+
6+ # 指定交叉编译器 (建议使用绝对路径增加稳定性)
7+ set (CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc)
8+ set (CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++)
9+
10+ # --- 修正查找路径 ---
11+ # 移除或注释掉错误的 CMAKE_FIND_ROOT_PATH 设置
12+ # set(CMAKE_FIND_ROOT_PATH /usr/aarch64-linux-gnu) # <--- 注释掉或删除此行
13+
14+ # 直接将 arm64 的 include 和 lib 目录添加到 CMake 的搜索路径
15+ # 将这些路径添加到现有路径的前面
16+ list (PREPEND CMAKE_INCLUDE_PATH "/usr/include/aarch64-linux-gnu" )
17+ list (PREPEND CMAKE_LIBRARY_PATH "/usr/lib/aarch64-linux-gnu" )
18+
19+ # --- 保持查找模式设置 ---
20+ # 这确保 CMake 只在目标路径中查找,避免使用宿主机的库/头文件
621set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
722set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
823set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Original file line number Diff line number Diff line change @@ -105,15 +105,20 @@ jobs:
105105 sudo apt-get install -y libncurses-dev:arm64
106106 # Add any other required :arm64 dependencies here, e.g.:
107107 # sudo apt-get install -y zlib1g-dev:arm64 libssl-dev:arm64 ...
108+ echo "Checking libncurses-dev:arm64 installation paths..."
109+ dpkg -L libncurses-dev:arm64 | grep -E 'include|lib.*\.so'
108110
109111 # Set up CMake toolchain environment variable (if your toolchain file needs it)
110112 echo "CMAKE_ARGS=-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/.github/toolchain-arm64.cmake" >> $GITHUB_ENV
111113
112114 # Build and package
113115 - name : Configure CMake
114116 run : |
117+ echo "Clearing old CMake cache..."
118+ rm -rf build
115119 mkdir -p build
116120 cd build
121+ echo "Running CMake configuration..."
117122 cmake ${{ env.CMAKE_ARGS }} \
118123 -DCMAKE_BUILD_TYPE=Release \
119124 -DBUILD_PYTHON_BINDINGS=OFF \
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Publish Rust Crate
33on :
44 push :
55 tags :
6- - ' v*' # Triggered when pushing version tags, such as v0.1.1
6+ - ' v*' # Triggered when pushing version tags, such as v0.1.2
77 workflow_dispatch : # Allow manual triggering
88
99jobs :
You can’t perform that action at this time.
0 commit comments