修改2
Some checks failed
Build and Release / build-and-test (alpine) (push) Failing after 1m48s
Build and Release / build-and-test (ubuntu) (push) Failing after 6m15s
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 12:55:01 +08:00
parent dbad25ee73
commit 6a7e4ae6c6
2 changed files with 21 additions and 4 deletions

View File

@@ -23,6 +23,8 @@ FROM base AS build
ARG TARGZ_FILE
ARG XMRIGCC_VERSION
ARG TARGETARCH
ARG BUILDPLATFORM
ARG TARGETPLATFORM
RUN git clone --recursive https://github.com/Bendr0id/xmrigCC.git && \
mv xmrigCC xxxigcc && \
@@ -35,7 +37,14 @@ COPY ./init.sh ./init.sh
# 根据目标架构优化编译
RUN chmod +x ./init.sh && ./init.sh && \
mkdir build && cd scripts && chmod +x ./*.sh && ./build_deps.sh && cd ../build && \
mkdir build && cd scripts && chmod +x ./*.sh && \
if [ "$BUILDPLATFORM" != "$TARGETPLATFORM" ]; then \
MAKE_JOBS="-j8"; \
else \
MAKE_JOBS="-j32"; \
fi && \
echo "Building with parallel jobs: $MAKE_JOBS (cross-compile: $([ "$BUILDPLATFORM" != "$TARGETPLATFORM" ] && echo yes || echo no))" && \
./build_deps.sh $MAKE_JOBS && cd ../build && \
if [ "$TARGETARCH" = "arm64" ]; then \
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DXMRIG_DEPS=scripts/deps \
@@ -60,7 +69,7 @@ RUN chmod +x ./init.sh && ./init.sh && \
-DWITH_OPENCL=OFF \
-DWITH_CUDA=OFF; \
fi && \
make -j$(nproc)
make $MAKE_JOBS
FROM scratch