更新 CI/CD 流水线,拆分为独立的构建和发布流程,添加版本控制,更新至 4.18
CI / validate (push) Successful in 6s
CI / build (amd64) (push) Successful in 4m11s
CI / build (arm64) (push) Successful in 22m29s
Release / build (amd64) (push) Successful in 4m23s
Release / build (arm64) (push) Successful in 22m17s
Release / release (push) Successful in 37s
CI / validate (push) Successful in 6s
CI / build (amd64) (push) Successful in 4m11s
CI / build (arm64) (push) Successful in 22m29s
Release / build (amd64) (push) Successful in 4m23s
Release / build (arm64) (push) Successful in 22m17s
Release / release (push) Successful in 37s
This commit is contained in:
@@ -14,6 +14,8 @@ P2Pool 是 [SChernykh/p2pool](https://github.com/SChernykh/p2pool) 的定制打
|
||||
|
||||
支持架构 `amd64` / `arm64`;musl 纯静态,任意 Linux 发行版(Debian/Ubuntu/Alpine/CentOS 等)开箱即跑。静态构建仍保留 `--rpc-ssl`(连外部 SSL monerod 节点)与内置 gRPC(`--merge-mine tari://...` 与 Tari 合并挖矿)。
|
||||
|
||||
P2Pool v4.18 要求连接 **Monero daemon v0.18.5.1 或更高版本**。
|
||||
|
||||
## 安装
|
||||
|
||||
### APT(Debian / Ubuntu)
|
||||
@@ -46,24 +48,24 @@ sudo apt-get update && sudo apt-get install p2pool
|
||||
|
||||
```bash
|
||||
curl -fSL -o p2pool.tar.gz \
|
||||
https://gitea.bcde.io/api/packages/wangdefa/generic/p2pool/4.17.1/p2pool-amd64-linux-static-4.17.1.tar.gz
|
||||
https://gitea.bcde.io/api/packages/wangdefa/generic/p2pool/4.18/p2pool-amd64-linux-static-4.18.tar.gz
|
||||
tar -xzf p2pool.tar.gz
|
||||
./p2pool --params-file params.conf # 配置模板见仓库 conf/params.conf.example
|
||||
```
|
||||
|
||||
## 构建与发布
|
||||
|
||||
CI 定义于 [.gitea/workflows/ci.yaml](.gitea/workflows/ci.yaml):
|
||||
Gitea Actions 分为两条流水线:
|
||||
|
||||
- **push 到 `main`/`develop`**:矩阵 `arch=[amd64,arm64]`,在原生 runner 上用 Docker(musl 纯静态)编译为 tar.gz 并打 `.deb`。
|
||||
- **打 tag**:产物上传到 Generic / Debian 包仓库并创建 Release。
|
||||
- [.gitea/workflows/ci.yml](.gitea/workflows/ci.yml):分支推送时检查版本、配置和 shell 语法,并在 amd64、arm64 原生 runner 上编译、运行内置测试和验证 DEB 包内容。
|
||||
- [.gitea/workflows/release.yml](.gitea/workflows/release.yml):tag 推送时构建 tar.gz 和 DEB,生成 `SHA256SUMS`,上传包仓库并创建或更新 Release。
|
||||
|
||||
本地构建:
|
||||
|
||||
```bash
|
||||
# 编译某架构二进制(输出到 ./output/linux_<arch>/p2pool)
|
||||
docker buildx build --platform linux/amd64 \
|
||||
--build-arg P2POOL_VERSION=v4.17.1 \
|
||||
--build-arg P2POOL_VERSION="v$(cat VERSION)" \
|
||||
--output type=local,dest=./output \
|
||||
-f docker/Dockerfile .
|
||||
|
||||
@@ -71,15 +73,17 @@ docker buildx build --platform linux/amd64 \
|
||||
ldd output/linux_amd64/p2pool
|
||||
|
||||
# 用产物 tar.gz 打 .deb
|
||||
./debian/build-deb.sh amd64 4.17.1 p2pool-amd64-linux-static-4.17.1.tar.gz
|
||||
./debian/build-deb.sh amd64 4.18 p2pool-amd64-linux-static-4.18.tar.gz
|
||||
```
|
||||
|
||||
## 版本号约定
|
||||
|
||||
- **上游源码 git tag** 带 `v`(如 `v4.17.1`),CI 用 `P2POOL_VERSION=v${PACKAGE_VERSION}` 检出。
|
||||
- **包版本**(tar.gz / deb / registry 路径)一律用数字(如 `4.17.1`),符合 Debian 版本规范。
|
||||
- 根目录 [VERSION](VERSION) 是唯一版本来源,使用不带 `v` 的版本号。
|
||||
- **上游源码 git tag** 带 `v`(如 `v4.18`),CI 构建时自动补回。
|
||||
- **包版本**(tar.gz / deb / registry 路径)一律用数字(如 `4.18`),符合 Debian 版本规范。
|
||||
- 发布 tag 可写成 `4.18` 或 `v4.18`,去掉 `v` 后必须与 VERSION 一致。
|
||||
|
||||
发版只需改 ci.yaml 的 `PACKAGE_VERSION`。
|
||||
发版时先更新 VERSION 并提交,再创建同版本 tag。
|
||||
|
||||
## 目录结构
|
||||
|
||||
|
||||
Reference in New Issue
Block a user