优化linux端编译
This commit is contained in:
1 parent
ee06b9cd51
commit
312b1fac20
2 files changed
+20
-4
No files matched your search
@@ -101,11 +101,26 @@ jobs:
|
||||
mkdir -p release
|
||||
cp "target/agent/${{ matrix.target }}/release/nodeflare-agent${{ matrix.extension }}" "release/${{ matrix.asset }}"
|
||||
chmod +x "release/${{ matrix.asset }}"
|
||||
- name: Verify Agent version with cross
|
||||
if: matrix.cross
|
||||
- name: Install ARM64 emulator
|
||||
if: matrix.target == 'aarch64-unknown-linux-musl'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install --yes --no-install-recommends qemu-user-static
|
||||
- name: Verify Linux Agent version
|
||||
if: matrix.cross && matrix.target == 'x86_64-unknown-linux-musl'
|
||||
shell: bash
|
||||
run: |
|
||||
version_output=$(CROSS_CONFIG=Cross.toml cross run --manifest-path agent/Cargo.toml --release --locked --target ${{ matrix.target }} -- --version)
|
||||
version_output=$("release/${{ matrix.asset }}" --version)
|
||||
actual_version="${version_output##* }"
|
||||
if [ "$actual_version" != "${{ needs.metadata.outputs.version }}" ]; then
|
||||
echo "Agent version $actual_version does not match tag ${{ needs.metadata.outputs.version }}" >&2
|
||||
exit 1
|
||||
fi
|
||||
- name: Verify Linux ARM64 Agent version
|
||||
if: matrix.target == 'aarch64-unknown-linux-musl'
|
||||
shell: bash
|
||||
run: |
|
||||
version_output=$(qemu-aarch64-static "release/${{ matrix.asset }}" --version)
|
||||
actual_version="${version_output##* }"
|
||||
if [ "$actual_version" != "${{ needs.metadata.outputs.version }}" ]; then
|
||||
echo "Agent version $actual_version does not match tag ${{ needs.metadata.outputs.version }}" >&2
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
## 部署到 Cloudflare
|
||||
|
||||
1. Fork 本仓库并打开 [Workers & Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages/create),选择 **Import a repository** 后连接仓库。
|
||||
2. 在创建页展开 **高级设置**,按下表添加变量后部署。仓库已包含 Worker、前端和 `nodeflare` D1 配置。
|
||||
2. 部署命令修改为 `bun run deploy`。
|
||||
3. 在 **高级设置** 中填写下表变量后部署。
|
||||
|
||||
| 变量 | 必填/可选 | 说明 |
|
||||
| --- | ---: | --- |
|
||||
|
||||
Reference in new issue
Block a user