-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add github actions #195
add github actions #195
Conversation
this runs both default and minimal build with gcc and clang. tcc seems to fail at link time for some reason.
@TAAPArthur Any clue on why tcc is failing at linking? |
I'll take a look. Without looking, I'd guess because it is not to using a recent tcc version. The last "stable" release is really old and behind the git version. |
Yeah it looks like 0.9.27-8 is used. Probably should just build tcc from mob (or some recent hash) if we want to use tcc. Maybe something like
Or of course we could find some binary somewhere. Can confirm that tcc can build nsixv |
Now it fails compilation and says something about not finding edit: fixed in b39ae9f |
Wonder if someone here is familiar with github actions and can take a look into this for best practices and whatnot. |
fixes all -Wshadow related warnings (on gcc). this would allow us to use `-Wshadow` in github workflow (nsxiv#195). i've thought about adding `-Wshadow` to our Makefile as well, but decided against it to keep the Makefile CFLAGS barebore/minimal.
This reverts commit a12e10b. tcc will fail with -Werror due to a false positive: > commands.c:66: error: function might return no value: 'cg_quit'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very well-versed with GitHub Actions but I would assume that the building/installing TinyCC could be separated into a different step from that of building nsxiv.
It seems like that could even be extracted to a separate job, so that the building of TinyCC only happens once, then the full-build
and minimal-build
jobs run in parallel after that completes.
So far I've just added some comments on usage of commands, not the structure of the actions themselves.
Edit: It looks like we can even cache dependencies so we don't have to rebuild TinyCC and/or reinstall the debian packages every time: https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows
@kdkasad Thanks for the review, I've pushed the As for the cache, I'll look into it in a bit. But without looking, on our |
Thinking again, since our build process is rather fast (25 seconds) I'm fine leaving things be and not bother with caching. |
fixes all -Wshadow related warnings (on gcc). this would allow us to use `-Wshadow` in github workflow (nsxiv#195). i've thought about adding `-Wshadow` to our Makefile as well, but decided against it to keep the Makefile CFLAGS barebore/minimal.
Unless someone wants to bother with caching, I think this PR should be ready to be merged. |
The first build failed, failing when executing |
I've enabled "allow all actions" in both the repo and the org. The workflow seems to be running now, though it failed at cloning tcc. #194 |
this runs both default and minimal build with gcc, clang and tcc.
The workflow fails on my repo as well, Seems like the Tcc repo isn't reliable. I've switched to a github mirror, cleaned up the commit msg and forced push the changes. |
Now everything is working as expected: https://github.com/nsxiv/nsxiv/runs/4658052056?check_suite_focus=true The minimal build fails, but that's expected due to #194 |
Regarding re-triggering checks, there's a button in the checks tab of a PR that allows running all jobs again, which seems better than closing and reopening. |
That only appears when a workflow has failed afaik. The workflow never ran on that PR to begin with, so had to close and reopen. |
fixes all -Wshadow related warnings (on gcc). this would allow us to use `-Wshadow` in github workflow (nsxiv#195). i've thought about adding `-Wshadow` to our Makefile as well, but decided against it to keep the Makefile CFLAGS barebore/minimal.
fixes all -Wshadow related warnings (on gcc). this would allow us to use `-Wshadow` in github workflow (nsxiv#195). i've thought about adding `-Wshadow` to our Makefile as well, but decided against it to keep the Makefile CFLAGS barebore/minimal.
fixes all -Wshadow related warnings (on gcc). this would allow us to use `-Wshadow` in github workflow (#195). i've thought about adding `-Wshadow` to our Makefile as well, but decided against it to keep the Makefile CFLAGS barebore/minimal.
this runs both default and minimal build with gcc and clang.
tcc seems to fail at link time for some reason.
I'm not familiar with github actions/workflow, simply hacked this together from the provided template. Seems to be working fine, here's some example:
(minimal build failing due to
EXIT_SUCCESS
not being defined)(PR fixing it)