Commit Graph

14 Commits

Author SHA1 Message Date
gffranco 59494e9a86 ci(release): stamp the version in-pipeline from a dispatch input
CI / cargo fmt --check (push) Successful in 54s
CI / cargo clippy (push) Successful in 58s
CI / cargo test (push) Successful in 1m8s
CI / editor keymaps (push) Successful in 1m44s
Releasing no longer means hand-editing the version across four files. The
Release workflow is now workflow_dispatch with a `version` input:

  Actions → Run workflow → version: 0.4.0

A new `prepare` job validates the semver, runs scripts/set-version.sh to
stamp it into the workspace Cargo.toml, the two internal path-dep pins,
g:nuwiki_version, and the Cargo.lock entries for our crates; gates on
`cargo test --workspace`; then commits "chore(release): X.Y.Z" and pushes
the vX.Y.Z tag. The build matrix and release job run off that freshly
pushed tag (checkout ref = the new tag), so the tagged commit carries the
real version.

scripts/set-version.sh is the single source of truth for where the version
lives — run it locally with the same arg to bump by hand. It patches
Cargo.lock via awk so it needs no cargo/toolchain.

The push:tags trigger is removed (the pipeline now creates the tag itself,
so a tag-push trigger would double-fire).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 15:06:33 +00:00
gffranco bd729d513d fix: include release notes in Gitea API payload
CI / cargo fmt --check (push) Successful in 29s
CI / cargo clippy (push) Successful in 35s
CI / cargo test (push) Successful in 52s
Release / build x86_64-unknown-linux-gnu (push) Successful in 50s
Release / build x86_64-unknown-linux-musl (push) Successful in 56s
CI / editor keymaps (push) Successful in 1m55s
Release / build aarch64-unknown-linux-gnu (push) Successful in 3m16s
Release / build aarch64-unknown-linux-musl (push) Successful in 4m23s
Release / gitea release (push) Successful in 1m40s
The release notes were generated but never passed to the Gitea API.
Also suppress the expected 404 from the idempotency check.
2026-06-03 22:43:53 -03:00
gffranco 5a936e4f96 fix: add checkout step to release job for git commands
CI / cargo fmt --check (push) Successful in 49s
CI / cargo clippy (push) Successful in 49s
CI / cargo test (push) Successful in 58s
Release / build aarch64-unknown-linux-musl (push) Successful in 1m2s
Release / build x86_64-unknown-linux-gnu (push) Successful in 1m36s
Release / build x86_64-unknown-linux-musl (push) Successful in 1m34s
CI / editor keymaps (push) Successful in 1m44s
Release / build aarch64-unknown-linux-gnu (push) Successful in 2m27s
Release / gitea release (push) Successful in 1m51s
download-artifact@v3 doesn't create a git repo, so git log/git tag
fail in the release notes generation step.
2026-06-03 22:33:08 -03:00
gffranco 32cf4508de fix: use artifact v3 for GHES compatibility
CI / cargo fmt --check (push) Successful in 38s
CI / cargo clippy (push) Successful in 34s
CI / cargo test (push) Successful in 32s
Release / build aarch64-unknown-linux-musl (push) Successful in 3m31s
Release / build x86_64-unknown-linux-gnu (push) Successful in 57s
Release / build aarch64-unknown-linux-gnu (push) Successful in 1m8s
Release / build x86_64-unknown-linux-musl (push) Successful in 1m3s
CI / editor keymaps (push) Successful in 1m22s
Release / gitea release (push) Failing after 14s
Gitea (GHES) does not support upload-artifact@v4+.
Revert to v3 which is supported on GHES.
2026-06-03 22:17:31 -03:00
gffranco 7e757c6a7f release: fix restore-keys pipe syntax for Gitea 2026-06-03 22:17:31 -03:00
gffranco b77f4b1ced ci: improve workflows with stricter checks, caching, and idempotency
CI improvements:
- Add concurrency group to cancel redundant runs on same branch
- Add cargo cache to fmt job (was missing entirely)
- Add timeout-minutes: 5 to fast jobs (fmt, clippy, test) for fail-fast
- Change RUST_BACKTRACE from 'short' to '1' for better CI debuggability
- Pin push trigger to branches: [main] to avoid double-firing on PR merges
- Test minimum supported Neovim (0.11.0) instead of latest patch (0.11.3)

Release improvements:
- Enforce RUSTFLAGS: -D warnings at env level and in matrix rustflags
- Remove redundant checkout in release job (only needs env vars)
- Add release notes generation from git log since previous tag
- Make release creation idempotent (check if release exists before creating)
- Fix release_id not being set when release already exists
2026-06-03 22:17:31 -03:00
gffranco c9d75aeb1f Ci improvements (#5)
CI / cargo fmt --check (push) Successful in 42s
CI / cargo clippy (push) Successful in 34s
CI / cargo test (push) Successful in 38s
CI / editor keymaps (push) Successful in 1m32s
Reviewed-on: #5
Co-authored-by: Gabriel Fróes Franco <gffranco@gmail.com>
Co-committed-by: Gabriel Fróes Franco <gffranco@gmail.com>
2026-06-04 01:06:53 +00:00
gffranco cd4bfffef9 Ci improvements (#4)
CI / cargo fmt --check (push) Successful in 31s
CI / cargo clippy (push) Successful in 49s
CI / cargo test (push) Successful in 32s
CI / editor keymaps (push) Successful in 1m34s
Reviewed-on: #4
2026-06-03 23:52:46 +00:00
gffranco 0de2bd9d68 revert e530b3d623
CI / cargo fmt --check (push) Successful in 18s
CI / cargo clippy (push) Successful in 26s
CI / cargo test (push) Successful in 35s
CI / editor keymaps (push) Successful in 1m24s
revert Ci improvements (#3)

Reviewed-on: #3
2026-06-03 23:36:11 +00:00
gffranco e530b3d623 Ci improvements (#3)
Reviewed-on: #3
2026-06-03 23:35:10 +00:00
gffranco 8cff0c2d68 ci(release): add libc6-dev-arm64-cross for aarch64-gnu builds
CI / cargo fmt --check (push) Successful in 29s
CI / cargo clippy (push) Successful in 22s
CI / cargo test (push) Successful in 35s
CI / editor keymaps (push) Successful in 2m4s
Release / build x86_64-unknown-linux-gnu (push) Successful in 34s
Release / build aarch64-unknown-linux-musl (push) Successful in 55s
Release / build aarch64-unknown-linux-gnu (push) Successful in 1m50s
Release / build x86_64-unknown-linux-musl (push) Successful in 47s
Release / gitea release (push) Successful in 37s
gcc-aarch64-linux-gnu ships the cross compiler and binutils only;
linking glibc binaries also requires the target libc crt/dev files
(Scrt1.o, crti.o), which live in libc6-dev-arm64-cross.

Without it, the aarch64-unknown-linux-gnu build failed with:
  ld: cannot find Scrt1.o: No such file or directory
  ld: cannot find crti.o: No such file or directory

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 01:27:57 +00:00
gffranco f2fd7d6376 ci(release): pin upload/download-artifact to v3 for Gitea Actions
CI / cargo fmt --check (push) Successful in 22s
CI / cargo clippy (push) Successful in 19s
CI / cargo test (push) Successful in 31s
Release / build x86_64-unknown-linux-gnu (push) Successful in 1m34s
Release / build aarch64-unknown-linux-musl (push) Successful in 55s
Release / build aarch64-unknown-linux-gnu (push) Failing after 57s
Release / build x86_64-unknown-linux-musl (push) Successful in 1m16s
Release / gitea release (push) Has been skipped
CI / editor keymaps (push) Successful in 1m24s
actions/upload-artifact@v4 and download-artifact@v4 require the
GitHub-hosted artifact backend, which Gitea Actions does not
implement (GHESNotSupportedError on v2.0.0+). Downgrade to v3.

v3's download-artifact has no merge-multiple flag and nests each
artifact under artifacts/<artifact-name>/, so the upload loop now
recurses to find the archives.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 22:55:31 +00:00
gffranco 82ff454e0f ci(release): drop cross, use rustup targets + native linkers
CI / cargo fmt --check (push) Successful in 22s
CI / cargo clippy (push) Successful in 23s
CI / cargo test (push) Failing after 16m25s
Release / build x86_64-unknown-linux-gnu (push) Failing after 56s
Release / build aarch64-unknown-linux-musl (push) Failing after 56s
Release / build aarch64-unknown-linux-gnu (push) Failing after 1m43s
Release / build x86_64-unknown-linux-musl (push) Failing after 1m31s
Release / gitea release (push) Has been skipped
CI / editor keymaps (push) Has been cancelled
cross spawns Docker containers per target, but the Gitea Actions
runner doesn't expose /var/run/docker.sock, so every cross-compile
step died with "Cannot connect to the Docker daemon".

Replace with rustup-installed targets plus per-target linker setup:
  - x86_64-gnu: native (no extra deps)
  - aarch64-gnu: gcc-aarch64-linux-gnu from apt
  - x86_64-musl: musl-tools from apt
  - aarch64-musl: rust-lld + link-self-contained (rust-std bundles
    musl libc.a + crt, no apt deps needed)

Verified aarch64-musl path locally: produces a statically linked
ARM aarch64 ELF.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 22:29:36 +00:00
gffranco 02291c2744 phase 10: release pipeline (Gitea release on v* tag)
CI / cargo fmt --check (push) Successful in 33s
CI / cargo clippy (push) Successful in 1m5s
CI / cargo test (push) Successful in 1m13s
P9 resolved (SPEC §11): stay manual. CI builds the four Linux targets
via cross; macOS + Windows binaries are produced ad hoc by maintainers
and uploaded to the same Gitea release.

§8.2/§8.4 updated: crates.io publish is deferred for now (workflow
ships the Gitea release only; can be re-enabled with a one-line
`cargo publish -p nuwiki-core` job once we're ready to publish). The
CARGO_REGISTRY_TOKEN row in §8.4 is struck through accordingly.

release.yaml:

- Trigger: `push` on tags matching `v*`.
- build matrix (4 jobs): x86_64/aarch64 × gnu/musl. Each pins
  Rust 1.83, caches `~/.cargo/{bin,registry,git}` + `target` keyed
  on target + Cargo.lock hash, installs `cross 0.2.5` if not in
  cache, runs `cross build --release -p nuwiki-ls`, packages as
  `nuwiki-ls-{version}-{target}.tar.gz`, uploads as an artifact.
- release job: `needs: build`. Downloads all build artifacts via
  download-artifact@v4 with `merge-multiple: true`; installs jq +
  curl if missing; POSTs a release-create payload to
  `/api/v1/repos/$REPO/releases` using `RELEASE_TOKEN`, then streams
  each `.tar.gz` to `/releases/{id}/assets?name=…`. Up-front check
  fails fast if the secret is unset.

README + SPEC top-line status: "All phases (0–10) complete." 172
tests still green locally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 00:47:40 +00:00