Skip to content

👷 ci: Add GitHub Actions build and smoke test pipeline#38

Open
justwheel wants to merge 1 commit intomasterfrom
add/ci
Open

👷 ci: Add GitHub Actions build and smoke test pipeline#38
justwheel wants to merge 1 commit intomasterfrom
add/ci

Conversation

@justwheel
Copy link
Copy Markdown
Collaborator

This project has had no automated testing or CI for its entire history. As a code-preservation project, manual play-testing was the only way to verify changes didn't break the game. This commit adds a GitHub Actions pipeline that proves compilation succeeds and the game starts correctly on every push and pull request.

The pipeline tests with both GCC and Clang via a build matrix, catching compiler-specific issues in parallel. The Makefile defaults to -ltermcap which is unavailable as a standalone library on the CI runner; the workflow overrides with LIBS="-lncurses" which provides termcap compatibility through ncurses.

A smoke test pipes LOOK, QUIT, Y into the game and asserts the welcome banner, opening room description, and clean exit message all appear. This catches initialization failures, data file corruption, and command loop regressions without modifying any game source.

Compilation caching via ccache keeps repeat builds fast. Each compiler gets its own cache keyed on source file content hashes, with prefix- based restore, so a single changed file still benefits from cached results for the other 32 compilation units. Concurrency controls cancel in-progress runs when new commits land on the same ref.

No game source files are modified — the CI infrastructure is entirely additive and lives in .github/.

@justwheel justwheel requested review from Jan200101 and devshane April 20, 2026 04:06
@justwheel justwheel self-assigned this Apr 20, 2026
@justwheel justwheel added the enhancement New feature or improvement label Apr 20, 2026
@justwheel justwheel added this to the v1.1.0 milestone Apr 20, 2026
This project has had no automated testing or CI for its entire history.
As a code-preservation project, manual play-testing was the only way to
verify changes didn't break the game. This commit adds a GitHub Actions
pipeline that proves compilation succeeds and the game starts correctly
on every push and pull request.

The pipeline tests with both GCC and Clang via a build matrix, catching
compiler-specific issues in parallel. The Makefile defaults to
`-ltermcap` which is unavailable as a standalone library on the CI
runner; the workflow overrides with `LIBS="-lncurses"` which provides
termcap compatibility through `ncurses`.

A smoke test pipes LOOK, QUIT, Y into the game and asserts the welcome
banner, opening room description, and clean exit message all appear.
This catches initialization failures, data file corruption, and command
loop regressions without modifying any game source.

Compilation caching via `ccache` keeps repeat builds fast. Each compiler
gets its own cache keyed on source file content hashes, with prefix-
based restore, so a single changed file still benefits from cached
results for the other 32 compilation units. Concurrency controls cancel
in-progress runs when new commits land on the same ref.

No game source files are modified — the CI infrastructure is entirely
additive and lives in `.github/`.

Assisted-by: Claude Opus 4.6 (1M context)
Signed-off-by: Justin Wheeler <jwheel@fedoraproject.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd CI pipelines, GitHub Actions, automated testing enhancement New feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant