优化 CI 构建流程
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in 16s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 29s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 27s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 56s
Build and Release / release (push) Successful in 1m25s
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in 16s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 29s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 27s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 56s
Build and Release / release (push) Successful in 1m25s
This commit is contained in:
@@ -26,14 +26,16 @@ WORKDIR /src/p2pool
|
||||
|
||||
RUN git checkout ${P2POOL_VERSION}
|
||||
|
||||
# Determine parallel jobs based on cross-compilation
|
||||
# Determine parallel jobs based on cross-compilation and architecture
|
||||
RUN mkdir build && cd build && \
|
||||
if [ "$BUILDPLATFORM" != "$TARGETPLATFORM" ]; then \
|
||||
MAKE_JOBS="-j2"; \
|
||||
elif [ "$TARGETARCH" = "amd64" ]; then \
|
||||
MAKE_JOBS="-j$(($(nproc) / 2))"; \
|
||||
else \
|
||||
MAKE_JOBS="-j$(nproc)"; \
|
||||
fi && \
|
||||
echo "Building with parallel jobs: $MAKE_JOBS (cross-compile: $([ "$BUILDPLATFORM" != "$TARGETPLATFORM" ] && echo yes || echo no))" && \
|
||||
echo "Building with parallel jobs: $MAKE_JOBS (arch: $TARGETARCH, cross-compile: $([ "$BUILDPLATFORM" != "$TARGETPLATFORM" ] && echo yes || echo no))" && \
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_MERGE_MINING_DONATION=OFF && \
|
||||
make $MAKE_JOBS
|
||||
|
||||
|
||||
@@ -26,14 +26,16 @@ WORKDIR /src/p2pool
|
||||
|
||||
RUN git checkout ${P2POOL_VERSION}
|
||||
|
||||
# Determine parallel jobs based on cross-compilation
|
||||
# Determine parallel jobs based on cross-compilation and architecture
|
||||
RUN mkdir build && cd build && \
|
||||
if [ "$BUILDPLATFORM" != "$TARGETPLATFORM" ]; then \
|
||||
MAKE_JOBS="-j2"; \
|
||||
elif [ "$TARGETARCH" = "amd64" ]; then \
|
||||
MAKE_JOBS="-j$(($(nproc) / 2))"; \
|
||||
else \
|
||||
MAKE_JOBS="-j$(nproc)"; \
|
||||
fi && \
|
||||
echo "Building with parallel jobs: $MAKE_JOBS (cross-compile: $([ "$BUILDPLATFORM" != "$TARGETPLATFORM" ] && echo yes || echo no))" && \
|
||||
echo "Building with parallel jobs: $MAKE_JOBS (arch: $TARGETARCH, cross-compile: $([ "$BUILDPLATFORM" != "$TARGETPLATFORM" ] && echo yes || echo no))" && \
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_MERGE_MINING_DONATION=OFF && \
|
||||
make $MAKE_JOBS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user