Skip to content

Commit 0b65c2b

Browse files
authored
ci: add GitHub Actions CI + prepare v0.1.2 release (#6)
* ci: add github actions ci pipeline - gate every PR and push to main through the Makefile's verification discipline: gofmt → vet → race tests (with coverage) → official Lua 5.4 conformance fixtures, so the repo's pre-push gate now runs remotely - add CI-only hardening the Makefile doesn't cover: govulncheck plus a cross-platform build matrix (ubuntu/macos/windows) proving the README's portability claim; bench runs observationally (non-gating) - trigger only on source-affecting paths so doc-only changes skip CI Tags: #ci #github-actions Co-Authored-By: htjulia <htjulia1@gmail.com> * style: gofmt-align version constants in luaconf.go - the new CI gofmt gate flagged misaligned trailing comments on the LuaRelease/Version consts; no semantic change chore: raise minimum Go to 1.25.11 - CI govulncheck flagged 4 stdlib advisories present in the go1.24.x standard library — GO-2026-5037 (crypto/x509), GO-2026-4971 (net), GO-2026-4602 (os), GO-2026-4601 (net/url) - all are fixed in the go1.25.x stdlib; bump the go directive so builds pull the patched standard library and the govulncheck gate passes - raises this library's minimum Go requirement to 1.25.11 Tags: #ci #security #gofmt Co-Authored-By: htjulia <htjulia1@gmail.com> * chore(release): prepare v0.1.2 - bump the engine Version constant to 0.1.2 (exposed to Lua as _LUAPURE_VERSION and by the debug MCP adapters); it had been left at 0.1.0 through the 0.1.1 release, so the banner now reports the real release version - add the [0.1.2] CHANGELOG entry covering the new CI pipeline and the Go 1.25.11 security bump docs: state the Go 1.25.11 minimum in the README - update the Go badge and the requirements line to 1.25.11 so the public library advertises the correct minimum after the stdlib security bump Tags: #release #docs #changelog Co-Authored-By: htjulia <htjulia1@gmail.com>
1 parent f56afe2 commit 0b65c2b

7 files changed

Lines changed: 161 additions & 8 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# GitHub Actions CI — mirrors the Makefile's verification discipline
2+
# (vet → test/race → conformance → build, plus bench) on pull requests and
3+
# pushes to main, and only when source files change (doc-only changes are
4+
# skipped). The Makefile is the single source of truth: jobs call `make <target>`
5+
# where a target exists; the extra hardening steps (gofmt gate, govulncheck,
6+
# cross-platform build, coverage) are CI-only and call `go` directly.
7+
#
8+
# luapure is a zero-dependency pure-Go port, so there is no go.sum: `make test`
9+
# is already race-enabled and `make conformance` runs the official Lua 5.4
10+
# fixtures as a hard gate.
11+
12+
name: CI
13+
14+
on:
15+
push:
16+
branches: [main]
17+
paths:
18+
- "**/*.go"
19+
- "go.mod"
20+
- "Makefile"
21+
- "conformance/**"
22+
- "_lua5.4-tests/**"
23+
- "_glue5.4-tests/**"
24+
- ".github/workflows/ci.yml"
25+
pull_request:
26+
paths:
27+
- "**/*.go"
28+
- "go.mod"
29+
- "Makefile"
30+
- "conformance/**"
31+
- "_lua5.4-tests/**"
32+
- "_glue5.4-tests/**"
33+
- ".github/workflows/ci.yml"
34+
35+
concurrency:
36+
group: ci-${{ github.ref }}
37+
cancel-in-progress: true
38+
39+
jobs:
40+
# Fast fail on formatting before spending time on the heavier jobs.
41+
format:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v7
45+
- uses: actions/setup-go@v6
46+
with:
47+
go-version-file: go.mod
48+
- name: gofmt
49+
run: |
50+
unformatted=$(gofmt -l .)
51+
if [ -n "$unformatted" ]; then
52+
echo "These files are not gofmt-clean:"; echo "$unformatted"
53+
exit 1
54+
fi
55+
56+
# The canonical pre-push gate: vet → race-enabled tests (with coverage) →
57+
# official Lua 5.4 conformance fixtures. Equivalent to `make check` minus the
58+
# build step (which the cross-platform build job below proves separately).
59+
verify:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v7
63+
- uses: actions/setup-go@v6
64+
with:
65+
go-version-file: go.mod # tracks the toolchain pinned in go.mod
66+
cache: true # build cache, keyed on go.mod (no go.sum: zero deps)
67+
- run: make vet
68+
# `make test` is `go test -race -count=1 ./...`; add a coverage profile.
69+
# covermode=atomic is required under -race.
70+
- name: test (race, with coverage)
71+
run: go test -race -covermode=atomic -coverprofile=coverage.out -count=1 ./...
72+
- name: conformance (official Lua 5.4 fixtures)
73+
run: make conformance
74+
- name: upload coverage
75+
uses: actions/upload-artifact@v7
76+
with:
77+
name: coverage
78+
path: coverage.out
79+
if-no-files-found: warn
80+
81+
# Scan dependencies and code for known vulnerabilities.
82+
govulncheck:
83+
runs-on: ubuntu-latest
84+
steps:
85+
- uses: actions/checkout@v7
86+
- uses: actions/setup-go@v6
87+
with:
88+
go-version-file: go.mod
89+
cache: true
90+
- name: govulncheck
91+
env:
92+
# govulncheck@latest requires a newer Go than go.mod pins; allow the
93+
# toolchain to auto-upgrade for the tool install. setup-go v6 defaults
94+
# GOTOOLCHAIN to "local", which otherwise blocks this.
95+
GOTOOLCHAIN: auto
96+
run: |
97+
go install golang.org/x/vuln/cmd/govulncheck@latest
98+
govulncheck ./...
99+
100+
# build runs only after verify passes, mirroring the Makefile's
101+
# "build only after tests pass", and proves the engine + all `go` targets are
102+
# cross-platform. `make` isn't assumed on Windows, so call `go` directly.
103+
build:
104+
needs: verify
105+
strategy:
106+
fail-fast: false
107+
matrix:
108+
os: [ubuntu-latest, macos-latest, windows-latest]
109+
runs-on: ${{ matrix.os }}
110+
steps:
111+
- uses: actions/checkout@v7
112+
- uses: actions/setup-go@v6
113+
with:
114+
go-version-file: go.mod
115+
cache: true
116+
- run: go vet ./...
117+
- run: go build ./...
118+
119+
# bench is observational, not a gate — a slow/noisy run must not fail CI.
120+
bench:
121+
needs: verify
122+
runs-on: ubuntu-latest
123+
continue-on-error: true
124+
steps:
125+
- uses: actions/checkout@v7
126+
- uses: actions/setup-go@v6
127+
with:
128+
go-version-file: go.mod
129+
cache: true
130+
- run: make bench

‎CHANGELOG.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,28 @@ separately from the luapure release version.
1414
- Performance: keep narrowing the speed/allocation gap to the reference (see
1515
[`ROADMAP.md`](ROADMAP.md) for the current levers).
1616

17+
## [0.1.2] — 2026-07-05
18+
19+
Tooling and security. No API or observable-behaviour change; conformance
20+
stays at 30/33.
21+
22+
### Added
23+
- **Continuous integration.** A GitHub Actions workflow
24+
([`.github/workflows/ci.yml`](.github/workflows/ci.yml)) now gates every pull
25+
request and push to `main`: gofmt → `go vet` → race-enabled tests with
26+
coverage → the official Lua 5.4 conformance fixtures. CI-only hardening adds
27+
`govulncheck`, a cross-platform build matrix (Linux/macOS/Windows), and an
28+
observational (non-gating) benchmark run.
29+
30+
### Changed
31+
- **Minimum Go raised to 1.25.11.** `govulncheck` flagged four advisories in
32+
the go1.24.x standard library — GO-2026-5037 (`crypto/x509`), GO-2026-4971
33+
(`net`), GO-2026-4602 (`os`), and GO-2026-4601 (`net/url`) — all fixed in
34+
go1.25.x. Bumping the `go` directive pulls the patched standard library.
35+
- **Version constant synced.** `Version` (exposed to Lua as `_LUAPURE_VERSION`,
36+
and reported by the debug MCP adapters) now tracks the release version; it had
37+
been left at `0.1.0` through the 0.1.1 release.
38+
1739
## [0.1.1] — 2026-06-29
1840

1941
Performance and documentation. No API or observable-behaviour change;

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# LuaPure — a pure Go Lua VM
22

33
[![Go Reference](https://pkg.go.dev/badge/github.com/htcom-code/lua-pure/lua.svg)](https://pkg.go.dev/github.com/htcom-code/lua-pure/lua)
4-
[![Go 1.24+](https://img.shields.io/badge/Go-1.24%2B-00ADD8.svg)](go.mod)
4+
[![Go 1.25.11+](https://img.shields.io/badge/Go-1.25.11%2B-00ADD8.svg)](go.mod)
55
[![Lua 5.4.8](https://img.shields.io/badge/Lua-5.4.8-000080.svg)](https://www.lua.org/)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
77
[![Status: alpha](https://img.shields.io/badge/status-alpha-orange.svg)](#project-status)
@@ -61,7 +61,8 @@ or tag if you depend on it. [`ROADMAP.md`](ROADMAP.md) tracks what comes next
6161
go get github.com/htcom-code/lua-pure/lua
6262
```
6363

64-
Requires Go 1.24 (uses the `weak` package for weak tables).
64+
Requires Go 1.25.11 (the `weak` package for weak tables needs 1.24; the
65+
1.25.11 floor also clears known standard-library security advisories).
6566

6667
## Quickstart
6768

‎cmd/luadbg-mcp/main.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func main() {
5959
NewState: newState,
6060
Source: resolver,
6161
Name: "luapure-debug",
62-
Version: "0.1.0",
62+
Version: "0.1.2",
6363
}
6464

6565
t := debugmcp.NewStdioTransport(os.Stdin, os.Stdout, nil)

‎debugmcp/server.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (s *Server) initialize(params json.RawMessage) any {
148148
name = "luapure-debug"
149149
}
150150
if version == "" {
151-
version = "0.1.0"
151+
version = "0.1.2"
152152
}
153153
return map[string]any{
154154
"protocolVersion": ver,

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/htcom-code/lua-pure
22

3-
go 1.24
3+
go 1.25.11

‎lua/luaconf.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ package luapure
3232
// here and to Lua via the _LUAPURE_VERSION global.
3333
const (
3434
LuaVersion = "Lua 5.4" // == _VERSION; PUC LUA_VERSION (DO NOT CHANGE)
35-
LuaRelease = "5.4.8" // PUC patch level this engine tracks
36-
Version = "0.1.0" // luapure implementation version
35+
LuaRelease = "5.4.8" // PUC patch level this engine tracks
36+
Version = "0.1.2" // luapure implementation version
3737
)
3838

3939
// VersionString returns the full implementation banner, e.g.
40-
// "luapure 0.1.0 (Lua 5.4.8)". It is the value exposed to Lua as the global
40+
// "luapure 0.1.2 (Lua 5.4.8)". It is the value exposed to Lua as the global
4141
// _LUAPURE_VERSION.
4242
func VersionString() string {
4343
return "luapure " + Version + " (Lua " + LuaRelease + ")"

0 commit comments

Comments
 (0)