优化 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:
@@ -15,9 +15,6 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
runs-on: ${{ matrix.arch == 'amd64' && 'ubuntu-latest-amd64' || 'ubuntu-latest-arm64' }}
|
runs-on: ${{ matrix.arch == 'amd64' && 'ubuntu-latest-amd64' || 'ubuntu-latest-arm64' }}
|
||||||
concurrency:
|
|
||||||
group: build-${{ matrix.arch }}
|
|
||||||
cancel-in-progress: false
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch: [amd64, arm64]
|
arch: [amd64, arm64]
|
||||||
|
|||||||
@@ -26,14 +26,16 @@ WORKDIR /src/p2pool
|
|||||||
|
|
||||||
RUN git checkout ${P2POOL_VERSION}
|
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 && \
|
RUN mkdir build && cd build && \
|
||||||
if [ "$BUILDPLATFORM" != "$TARGETPLATFORM" ]; then \
|
if [ "$BUILDPLATFORM" != "$TARGETPLATFORM" ]; then \
|
||||||
MAKE_JOBS="-j2"; \
|
MAKE_JOBS="-j2"; \
|
||||||
|
elif [ "$TARGETARCH" = "amd64" ]; then \
|
||||||
|
MAKE_JOBS="-j$(($(nproc) / 2))"; \
|
||||||
else \
|
else \
|
||||||
MAKE_JOBS="-j$(nproc)"; \
|
MAKE_JOBS="-j$(nproc)"; \
|
||||||
fi && \
|
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 && \
|
cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_MERGE_MINING_DONATION=OFF && \
|
||||||
make $MAKE_JOBS
|
make $MAKE_JOBS
|
||||||
|
|
||||||
|
|||||||
@@ -26,14 +26,16 @@ WORKDIR /src/p2pool
|
|||||||
|
|
||||||
RUN git checkout ${P2POOL_VERSION}
|
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 && \
|
RUN mkdir build && cd build && \
|
||||||
if [ "$BUILDPLATFORM" != "$TARGETPLATFORM" ]; then \
|
if [ "$BUILDPLATFORM" != "$TARGETPLATFORM" ]; then \
|
||||||
MAKE_JOBS="-j2"; \
|
MAKE_JOBS="-j2"; \
|
||||||
|
elif [ "$TARGETARCH" = "amd64" ]; then \
|
||||||
|
MAKE_JOBS="-j$(($(nproc) / 2))"; \
|
||||||
else \
|
else \
|
||||||
MAKE_JOBS="-j$(nproc)"; \
|
MAKE_JOBS="-j$(nproc)"; \
|
||||||
fi && \
|
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 && \
|
cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_MERGE_MINING_DONATION=OFF && \
|
||||||
make $MAKE_JOBS
|
make $MAKE_JOBS
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user