修改4
Some checks failed
Build and Release / build-and-test (alpine) (push) Failing after 11s
Build and Release / build-and-test (ubuntu) (push) Failing after 11s
Build and Release / docker-images (push) Has been skipped
Build and Release / release (push) Has been skipped

This commit is contained in:
2025-12-02 13:14:57 +08:00
parent 28a67a26b1
commit dc7b490b4c

View File

@@ -32,17 +32,29 @@ jobs:
ls /proc/sys/fs/binfmt_misc/ | grep -E "qemu-(aarch64|arm)" || echo "⚠️ 部分架构可能未注册" ls /proc/sys/fs/binfmt_misc/ | grep -E "qemu-(aarch64|arm)" || echo "⚠️ 部分架构可能未注册"
fi fi
# 创建 buildx builder # 创建 buildx builder,增加资源限制和优化参数
docker buildx create --use --name multiarch-builder --driver docker-container --driver-opt network=host || true docker buildx create --use --name multiarch-builder \
--driver docker-container \
--driver-opt network=host \
--driver-opt env.BUILDKIT_STEP_LOG_MAX_SIZE=50000000 \
--driver-opt env.BUILDKIT_STEP_LOG_MAX_SPEED=10000000 \
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host' \
|| true
docker buildx inspect --bootstrap docker buildx inspect --bootstrap
- name: Build binaries - name: Build binaries
run: | run: |
XMRIGCC_VERSION=${PACKAGE_VERSION%-*} XMRIGCC_VERSION=${PACKAGE_VERSION%-*}
# 设置 BuildKit 优化参数,限制并发和内存使用
export BUILDKIT_PROGRESS=plain
docker buildx build --pull \ docker buildx build --pull \
--platform linux/amd64,linux/arm64 \ --platform linux/amd64,linux/arm64 \
--build-arg XMRIGCC_VERSION=${XMRIGCC_VERSION} \ --build-arg XMRIGCC_VERSION=${XMRIGCC_VERSION} \
--output type=local,dest=./output \ --output type=local,dest=./output \
--cache-from type=registry,ref=${{ gitea.server_url }}/${{ gitea.repository }}/buildcache:${{ matrix.distro }} \
--cache-to type=registry,ref=${{ gitea.server_url }}/${{ gitea.repository }}/buildcache:${{ matrix.distro }},mode=max \
-f docker/Dockerfile.${{ matrix.distro }} . -f docker/Dockerfile.${{ matrix.distro }} .
- name: Package and test - name: Package and test
@@ -85,8 +97,14 @@ jobs:
# 尝试设置 QEMU忽略错误 # 尝试设置 QEMU忽略错误
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes 2>/dev/null || true docker run --rm --privileged multiarch/qemu-user-static --reset -p yes 2>/dev/null || true
# 创建 buildx builder # 创建 buildx builder,增加资源限制和优化参数
docker buildx create --use --name multiarch-builder --driver docker-container --driver-opt network=host || true docker buildx create --use --name multiarch-builder \
--driver docker-container \
--driver-opt network=host \
--driver-opt env.BUILDKIT_STEP_LOG_MAX_SIZE=50000000 \
--driver-opt env.BUILDKIT_STEP_LOG_MAX_SPEED=10000000 \
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host' \
|| true
docker buildx inspect --bootstrap docker buildx inspect --bootstrap
# 登录 # 登录