Add CI builder image and use it in the pipeline

builder.Dockerfile bakes the build step's dependencies into
git.teletype.hu/internal/* so the pipeline no longer installs
packages on every run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-31 19:17:14 +02:00
co-authored by Claude Fable 5
parent 051de54ca6
commit 3d30d4ff2f
3 changed files with 42 additions and 13 deletions
+15
View File
@@ -29,4 +29,19 @@ The pipeline uploads `$(PROJECT)-$(VERSION).lua`, `.tic`, `.html.zip`
and `-docs.zip` to the droparea, then triggers and `-docs.zip` to the droparea, then triggers
`/update?platform=tic80&name=$(PROJECT)&version=$(VERSION)`. `/update?platform=tic80&name=$(PROJECT)&version=$(VERSION)`.
## Builder image
The export step uses the TIC-80 Pro image
(`git.teletype.hu/internal/tic80pro`, built from the
`tic80pro-dockerfile` repo). For the lint / minify / docs steps,
`builder.Dockerfile` bakes Lua 5.4 + luacheck + ldoc + zip into
`git.teletype.hu/internal/tic80-luatools`, so the pipeline no longer
runs luarocks (and a C compiler install) on every run:
```sh
docker build --platform linux/amd64 -f builder.Dockerfile \
-t git.teletype.hu/internal/tic80-luatools:latest .
docker push git.teletype.hu/internal/tic80-luatools:latest
```
Detailed documentation lives on the wiki: `/development/tic80`. Detailed documentation lives on the wiki: `/development/tic80`.
+24
View File
@@ -0,0 +1,24 @@
# CI toolbox image for the TIC-80 pipeline's lint / minify / docs steps:
# Lua 5.4 with luacheck and ldoc preinstalled, so the pipeline does not
# run luarocks (and a C compiler install) on every run.
#
# The export step keeps using the separate TIC-80 Pro image
# (git.teletype.hu/internal/tic80pro, built from the tic80pro-dockerfile
# repo) — this image only covers the Lua tooling around it.
#
# Build & push (the CI runner is linux/amd64):
# docker build --platform linux/amd64 -f builder.Dockerfile \
# -t git.teletype.hu/internal/tic80-luatools:latest .
# docker push git.teletype.hu/internal/tic80-luatools:latest
FROM alpine:3.22
RUN apk add --no-cache make zip curl git lua5.4 lua5.4-dev luarocks gcc musl-dev \
&& ln -sf /usr/bin/lua5.4 /usr/bin/lua \
&& ln -sf /usr/bin/luarocks-5.4 /usr/bin/luarocks \
&& luarocks install luacheck \
&& luarocks install ldoc
WORKDIR /workspace
CMD ["/bin/sh"]
+3 -13
View File
@@ -6,28 +6,18 @@ steps:
- 'make ci-version' - 'make ci-version'
- name: lint - name: lint
image: alpine image: git.teletype.hu/internal/tic80-luatools:latest
commands: commands:
- 'apk add --no-cache make lua5.4 lua5.4-dev luarocks gcc musl-dev'
- 'ln -sf /usr/bin/lua5.4 /usr/bin/lua'
- 'ln -sf /usr/bin/luarocks-5.4 /usr/bin/luarocks'
- 'luarocks install luacheck'
- 'make ci-lint' - 'make ci-lint'
- name: minify - name: minify
image: alpine image: git.teletype.hu/internal/tic80-luatools:latest
commands: commands:
- 'apk add --no-cache make lua5.4 curl'
- 'ln -sf /usr/bin/lua5.4 /usr/bin/lua'
- 'make ci-minify' - 'make ci-minify'
- name: docs - name: docs
image: alpine image: git.teletype.hu/internal/tic80-luatools:latest
commands: commands:
- 'apk add --no-cache make lua5.4 lua5.4-dev luarocks gcc musl-dev zip'
- 'ln -sf /usr/bin/lua5.4 /usr/bin/lua'
- 'ln -sf /usr/bin/luarocks-5.4 /usr/bin/luarocks'
- 'luarocks install ldoc'
- 'make ci-docs' - 'make ci-docs'
- name: export - name: export