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.
3037jobs :
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
0 commit comments