Files
miner/.gitea/workflows/release.yaml
rob thijssen 7831323362
All checks were successful
ci / fmt (pull_request) Successful in 20s
bench / build (pull_request) Successful in 1m15s
ci / clippy (pull_request) Successful in 1m43s
ci / doc (pull_request) Successful in 2m0s
bench / measure (pull_request) Successful in 2m52s
ci / test (pull_request) Successful in 6m55s
release: tag-triggered binaries, README section with measured rates
For independent miners (quantus/miner#27): a `v<version>-lair.<n>` tag
builds quantus-miner and quantus-bench on the cuda-13.0 runner with the
tag's commit in --version, and publishes a Gitea release with the
tarball, its sha256 and a build report. The README now leads with what
this fork is, the measured rates per card against upstream and the two
closed pool binaries, where the binaries are, how to reproduce the
numbers with quantus-bench, and that there is no fee, licence server or
telemetry. release.yaml is excluded from deploy triggers.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ue5ZZm1Hiv5zPnucykKKuF
2026-09-14 01:13:49 +03:00

79 lines
3.7 KiB
YAML

---
# Release binaries for independent miners (quantus/miner#27).
#
# Pushing a tag `v<upstream version>-lair.<n>` builds the miner and the bench
# harness on the cuda-13.0 runner (Fedora 43 like the mining hosts, and the
# only runner with nvcc, so the binary carries the sm_86/sm_89/sm_120 cubins
# and PTX), records what was built, and publishes a Gitea release with the
# binaries, their checksums and the build report attached. The tag's commit
# is embedded in `--version` so a downloaded binary identifies itself.
#
# Deploying to the fleet is deploy.yaml's job and follows main; a release is
# only a public snapshot and changes nothing on the hosts.
name: release
on:
push:
tags: ["v*-lair.*"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: cuda-13.0
steps:
- uses: actions/checkout@v4
- name: build quantus-miner and quantus-bench
env:
MINER_BUILD_SHA: ${{ github.sha }}
MINER_CUDA_REQUIRE: "1"
run: |
set -euo pipefail
cargo build --release --locked -p miner-cli -p bench-harness
./target/release/quantus-miner --version
./target/release/quantus-bench --version || true
- name: package
run: |
set -euo pipefail
tag="${GITHUB_REF_NAME}"
dir="quantus-miner-${tag}-linux-x86_64"
mkdir -p "dist/${dir}"
cp target/release/quantus-miner target/release/quantus-bench "dist/${dir}/"
cp LICENSE "dist/${dir}/"
{
echo "quantus-miner ${tag}"
echo "commit: ${GITHUB_SHA}"
echo "built: $(date -u +%Y-%m-%dT%H:%M:%SZ) on $(source /etc/os-release && echo "$PRETTY_NAME"), $(ldd --version | head -1)"
echo "cuda: $(nvcc --version | grep -oE 'release [0-9.]+' | head -1)"
echo "cubins: sm_86 sm_89 sm_120 + compute_120 PTX"
echo "version string: $(./target/release/quantus-miner --version)"
} > "dist/${dir}/BUILD.txt"
(cd dist && tar -czf "${dir}.tar.gz" "${dir}" && sha256sum "${dir}.tar.gz" > "${dir}.tar.gz.sha256")
cat "dist/${dir}/BUILD.txt" "dist/${dir}.tar.gz.sha256"
- name: publish release
run: |
set -euo pipefail
tag="${GITHUB_REF_NAME}"
dir="quantus-miner-${tag}-linux-x86_64"
api="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}"
auth="Authorization: token ${{ secrets.GITHUB_TOKEN }}"
body=$(python3 - "$tag" "dist/${dir}/BUILD.txt" "dist/${dir}.tar.gz.sha256" <<'PY'
import json, sys, pathlib
tag, build, sha = sys.argv[1], pathlib.Path(sys.argv[2]).read_text(), pathlib.Path(sys.argv[3]).read_text().strip()
text = (
f"quantus-miner {tag}: Linux x86_64, NVIDIA RTX 30/40/50 (sm_86, sm_89, sm_120, plus PTX), "
"glibc 2.42 or newer, driver with CUDA 13.0 support.\n\n"
"No dev fee, no licence server, no telemetry. Measured rates and how to reproduce them are in the README.\n\n"
f"```\n{build}```\n\nsha256: `{sha}`\n"
)
print(json.dumps({"tag_name": tag, "name": f"quantus-miner {tag}", "body": text, "draft": False, "prerelease": False}))
PY
)
id=$(curl -fsS -X POST -H "$auth" -H "Content-Type: application/json" "${api}/releases" -d "$body" | python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])')
echo "release id ${id}"
for f in "dist/${dir}.tar.gz" "dist/${dir}.tar.gz.sha256" "dist/${dir}/BUILD.txt"; do
curl -fsS -X POST -H "$auth" "${api}/releases/${id}/assets?name=$(basename "$f")" -F "attachment=@${f}" > /dev/null
echo "attached $(basename "$f")"
done