feat: 重构 CI/CD 流水线,拆分为独立的构建和发布流程,更新相关文档和脚本
CI / validate (push) Successful in 5s
CI / build (amd64) (push) Successful in 3m38s
CI / build (arm64) (push) Successful in 8m39s
Release / build (amd64) (push) Successful in 3m35s
Release / build (arm64) (push) Successful in 8m58s
Release / release (push) Successful in 42s
CI / validate (push) Successful in 5s
CI / build (amd64) (push) Successful in 3m38s
CI / build (arm64) (push) Successful in 8m39s
Release / build (amd64) (push) Successful in 3m35s
Release / build (arm64) (push) Successful in 8m58s
Release / release (push) Successful in 42s
- 新增 .gitea/workflows/ci.yml,包含版本校验、构建和冒烟测试 - 新增 .gitea/workflows/release.yml,处理 tag 发布,上传包到仓库并创建 Release - 更新 README.md 和 CLAUDE.md,描述新的 CI/CD 流程和版本号约定 - 修改 init.sh,增加对关键锚点的检查,确保源码结构一致性 - 更新 Dockerfile,使用 OpenSSL 3.0.21 和 unbound 1.25.1,确保与 Monero 版本一致 - 更新 build-deb.sh 示例,反映最新版本号 - 新增 VERSION 文件,统一版本管理
This commit is contained in:
+8
-8
@@ -10,12 +10,12 @@ RUN apk add --no-cache g++ gcc make cmake git linux-headers autoconf automake li
|
||||
ENV CFLAGS="-fPIC -O2" CXXFLAGS="-fPIC -O2"
|
||||
WORKDIR /deps
|
||||
|
||||
# OpenSSL 3.0.16(Alpine 仓库只有 .so,须源码编静态)
|
||||
RUN wget -q https://github.com/openssl/openssl/releases/download/openssl-3.0.16/openssl-3.0.16.tar.gz && \
|
||||
tar xf openssl-3.0.16.tar.gz && cd openssl-3.0.16 && \
|
||||
# OpenSSL 3.0.21(与 Monero v0.18.5.1 depends 对齐;Alpine 仓库只有 .so,须源码编静态)
|
||||
RUN wget -q https://github.com/openssl/openssl/releases/download/openssl-3.0.21/openssl-3.0.21.tar.gz && \
|
||||
tar xf openssl-3.0.21.tar.gz && cd openssl-3.0.21 && \
|
||||
if [ "$(uname -m)" = aarch64 ]; then OSSL_T=linux-aarch64; else OSSL_T=linux-x86_64; fi && \
|
||||
./Configure no-shared no-tests --prefix=/usr --libdir=lib $OSSL_T && \
|
||||
make -j"$(nproc)" && make install_sw && cd / && rm -rf /deps/openssl-3.0.16*
|
||||
make -j"$(nproc)" && make install_sw && cd / && rm -rf /deps/openssl-3.0.21*
|
||||
|
||||
# libsodium 1.0.20
|
||||
RUN wget -q https://download.libsodium.org/libsodium/releases/libsodium-1.0.20.tar.gz && \
|
||||
@@ -35,9 +35,9 @@ RUN wget -q https://github.com/libexpat/libexpat/releases/download/R_2_6_4/expat
|
||||
./configure --enable-static --disable-shared --prefix=/usr && \
|
||||
make -j"$(nproc)" && make install && cd / && rm -rf /deps/expat-2.6.4*
|
||||
|
||||
# unbound 1.22.0(DNSSEC;release archive 需 flex/bison 现生成 lexer)
|
||||
RUN wget -q https://github.com/NLnetLabs/unbound/archive/refs/tags/release-1.22.0.tar.gz -O unbound.tar.gz && \
|
||||
tar xf unbound.tar.gz && cd unbound-release-1.22.0 && \
|
||||
# unbound 1.25.1(DNSSEC,与 Monero v0.18.5.1 depends 对齐)
|
||||
RUN wget -q https://www.nlnetlabs.nl/downloads/unbound/unbound-1.25.1.tar.gz && \
|
||||
tar xf unbound-1.25.1.tar.gz && cd unbound-1.25.1 && \
|
||||
./configure --disable-shared --enable-static --prefix=/usr --with-libexpat=/usr --with-ssl=/usr \
|
||||
--with-libevent=no --without-pythonmodule --without-pyunbound --with-libunbound-only --with-pic && \
|
||||
make -j"$(nproc)" && make install && cd / && rm -rf /deps/unbound*
|
||||
@@ -60,7 +60,7 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then MARCH=armv8-a; MTAG=linux-armv8; \
|
||||
make -j"$(nproc)" -C build/release daemon && \
|
||||
mkdir -p /output && cp build/release/bin/mond /output/mond
|
||||
|
||||
# ---- Stage 3: 导出(保持 ci.yaml 期望的 linux_<arch>/mond 布局)----
|
||||
# ---- Stage 3: 导出(保持 CI 期望的 linux_<arch>/mond 布局)----
|
||||
FROM scratch
|
||||
ARG TARGETARCH
|
||||
COPY --from=build /output/mond /linux_${TARGETARCH}/mond
|
||||
|
||||
Reference in New Issue
Block a user