Skip to content

Add CI, nightly builds and pull request build links - #1273

Open
rr- wants to merge 4 commits into
TombEngine:developfrom
rr-:develop
Open

rr- wants to merge 4 commits into
TombEngine:developfrom
rr-:develop

Conversation

@rr-

@rr- rr- commented Jul 30, 2026

Copy link
Copy Markdown

Right now nothing builds the solution or runs the test suite automatically. This adds GitHub Actions on Windows runners (free for public repos) to build and test everything, then reuses that build so testers have something to download.

  • Pull requests: build, run tests, and post a comment with a downloadable artifact (kept for 15 days)
  • Pushes to develop: same as above, plus update a rolling nightly pre-release

job_build.yml is shared between both workflows, so the build logic only lives in one place.

This is demonstrated on my fork:

End-to-end CI takes about 2m40s.
The snapshot ZIP is about 30 MB. The full build output is around 370 MB, mostly because of TIDE/Templates and native libraries for platforms an x64 build never loads. Those are stripped out, and the ZIP is meant to be extracted over an existing installation. Only TombIDE actually uses the templates. If you'd rather have the snapshots be self-contained, I can do that instead, but I'd recommend against it, as serving 400 MB for nightly builds and PR snapshots seems excessive :)

The first commit fixes a failing test. CanInvertFaces_WhenProcessAnimationsIsTrue_ReturnsFalse has been failing on develop because it leaves ProcessGeometry at its default (true), while CanInvertFaces is based entirely on that property. In production, ProcessAnimations = true is always paired with ProcessGeometry = false. I'm happy to split that fix into a separate PR if you'd rather keep it separate.

Releases are unchanged; installers are still built manually and published to TombEditorReleases. The nightly snapshots are just ZIPs with no installer, published under a single rolling pre-release and clearly marked as "not a release" – they're just a testing channel, not a second set of releases.

Two small caveats: comment_build.yml only runs from the default branch, so PR comments won't appear until this lands on master. Also, CI won't pass on master as it stands, since TombLib.Rendering requires full MSBuild rather than dotnet build.

rr- added 3 commits July 30, 2026 12:09
The test only set ProcessAnimations, leaving ProcessGeometry at its
default of true. CanInvertFaces is defined purely as ProcessGeometry, so
it correctly returned true and the assert failed.

Animation settings always disable geometry processing in practice, as in
AnimationSettingsPresets and the WadTool animation import, so the test
now sets ProcessGeometry explicitly to match.
Nothing built the solution or ran the test suites automatically. Pull
requests and pushes to master now build Release x64 and run both MSTest
suites, and pushes to develop additionally publish a portable snapshot to
a single rolling "nightly" pre-release. Runners have to be Windows, as
all but one project targets net6.0-windows and the test projects touch
WPF.

The build itself lives in a reusable job_build.yml that both workflows
call, so the packaging rules exist in one place.

Snapshots are a developer channel and stay clear of the release process:
stable installers are still built by hand and published to
TombEngine/TombEditorReleases, so snapshots ship without an NSIS
installer to keep the two apart. They are also pruned to an overlay,
dropping TombIDE project templates and native libraries for other
platforms, which takes the download from 370 MB to roughly 30 MB. The
pruning throws if either path is missing, so a layout change cannot
silently restore the full package.
Build artifacts are kept for 15 days and linked from a comment on the
pull request, which is edited in place on later pushes rather than added
to.

This has to be a separate workflow_run workflow, because a pull_request
run from a fork only gets a read-only token and cannot comment. Comments
carry GitHub's own artifact URL alongside a nightly.link mirror: the
former always works but needs an account, the latter needs no account but
is a third party that can go down. Expiry dates are read back from the
API rather than computed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces GitHub Actions-based CI for building and testing the Tomb Editor solution on Windows runners, adds a rolling nightly snapshot release from develop, and posts downloadable build artifact links back to pull requests. It also fixes a previously failing TombLib unit test by aligning the test setup with the production settings combination.

Changes:

  • Add reusable Windows build+test workflow (job_build.yml) that restores, builds, runs both test suites, and uploads packaged build + test results artifacts.
  • Add CI workflow for PRs (and master pushes) plus a Nightly workflow for develop that publishes a rolling nightly pre-release ZIP.
  • Add a workflow_run-based commenter workflow that posts/updates artifact download links on the associated PR.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
TombLib/TombLib.Test/ViewModels/GeometryIOSettingsWindowViewModelTests.cs Fixes a failing test by setting ProcessGeometry = false when ProcessAnimations = true.
.github/workflows/ci.yml Adds the main CI entrypoint that calls the shared build/test workflow for PRs and master.
.github/workflows/job_build.yml Implements the shared Windows build/test/package logic and publishes artifacts.
.github/workflows/nightly.yml Adds a develop-triggered build and rolling prerelease publisher for nightly snapshots.
.github/workflows/comment_build.yml Adds a workflow-run triggered PR commenter that posts artifact download links.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/comment_build.yml Outdated
Comment on lines +89 to +93
const { data: comments } = await github.rest.issues.listComments({
owner, repo, issue_number: pr.number,
});
const existing = comments.filter(c => c.body.includes(marker)).pop();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@Stranger1992

Copy link
Copy Markdown
Member

HI @rr- : this is a highly requested feature. But how would this work with new PR's ? Will it automatically compile based on that PR or will it only compile the develop branch nightly?

@rr-

rr- commented Sep 6, 2026

Copy link
Copy Markdown
Author

Not nightly – on every push to develop after merging.

@Stranger1992

Copy link
Copy Markdown
Member

Not nightly – on every push to develop after merging.

Thats cool. I dont have any objections to this (never did tbh) but is there anything you'd like to add?

Also: would you be willing / able to do this for TombEngine? 👼🏻

@rr-

rr- commented Sep 10, 2026

Copy link
Copy Markdown
Author

Not nightly – on every push to develop after merging.

Thats cool. I dont have any objections to this (never did tbh) but is there anything you'd like to add?

Also: would you be willing / able to do this for TombEngine? 👼🏻

No, I don't think there's anything left to add :) but please ping me in case there are trouble / the actions work finicky.

I can take a look at TombEngine but promise no results or any time frame :)

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.

3 participants