Skip to content

Commit 4bd8365

Browse files
beetlebugorgclaude
andcommitted
Merge docs-truth pass: README/site/notices/CI rewritten for the open-source reality
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 parents acb6897 + 5165be4 commit 4bd8365

13 files changed

Lines changed: 541 additions & 451 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,73 +4,69 @@ on:
44
push:
55
pull_request:
66

7-
# NOTE: libtile57 is now the sole engine, so the build is CGO and links the native
8-
# static lib from the sibling chartplotter-native repo (built with Zig). This
9-
# workflow checks that repo out beside chartplotter-go and builds the lib first.
10-
# If chartplotter-native is PRIVATE, set a repo/PAT secret with read access to it
11-
# and pass it as `token:` on that checkout (a job's default GITHUB_TOKEN cannot
12-
# read a different private repo). UNVALIDATED — needs a test push to confirm the
13-
# setup-zig action version + checkout paths.
7+
# libtile57 is the sole engine: the build is CGO and statically links the native
8+
# lib from the public beetlebugorg/tile57 repo, built with Zig 0.16. That repo is
9+
# checked out as a SIBLING directory named tile57 (go.mod's replace points at
10+
# ../tile57/bindings/go, and the binding's cgo LDFLAGS at its zig-out/lib), with
11+
# submodules so the IHO S-101 catalogues are fetched from the IHO's own repos.
12+
# NOTE: correct-by-construction but unvalidated until pushed to GitHub.
1413
jobs:
1514
build-test:
1615
runs-on: ubuntu-latest
1716
steps:
18-
- name: Checkout chartplotter-go
17+
- name: Checkout chartplotter
1918
uses: actions/checkout@v7
2019
with:
21-
path: chartplotter-go
22-
# The go.mod replace points at ../tile57/bindings/go and the binding's cgo
23-
# LDFLAGS at ../../zig-out/lib/libtile57.a, so the native repo must sit at
24-
# <workspace>/tile57 (sibling of chartplotter-go).
25-
- name: Checkout chartplotter-native (libtile57)
20+
path: chartplotter
21+
- name: Checkout tile57 (libtile57 engine)
2622
uses: actions/checkout@v7
2723
with:
28-
repository: beetlebugorg/chartplotter-native
24+
repository: beetlebugorg/tile57
2925
path: tile57
30-
# token: ${{ secrets.NATIVE_REPO_TOKEN }} # uncomment if private
26+
submodules: recursive
3127
- uses: actions/setup-go@v6
3228
with:
3329
go-version: '1.26'
3430
cache: true
35-
cache-dependency-path: chartplotter-go/go.sum
31+
cache-dependency-path: chartplotter/go.sum
3632
- name: Install Zig
37-
uses: mlugg/setup-zig@v1
33+
uses: mlugg/setup-zig@v2
3834
with:
3935
version: 0.16.0
4036
- name: Build libtile57
4137
run: cd tile57 && zig build
4238
- name: Format check
43-
run: cd chartplotter-go && test -z "$(gofmt -l .)" || (gofmt -l . && exit 1)
39+
run: make -C chartplotter fmt-check
4440
- name: Vet
45-
run: cd chartplotter-go && go vet ./...
41+
run: make -C chartplotter vet
4642
- name: Test
47-
run: cd chartplotter-go && go test ./...
43+
run: make -C chartplotter test
4844
- name: Build
49-
run: cd chartplotter-go && go build ./...
45+
run: make -C chartplotter build
5046

5147
govulncheck:
5248
runs-on: ubuntu-latest
5349
steps:
54-
- name: Checkout chartplotter-go
50+
- name: Checkout chartplotter
5551
uses: actions/checkout@v7
5652
with:
57-
path: chartplotter-go
58-
- name: Checkout chartplotter-native (libtile57)
53+
path: chartplotter
54+
- name: Checkout tile57 (libtile57 engine)
5955
uses: actions/checkout@v7
6056
with:
61-
repository: beetlebugorg/chartplotter-native
57+
repository: beetlebugorg/tile57
6258
path: tile57
63-
# token: ${{ secrets.NATIVE_REPO_TOKEN }} # uncomment if private
59+
submodules: recursive
6460
- uses: actions/setup-go@v6
6561
with:
6662
go-version: '1.26'
6763
cache: true
68-
cache-dependency-path: chartplotter-go/go.sum
64+
cache-dependency-path: chartplotter/go.sum
6965
- name: Install Zig
70-
uses: mlugg/setup-zig@v1
66+
uses: mlugg/setup-zig@v2
7167
with:
7268
version: 0.16.0
7369
- name: Build libtile57
7470
run: cd tile57 && zig build
7571
- name: Vulnerability scan
76-
run: cd chartplotter-go && go run golang.org/x/vuln/cmd/govulncheck@latest ./...
72+
run: cd chartplotter && go run golang.org/x/vuln/cmd/govulncheck@latest ./...

.github/workflows/docs.yml

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- "web/**"
1212
- "cmd/**"
1313
- "internal/**"
14+
- "pkg/**"
1415
- "scripts/fetch-demo-cells.sh"
1516
- "Makefile"
1617
- "go.mod"
@@ -27,16 +28,38 @@ concurrency:
2728
group: pages
2829
cancel-in-progress: true
2930

31+
# The demo + Chart 1 tiles are baked by the chartplotter binary, which links the
32+
# native libtile57 engine — so this build needs the same sibling tile57 checkout
33+
# (with submodules: they fetch the IHO S-101 catalogues from the IHO's own repos)
34+
# and Zig toolchain as ci.yml. The repo is checked out into a subdirectory so
35+
# tile57 can sit beside it, matching go.mod's ../tile57/bindings/go replace.
36+
# NOTE: correct-by-construction but unvalidated until pushed to GitHub.
3037
jobs:
3138
build:
3239
runs-on: ubuntu-latest
3340
steps:
34-
- uses: actions/checkout@v7
41+
- name: Checkout chartplotter
42+
uses: actions/checkout@v7
43+
with:
44+
path: chartplotter
45+
- name: Checkout tile57 (libtile57 engine)
46+
uses: actions/checkout@v7
47+
with:
48+
repository: beetlebugorg/tile57
49+
path: tile57
50+
submodules: recursive
3551

3652
- uses: actions/setup-go@v6
3753
with:
3854
go-version: "1.26"
3955
cache: true
56+
cache-dependency-path: chartplotter/go.sum
57+
- name: Install Zig
58+
uses: mlugg/setup-zig@v2
59+
with:
60+
version: 0.16.0
61+
- name: Build libtile57
62+
run: cd tile57 && zig build
4063

4164
# Cache the curated NOAA demo-cell downloads (one per band over Annapolis),
4265
# keyed on the cell list / fetch script so a change re-downloads. Lets the
@@ -45,57 +68,52 @@ jobs:
4568
uses: actions/cache@v4
4669
with:
4770
path: ${{ runner.temp }}/demo-cells
48-
key: demo-cells-${{ hashFiles('scripts/fetch-demo-cells.sh', 'Makefile') }}
71+
key: demo-cells-${{ hashFiles('chartplotter/scripts/fetch-demo-cells.sh', 'chartplotter/Makefile') }}
4972

5073
# Cache the S-52 PresLib "ECDIS Chart 1" source cells (the IHO draft zip is
5174
# fetched once and extracted), keyed on the fetch script so a change re-pulls.
5275
- name: Cache PresLib Chart 1 cells
5376
uses: actions/cache@v4
5477
with:
5578
path: ${{ runner.temp }}/preslib-cells
56-
key: preslib-cells-${{ hashFiles('scripts/fetch-preslib-cells.sh') }}
79+
key: preslib-cells-${{ hashFiles('chartplotter/scripts/fetch-preslib-cells.sh') }}
5780

5881
# Build the read-only widget demo bundle into docs/static/demo so Docusaurus
59-
# copies it into the published site at /chartplotter/demo/. Needs the S-101
60-
# catalogue (IHO material kept out of the repo): clone it and let `make build`
61-
# (a dep of `make demo`) embed it. The bundle is pure static files — no backend.
82+
# copies it into the published site at /chartplotter/demo/. The S-101
83+
# catalogue is embedded in libtile57 (fetched via the tile57 submodules
84+
# above), so no catalogue clone or --s101 override is needed. The bundle is
85+
# pure static files — no backend.
6286
- name: Build live demo bundle (docs/static/demo)
6387
run: |
64-
git clone --depth 1 https://github.com/iho-ohi/S-101_Portrayal-Catalogue.git "$RUNNER_TEMP/s101-pc"
65-
git clone --depth 1 https://github.com/iho-ohi/S-101-Documentation-and-FC.git "$RUNNER_TEMP/s101-fc"
66-
make demo \
67-
S101_PC="$RUNNER_TEMP/s101-pc/PortrayalCatalog" \
68-
S101_FC="$RUNNER_TEMP/s101-fc/S-101FC/FeatureCatalogue.xml" \
88+
make -C chartplotter demo \
6989
DEMO_CACHE="$RUNNER_TEMP/demo-cells" \
7090
DEMO_OUT="docs/static/demo"
7191
7292
# Bake the S-52 "ECDIS Chart 1" reference sheet to tiles into docs/static/chart1
7393
# (published at /chartplotter/chart1/). The symbol-compliance docs page embeds
74-
# it live, reusing the demo bundle's frontend assets. Reuses the S-101 catalogue
75-
# cloned above; the source cells come from the IHO PresLib draft (fetched once).
94+
# it live, reusing the demo bundle's frontend assets; the source cells come
95+
# from the IHO PresLib draft (fetched once).
7696
- name: Build live Chart 1 tiles (docs/static/chart1)
7797
run: |
78-
make demo-chart1 \
79-
S101_PC="$RUNNER_TEMP/s101-pc/PortrayalCatalog" \
80-
S101_FC="$RUNNER_TEMP/s101-fc/S-101FC/FeatureCatalogue.xml" \
98+
make -C chartplotter demo-chart1 \
8199
PRESLIB_CACHE="$RUNNER_TEMP/preslib-cells" \
82100
DEMO_CHART1_OUT="docs/static/chart1"
83101
84102
- uses: actions/setup-node@v6
85103
with:
86104
node-version: "20"
87105
cache: npm
88-
cache-dependency-path: docs/package-lock.json
106+
cache-dependency-path: chartplotter/docs/package-lock.json
89107
- name: Install
90-
working-directory: docs
108+
working-directory: chartplotter/docs
91109
run: npm ci
92110
- name: Build
93-
working-directory: docs
111+
working-directory: chartplotter/docs
94112
run: npm run build
95113

96114
- uses: actions/upload-pages-artifact@v3
97115
with:
98-
path: docs/build
116+
path: chartplotter/docs/build
99117

100118
deploy:
101119
needs: build

.github/workflows/release.yml

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
name: Release
22

3+
# chartplotter is SOURCE-ONLY: no binaries are ever published. Built binaries
4+
# embed the IHO S-101 catalogues (fetched at build time via the tile57 repo's
5+
# submodules from the IHO's own repositories), and the IHO's redistribution
6+
# terms are unresolved — see THIRD-PARTY-NOTICES.md. So a tag produces only a
7+
# GitHub release with generated notes (GitHub attaches the source archives
8+
# automatically); users clone tile57 + chartplotter and build locally per the
9+
# README.
10+
#
11+
# NOTE: unvalidated until a v* tag is pushed.
12+
313
on:
414
push:
515
tags:
@@ -9,43 +19,18 @@ permissions:
919
contents: write
1020

1121
jobs:
12-
goreleaser:
22+
source-release:
1323
runs-on: ubuntu-latest
1424
steps:
1525
- uses: actions/checkout@v7
1626
with:
1727
fetch-depth: 0
1828

19-
- uses: actions/setup-go@v6
20-
with:
21-
go-version: "1.26"
22-
cache: true
23-
24-
# NOTE: this release workflow is STALE — it still cross-compiles CGO-free,
25-
# which no longer builds (libtile57 is a CGO dep). It needs the same rework as
26-
# .goreleaser.yaml: build libtile57 with Zig per target, single CGO build,
27-
# darwin on a macOS runner. The S-101 catalogue now lives inside libtile57, so
28-
# there is no more catalogue-sync step.
29-
30-
# quill signs + notarizes the macOS binaries from this Linux runner (no Mac
31-
# needed). The GoReleaser build hook (scripts/quill-sign.sh) invokes it.
32-
- name: Install quill
33-
run: |
34-
go install github.com/anchore/quill/cmd/quill@latest
35-
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
36-
37-
- name: Run GoReleaser
38-
uses: goreleaser/goreleaser-action@v7
39-
with:
40-
distribution: goreleaser
41-
version: "~> v2"
42-
args: release --clean
29+
- name: Create source-only release
4330
env:
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
# macOS signing/notarization (quill). Set these as repo secrets; if they
46-
# are absent the hook skips signing and the release still builds.
47-
QUILL_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
48-
QUILL_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
49-
QUILL_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
50-
QUILL_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}
51-
QUILL_NOTARY_ISSUER: ${{ secrets.MACOS_NOTARY_ISSUER }}
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: |
33+
gh release create "$GITHUB_REF_NAME" \
34+
--verify-tag \
35+
--generate-notes \
36+
--notes "**Source-only release.** No binaries are published: built binaries embed the IHO S-101 catalogues, whose redistribution terms are unresolved (see THIRD-PARTY-NOTICES.md). Build from source per the README: clone [tile57](https://github.com/beetlebugorg/tile57) as a sibling, init its submodules, then \`make build\` (Go 1.26+, Zig 0.16)."

.goreleaser.yaml

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)