Skip to content

Commit fa0e95f

Browse files
committed
ci(workflow): 添加Linux ARM64交叉编译工具链支持
在GitHub Actions工作流中添加了Linux ARM64平台的交叉编译工具链安装步骤,确保能够成功编译aarch64-unknown-linux-gnu目标。同时,设置了对应的环境变量以使用正确的编译器。
1 parent c7f29d2 commit fa0e95f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/backend.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ jobs:
9696
target: ${{ matrix.target.target }}
9797
override: true
9898

99+
- name: Install cross compile tools (Linux ARM64 only)
100+
if: matrix.target.target == 'aarch64-unknown-linux-gnu'
101+
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
102+
99103
- name: Cache Rust dependencies
100104
uses: actions/cache@v3
101105
with:
@@ -128,6 +132,8 @@ jobs:
128132
run: |
129133
cd backend
130134
cargo build --release --target ${{ matrix.target.target }}
135+
env:
136+
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
131137

132138
- name: Prepare binary
133139
shell: bash

0 commit comments

Comments
 (0)