Skip to content

Verify Nuklear.h is clean before running tests#907

Open
RobLoach wants to merge 18 commits intoImmediate-Mode-UI:masterfrom
RobLoach:ci-verify-nukelar-clean
Open

Verify Nuklear.h is clean before running tests#907
RobLoach wants to merge 18 commits intoImmediate-Mode-UI:masterfrom
RobLoach:ci-verify-nukelar-clean

Conversation

@RobLoach
Copy link
Contributor

@RobLoach RobLoach commented Mar 7, 2026

Fixes #890

sleeptightAnsiC

This comment was marked as outdated.

Co-authored-by: sleeptightAnsiC <91839286+sleeptightAnsiC@users.noreply.github.com>
@RobLoach
Copy link
Contributor Author

RobLoach commented Mar 7, 2026

@sleeptightAnsiC line 1: syntax error near unexpected token `then'

Looks pretty gross lol. Likely a cleaner way to do that.

@sleeptightAnsiC

This comment was marked as outdated.

Comment on lines +19 to +24
run: make nuke && \
if ! git diff --exit-code nuklear.h ; then \
echo "Did you forgot to rebuild ./nuklear.h ?" >/dev/stderr ; \
echo "Make sure to apply your changes to ./src/* first, and only then rebuild the amalgamation with ./src/paq* !" >/dev/stderr ; \
exit 1 ; \
fi ;
Copy link
Contributor

@sleeptightAnsiC sleeptightAnsiC Mar 7, 2026

Choose a reason for hiding this comment

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

Sorry, I have no idea how to reliably test this on my local machine, and just doing it blindly. According to this SO thread, the | should enable multilines, so it should be fine now (I hope!)

Suggested change
run: make nuke && \
if ! git diff --exit-code nuklear.h ; then \
echo "Did you forgot to rebuild ./nuklear.h ?" >/dev/stderr ; \
echo "Make sure to apply your changes to ./src/* first, and only then rebuild the amalgamation with ./src/paq* !" >/dev/stderr ; \
exit 1 ; \
fi ;
run: |
make nuke
if ! git diff --exit-code nuklear.h ; then
echo "Did you forgot to rebuild ./nuklear.h ?" >/dev/stderr
echo "Make sure to apply your changes to ./src/* first, and only then rebuild the amalgamation with ./src/paq* !" >/dev/stderr
exit 1
fi

Copy link
Contributor

Choose a reason for hiding this comment

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

I have no idea how to reliably test this on my local machine

Found this one: https://github.com/nektos/act
I'm installing it right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved it to a Makefile command, and avoided the nesting.

Copy link
Contributor

Choose a reason for hiding this comment

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

It does work!
image

Copy link
Contributor

@sleeptightAnsiC sleeptightAnsiC Mar 7, 2026

Choose a reason for hiding this comment

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

@RobLoach ah sh1t, I was 5sec too late. Mind reverting your last commit (c2a909b) and accepting this one (#907 (comment)) instead?

No need to have a partial step in the Makefile. It wouldn't really work without CI and could confuse us in the future. Better keep everything in the workflow file alone.

Copy link
Contributor

Choose a reason for hiding this comment

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

this can be resolved

@sleeptightAnsiC
Copy link
Contributor

Just for the record, I had a very different idea on how to implement this. Wanted something that will be possible to run outside of CI. Got some prototype at: https://gist.github.com/sleeptightAnsiC/900062bb7bc0c47b5395e496b452500d

Rob decided this would be too complex. In case only CI is involved, I tend to agree.

Removed comment about adding to Amagamation.
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.

add CI for detecting a mismatch between ./src/* and ./nuklear.h

2 participants