-
Notifications
You must be signed in to change notification settings - Fork 38
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
GitHub workflows #75
base: master
Are you sure you want to change the base?
GitHub workflows #75
Conversation
* builds release artifacts compiled with debug symbols
I need to get around to this soon. Sorry for the delay. I'm really unfamiliar with the GitHub infrastructure around this so I need to devote some time to testing it. Will try this weekend but if not, will be in a few weeks as a conference is coming up. |
Here's what the workflows looks like in action: |
Ok. I need to get on this. Maybe I'll try tomorrow. How does this differ from the other PR from December that is still outstanding? If I understand correctly, you have Linux, Windows, and MacOS, and it looks like you are generating artifacts, too. Is the best way to test to fork the repo privately and edit there? |
6afc842
to
d0efe1a
Compare
@trzy most convenient way to test is to add a commit to this branch, and open a pull request to your personal fork. You should then see a PR tests workflow under Actions. |
d0efe1a
to
100a6a2
Compare
6c534ab
to
9a1b9b1
Compare
Also added a workflow dispatch trigger. Merge into the primary branch of your personal repo to test the ability to trigger the workflow ad-hoc. |
9a1b9b1
to
a834762
Compare
Ok, I really need to get on this and test it out. Can you give me an overview here? If it produces build artifacts that are identical to what I produce with my build bot (including properly packaging the ZIP file with all the required subdirectories, README.txt, LICENSE.txt, etc.), then we could really use this to distribute binaries. |
@trzy Yes, that was my intention. The builds contain everything you put in your releases. |
55f9f96
to
1e60f08
Compare
Opened this almost 10 months ago, I don't recall how I got around any errors, or that there were errors. |
Thanks. Taking a look, it seems like the solution for MacOS was to manually download and direct the makefile to SDL2 files, which feels a bit hacky to me, as the version of SDL2 is hard coded into the action. I'm curious if we can direct it to the homebrew installation we can perform with actions to something like Additionally, upon downloading the artifact, it looks like you're zipping the tarball somehow. This seems redundant. I'm not running a Windows machine right now to validate that build, but this does look like a better more robust implementation than mine otherwise. Good work. |
Sorry, haven't been following along. What is the current state of this? I know there are some macOS Makefile issues apparently wrt SDL2. I'd like to try to find time to tackle this in the next week and get it merged in. |
This PR fixes the issues building on OSX with SDL2 framework.
👍 I am going to make one more change, refactor the current workflow into a template, and create two workflows that use it, one for CI and another for releases. |
…rmodel from being rebuilt each time because the object directory timestamp changes during builds
Ok fixed it. The problem is that directories cannot be ordinary dependencies, their timestamp is always updated as object files are written to them. So when you build again, the directory is seen to have changed, and everything gets rebuilt needlessly. The solution was to make $(OBJ_DIR) an "order-only dependency" by putting it to the right of a '|' separator. |
* make Frameworks order only dep * use file name variable in target rules * osx build with latest sdl2 frameworks like CI * remove macos sdl lookup workflow steps
1058f3f
to
89eba8f
Compare
@trzy Cherry-picked your changes onto the PR. |
89eba8f
to
bd14c86
Compare
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.
Looks like everything is in place. I just need to test this out before approving for merge. Will try to give it a spin tonight. My understanding is that I have to make a private fork and test there?
118887d
to
27d14dc
Compare
No need to test on private fork. Workflows are successfully running here now. |
|
m68k compilation fails sometimes
Seems that parallel builds fail sometimes. Disabled parallel make in workflow job for now. |
93fd138
to
33f5458
Compare
I don't understand why the Musashi dependency causes this problem. I've looked at the rules countless times and it seems like the dependencies are all set up correctly and make should be able to resolve them. My build bot also avoids parallel builds for this reason. I can think of a fix for this but let's not worry about it for now -- serial builds are fine. |
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 think this is just about ready to go. Couple nit picks/questions:
- When this gets merged to master, the artifacts will be visible on the project page, right? If so, I'm wondering about the naming of the artifacts. When I go to "Actions" and view the builds now, they look like this:
Can we make these labels more consistent with the actual archive filenames (that is, including the git revision) and ensure everything is lowercased? Or am I misunderstanding how they will be displayed?
I do see in the .yml file that you are using the runner platform and arch, so if there is no built-in way to change the case, don't worry about. Maybe then change the 'supermodel-' bit to 'Supermodel-'?
- I noticed Supermodel builds now fail on MSYS on my local machine with some linker errors involving -lmingw32, etc. Yet these work in command prompt. Strange. No need to fix this, I'll eventually look into it myself, but I don't fully understand what's going on. I might have just screwed up my environment variables at some point or something.
33f5458
to
9561aa1
Compare
Added changelog generator to |
Job artifacts are simply the results of a job. To compare it to the current build-bot process, there are separate functions/steps that build, generate a changelog, stage the release, and then upload to supermodel3.com via sftp. We need to discuss how releases are created. https://github.com/trzy/Supermodel/releases In lieu of figuring that out, I'm trying to work out a way to publish releases that use the same 0.3a-git- format that's been historically used by the project.
The artifact names can be changed, but they are not intended to be used for releases. If you download one, you'll see it's double archived. This is a limitation (intended feature) of the artifacts system, job artifacts are always wrapped in a zip file. I believe Gitlab does it the same way, in that artifacts are intended to be used by other jobs/steps in a standard way. Eg. the release step would extract the artifact, make any final changes (code signing, permissions, etc), bundle up with an installer, and then publish the release.
It's simple enough to make the final release archive file name match the current conventions. |
Sorry for my slowness, this GitHub CI/release stuff is still very unfamiliar to me, so I'm not sure what is required of the release process. Semantic versioning is a possibility and has obvious advantages (particularly in making it easy to compare versions chronologically). OTOH, given the light touch administration of this project, providing builds off of git commits (and SVN commits before that) has proven to work really well for us. Would it be possible to do something like a weekly build (provided there was a commit) trigger? If not, I suppose we can add tags for semantic version numbers and perhaps make the package flow create a version number from both the tag and the date? E.g.: 0.3.1-20240411 ? How does the release process work in GitHub? Is it just a matter of a contributor running a "git tag" and then the workflow triggers? I assume there is some way to restrict permissions for who can add tags. |
For sure. A scheduled workflow trigger sounds like it would be perfect for automatic releases. Basically whatever cadence you want (weekly, daily, etc), the workflow would:
Yes, It can also be triggered on a tag and tagging is restricted to contributors by default. You can further restrict it using protection rules. Based on your questions / feedback, I envisioning a dual release mechanism.
If that seems interesting, I'll whip something up on my fork for you to review. |
I think auto-scheduled releases based on commits would be awesome. It could be like a nightly or weekly build. Would it be possible to do it once per period (day, week, whatever) and tag it with date rather than the number of commits? |
I was using this on my personal fork for awhile now (syncing with svn).
Creates artifacts for each of the supported platforms.
It doesn't contain a workflow for releases, but that should be really easy.