Skip to content

ci: tighten repository hygiene - #1639

Open
andremmfaria wants to merge 13 commits into
OpenApoc:masterfrom
andremmfaria:ci/1631-repo-hygiene
Open

andremmfaria wants to merge 13 commits into
OpenApoc:masterfrom
andremmfaria:ci/1631-repo-hygiene

Conversation

@andremmfaria

@andremmfaria andremmfaria commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Refs #1631.

This is the first CI modernization slice. It removes legacy repository clutter, cleans generated and reference data from the tracked tree, copies static mod data through CMake, and adds guards for generated source/data churn.

What this PR does:

  • Removes the legacy root Vagrantfile.
  • Removes the tracked temp/ reference dumps (283 PNGs of exported palettes and font glyphs, scratch imagedump output from 2014 that was tracked despite being gitignored). Nothing references them and DEVELOPMENT.md (from docs: add development guide #1630) clearly states that we should not add static assets from the game on the repo.
  • Removes data/test_images/ (12 PNGs of decoded original game graphics) and rewrites test_images to compare SHA-256 digests of the decoded RGBA output instead of committed reference images. Same decoder regression coverage, no game artwork in the repo. The digests were generated from decodes verified pixel-identical to the old references; on an intentional decoder change the test prints the new digests to copy in.
  • Cleans generated data from the tracked tree and moves extractor output to EXTRACTED_DATA_DIR (defaults to the build dir), with a CI guard that fails if a build writes generated data into the source tree.
  • Skips the playlist copy step when the extracted data dir resolves to the source data dir, so in-source builds (AppVeyor) do not create a self-referential ninja dependency cycle.
  • Removes unreferenced data files: data/wallpaper.jpg, data/disturbance.ttf (no TTF loader exists), data/ui/ufopaediablank.png, data/ui/transparent.png, data/logo.svg, data/openapoc_3dlogo.obj, data/battle/battle-icon-{38,39}.png.
  • Removes orphaned extractor scaffolding: extract_unit_animation_pack_template.cpp (unwired since 2017, no longer compiles) and extractors_pch.h (cotire leftover, never wired to the PCH resurrection in Resurrect PCH support, enable on CI #1529).
  • Removes the empty tools/editor/ stub and its BUILD_EDITOR option (the directory never contained sources).
  • Removes appveyor-dev.yml: the AppVeyor project builds every branch, including dev-branch PRs, from appveyor.yml (verified via build artifacts), so the dev config is dead.
  • Guards the update-translations target with if (GETTEXT_FOUND AND LANGUAGES) so it cannot be invoked while translations are paused (it previously failed on a dangling pofiles dependency). The .po/.pot/Transifex files are kept, per the intent of e6132a5.
  • Drops a no-op target_include_directories line referencing the misspelled GLM_INCLIDE_DIR (glm is already inherited transitively).

@andremmfaria
andremmfaria force-pushed the ci/1631-repo-hygiene branch 3 times, most recently from a3ed080 to 725546a Compare August 27, 2026 22:20
@andremmfaria

andremmfaria commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Package size impact, comparing AppVeyor artifacts from master against this PR:

Artifact master PR 1639 delta
Game zip 43,652,517 B 42,994,442 B -658 KB (-1.5%)
Installer exe 30,739,105 B 30,084,497 B -655 KB (-2.1%)
Debug symbols zip 19,545,822 B 19,546,034 B +212 B (noise)

The ~650 KB reduction comes from the deleted unused data files (mostly data/wallpaper.jpg at 637 KB, plus disturbance.ttf, logo assets, and stray PNGs). The temp/ and tooling deletions never shipped in packages, so they don't affect artifact size. The debug zip is unchanged since it's compiler output only.

Update: the measurements above are for 725546ae. The PR has since gained fcd3ca10, which also removes data/test_images/ (12 PNGs, ~158 KB, previously shipped inside the packages), so the final reduction will be slightly larger.

@andremmfaria

Copy link
Copy Markdown
Contributor Author

Tested this PR's build for completeness. What I covered:

  • Overall cityscape navigation
  • Ufopaedia articles
  • Time passage on all speeds (a few in-game weeks to a month)
  • UFO events (cityscape aircraft battle)
  • Diplomacy and related actions (organizations changing ally/hostile tiers)
  • Base management (recruit/fire agents, buy/sell vehicles and equipment)
  • Battlescape:
    • Building invasion
    • Alien building invasion

Not tested: X-COM base defense. I'm comfortable with the gap because this PR touches no gameplay code, and I verified the deletions independently:

  • Every deleted data file (wallpaper.jpg, disturbance.ttf, logo.svg, openapoc_3dlogo.obj, transparent.png, ufopaediablank.png, battle-icon-38/39.png) has zero references in code, forms, or CMake. The only referenced icon (battle-icon-shade.png), is kept.
  • Diffing the packaged zip against master's (build 1441 (https://ci.appveyor.com/project/OpenApoc/openapoc/builds/54608013)): the file lists differ by exactly those 8 files, nothing else. The crashing_vehicles mod gamestate is present and intact after its build-output move to EXTRACTED_DATA_DIR.

@andremmfaria

andremmfaria commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

@FilmBoy84 , Please note that the removed assets on /temp and /data/test_images/ violate our clean room policy (283 exported font glyphs and palettes in the repo since 2014, plus 12 decoded game graphics used as test fixtures). 😬
I recommend merging this PR to clean the tip, then deciding separately on a full history rewrite. The rewrite itself is trivial, but it changes every SHA since the first commit, breaks all open PRs and 111 forks, and still needs GitHub Support to purge the old objects from their cache. Full audit results, including a few derived assets that are still tracked, are in discussion #1644.

@FilmBoy84

Copy link
Copy Markdown
Collaborator

@FilmBoy84 , Please note that the removed assets on /temp and /data/test_images/ violate our clean room policy (283 exported font glyphs and palettes in the repo since 2014, plus 12 decoded game graphics used as test fixtures). 😬 I recommend merging this PR to clean the tip, then deciding separately on a full history rewrite. The rewrite itself is trivial, but it changes every SHA since the first commit, breaks all open PRs and 111 forks, and still needs GitHub Support to purge the old objects from their cache. Full audit results, including a few derived assets that are still tracked, are in discussion #1644.

Good catch, will have a think how best to resolve this and chat to @JonnyH also

I joined the project in 2017 so long after all this was put into the repository 😅

@andremmfaria
andremmfaria force-pushed the ci/1631-repo-hygiene branch 3 times, most recently from 169b935 to 742d005 Compare September 5, 2026 21:16
@andremmfaria
andremmfaria force-pushed the ci/1631-repo-hygiene branch 4 times, most recently from 5056f53 to 1dbbfac Compare September 13, 2026 15:39

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants