Files
xxxig/README.md
T
wangdefaandClaude Opus 4.8 8010a3e73e
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 24s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 13s
Build and Release / build-and-test (arm64, alpine) (push) Successful in 6s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 0s
Build and Release / release (push) Successful in 28s
完善 deb 打包健壮性,补充 README 与 .gitignore
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 12:01:08 +08:00

78 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# XXXig
XXXig 是 [XMRig](https://github.com/xmrig/xmrig) 的定制构建——带 CCCentral Control 集中管理)功能的 RandomX CPU 挖矿软件套件。
**本仓库只包含构建与打包基础设施**,不含矿机源码:二进制在 CI 中从上游源码仓库 `github.com/wangdefaa/xxxig` 编译,再打包分发到 [gitea.bcde.io](https://gitea.bcde.io) 的 Generic / Debian 包仓库。
## 产物
每次构建产出三个可执行文件(CPU-only,静态链接 libuv/OpenSSL/hwloc,运行时仅依赖 glibc):
| 二进制 | 作用 |
|---|---|
| `xxxig` | 实际挖矿程序,由 daemon 拉起 |
| `xxxigDaemon` | 守护进程,控制矿机并通过 cc-client 连接中心服务器;安装后作为主服务运行 |
| `xxxigServer` | 中心控制服务器,带 Web UI |
支持架构 `amd64` / `arm64`,发行版 Ubuntu/Debian、Alpine。
## 安装
完整参数、服务管理、故障排查见 [script/README.md](script/README.md)。
```bash
# tar.gz(通用:Alpine / Ubuntu / Debian
sudo ./script/install.sh -o pool.example.com:3333 -w YOUR_WALLET
# APTDebian / Ubuntu
sudo ./script/install.deb.sh -o pool.example.com:3333 -w YOUR_WALLET
# 卸载(自动识别安装方式)
sudo ./script/uninstall.sh
```
两种渠道的安装布局不同:
| | tar.gz | .deb / APT |
|---|---|---|
| 来源 | Generic Package Registry | Debian Package Registry |
| 二进制 | `/etc/miner/xxxig/` | `/opt/xxxig/` |
| 配置 | `/etc/miner/xxxig/config.json` | `/etc/xxxig/config.json``config_cc.json` |
| 服务 | 单个 `xxxig` | `xxxig-daemon` + `xxxig-server` |
## 构建与发布
CI 定义于 [.gitea/workflows/ci.yaml](.gitea/workflows/ci.yaml)
- **push 到 `main`/`develop`**:矩阵 `arch=[amd64,arm64] × distro=[ubuntu,alpine]`,在原生 runner 上用 Docker 编译为 tar.gzubuntu 再打 `.deb`
- **打 tag**:产物上传到 Generic / Debian 包仓库并创建 Release。
本地构建:
```bash
# 编译某架构/发行版二进制(输出到 ./output/linux_<arch>/
docker buildx build --platform linux/amd64 \
--build-arg XXXIG_VERSION=v6.26.0 \
--output type=local,dest=./output \
-f docker/Dockerfile.ubuntu .
# 用产物 tar.gz 打 .deb
./debian/build-deb.sh amd64 6.26.0 xxxig-amd64-ubuntu-6.26.0.tar.gz
```
## 版本号约定
- **上游源码 git tag** 带 `v`(如 `v6.26.0`),CI 用 `XXXIG_VERSION=v${PACKAGE_VERSION}` 检出。
- **包版本**tar.gz / deb / registry 路径)一律用数字(如 `6.26.0`),符合 Debian 版本规范。
发版只需改 ci.yaml 的 `PACKAGE_VERSION`
## 目录结构
```
.gitea/workflows/ CI 流水线
docker/ 各发行版 Dockerfile(从上游源码编译)
debian/ .deb 打包:control 模板、维护脚本、systemd 服务
script/ 安装/卸载脚本 + 详细文档
```