The GitHub workflows could never run on this instance: jobs asked for ubuntu-24.04 runners (the Pi runner only registers the 'docker' label, so every job sat in waiting), and release.yml published to github.com, which is not a remote of this repo. - .forgejo/workflows/ci.yml — cargo test + clippy on the 'docker' label, Rust work in a rust:1.87-bookworm sibling container (aarch64 native) - .forgejo/workflows/release.yml — on v*.*.* tags, build aarch64, strip, sha256, publish to the Forgejo release; workflow_dispatch takes a tag to re-publish - scripts/publish-release.sh — idempotent create-or-update release + asset upload via the Forgejo API (replaces same-named assets) - scripts/build-release-local.sh — x86_64 path (no x86_64 runner exists) - scripts/release-body.md — release notes template (@TAG@ substituted) - README: install URLs -> Forgejo, accurate maintainer release procedure - remove .github/workflows/*
This commit is contained in:
parent
b9f2dc3806
commit
91fd9601b8
11 changed files with 318 additions and 139 deletions
49
README.md
49
README.md
|
|
@ -21,13 +21,13 @@ Arti onion services are still **experimental**. If the hidden service cannot com
|
|||
|
||||
### Option A — download a release binary
|
||||
|
||||
CI builds stripped Linux binaries on every `v*.*.*` tag and attaches them to [GitHub Releases](https://github.com/sirius0xdev/onionwire/releases).
|
||||
CI (`.forgejo/workflows/release.yml`, Forgejo Actions on the Pi runner) builds the **aarch64** binary on every `v*.*.*` tag and attaches it to the [Forgejo release](https://forgejo.siriusdevops.com/sirius/onionwire/releases). There is no x86_64 runner on this instance, so the **x86_64** asset is built and uploaded by `scripts/build-release-local.sh` on an x86_64 host — both land on the same release page.
|
||||
|
||||
**x86_64 (most PCs / VMs):**
|
||||
|
||||
```bash
|
||||
curl -fL -O https://github.com/sirius0xdev/onionwire/releases/latest/download/onionwire-x86_64-unknown-linux-gnu
|
||||
curl -fL -O https://github.com/sirius0xdev/onionwire/releases/latest/download/onionwire-x86_64-unknown-linux-gnu.sha256
|
||||
curl -fL -O https://forgejo.siriusdevops.com/sirius/onionwire/releases/latest/download/onionwire-x86_64-unknown-linux-gnu
|
||||
curl -fL -O https://forgejo.siriusdevops.com/sirius/onionwire/releases/latest/download/onionwire-x86_64-unknown-linux-gnu.sha256
|
||||
sha256sum -c onionwire-x86_64-unknown-linux-gnu.sha256
|
||||
chmod +x onionwire-x86_64-unknown-linux-gnu
|
||||
./onionwire-x86_64-unknown-linux-gnu --version
|
||||
|
|
@ -36,8 +36,8 @@ chmod +x onionwire-x86_64-unknown-linux-gnu
|
|||
**aarch64 (Raspberry Pi, ARM servers):**
|
||||
|
||||
```bash
|
||||
curl -fL -O https://github.com/sirius0xdev/onionwire/releases/latest/download/onionwire-aarch64-unknown-linux-gnu
|
||||
curl -fL -O https://github.com/sirius0xdev/onionwire/releases/latest/download/onionwire-aarch64-unknown-linux-gnu.sha256
|
||||
curl -fL -O https://forgejo.siriusdevops.com/sirius/onionwire/releases/latest/download/onionwire-aarch64-unknown-linux-gnu
|
||||
curl -fL -O https://forgejo.siriusdevops.com/sirius/onionwire/releases/latest/download/onionwire-aarch64-unknown-linux-gnu.sha256
|
||||
sha256sum -c onionwire-aarch64-unknown-linux-gnu.sha256
|
||||
chmod +x onionwire-aarch64-unknown-linux-gnu
|
||||
./onionwire-aarch64-unknown-linux-gnu --version
|
||||
|
|
@ -68,7 +68,7 @@ rustc --version # must be 1.87 or newer
|
|||
```
|
||||
|
||||
```bash
|
||||
git clone https://github.com/sirius0xdev/onionwire.git
|
||||
git clone https://forgejo.siriusdevops.com/sirius/onionwire.git
|
||||
cd onionwire
|
||||
cargo test --locked
|
||||
cargo clippy --locked -- -D warnings
|
||||
|
|
@ -84,7 +84,8 @@ cargo install --path . --locked --force
|
|||
# lands in ~/.cargo/bin/onionwire
|
||||
```
|
||||
|
||||
Source of record also lives at `https://forgejo.siriusdevops.com/sirius/onionwire` (same tree). GitHub is where CI publishes downloadable artifacts.
|
||||
Build needs `pkg-config` and OpenSSL 3 headers (`libssl-dev` / `openssl-devel`) —
|
||||
the released binaries link `libssl.so.3` dynamically.
|
||||
|
||||
### Two instances on one machine
|
||||
|
||||
|
|
@ -184,20 +185,38 @@ Threat model: [`docs/THREAT_MODEL.md`](docs/THREAT_MODEL.md).
|
|||
|
||||
## Releases (maintainers)
|
||||
|
||||
Push a version tag. GitHub Actions builds Linux binaries and publishes a GitHub Release.
|
||||
Tags trigger Forgejo Actions on the self-hosted Pi runner. The x86_64 asset has
|
||||
no runner on this instance, so it is built locally and attached to the same
|
||||
release.
|
||||
|
||||
```bash
|
||||
# version in Cargo.toml must match the tag without the leading v
|
||||
git tag v0.1.0
|
||||
git push github v0.1.0 # GitHub remote — this is what triggers CI
|
||||
# 1. version in Cargo.toml must match the tag without the leading v
|
||||
cargo update --offline -p onionwire # keep Cargo.lock at the new version
|
||||
git commit -am "chore: release vX.Y.Z" && git push origin main
|
||||
|
||||
# 2. tag and push — the release workflow builds + publishes aarch64
|
||||
git tag -a vX.Y.Z -m "OnionWire vX.Y.Z"
|
||||
git push origin vX.Y.Z
|
||||
|
||||
# 3. attach x86_64 from an x86_64 host (idempotent — safe to re-run)
|
||||
FORGEJO_TOKEN=<pat> scripts/build-release-local.sh vX.Y.Z
|
||||
```
|
||||
|
||||
Workflows:
|
||||
Workflows (Forgejo Actions, `.forgejo/workflows/` — jobs run on the `docker`
|
||||
label of the Pi runner and do their Rust work in a `rust:1.87-bookworm`
|
||||
sibling container):
|
||||
|
||||
- [`.github/workflows/ci.yml`](.github/workflows/ci.yml) — `cargo test --locked` and clippy on `main` / PRs (ignored Tor-live tests are not run).
|
||||
- [`.github/workflows/release.yml`](.github/workflows/release.yml) — on `v*.*.*` tags, `cargo build --release` for `x86_64-unknown-linux-gnu` and `aarch64-unknown-linux-gnu`, strip, sha256, attach to the release.
|
||||
- [`.forgejo/workflows/ci.yml`](.forgejo/workflows/ci.yml) — `cargo test --locked` + `cargo clippy --all-targets -- -D warnings` on `main` and PRs (ignored Tor-live tests are not run).
|
||||
- [`.forgejo/workflows/release.yml`](.forgejo/workflows/release.yml) — on `v*.*.*` tags: builds `aarch64-unknown-linux-gnu` natively, strips, sha256, publishes to the release. Also runnable via `workflow_dispatch` with a tag input to re-publish.
|
||||
|
||||
Do not run `cargo publish`; `publish = false`.
|
||||
Scripts:
|
||||
|
||||
- [`scripts/publish-release.sh`](scripts/publish-release.sh) — create-or-update a release and (re)upload assets via the Forgejo API. Needs `FORGEJO_TOKEN` (repo secret in CI, env locally).
|
||||
- [`scripts/build-release-local.sh`](scripts/build-release-local.sh) — x86_64 build + strip + checksum + publish.
|
||||
- [`scripts/release-body.md`](scripts/release-body.md) — release notes template (`@TAG@` is substituted).
|
||||
|
||||
Do not run `cargo publish`; `publish = false`. CI needs the repo secret
|
||||
`FORGEJO_TOKEN` (an instance user PAT with repo write) to publish releases.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue