-
Notifications
You must be signed in to change notification settings - Fork 299
Add github actions workflow (with caching) #292
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
base: master
Are you sure you want to change the base?
Conversation
|
The changes to the Dockerfile seem to be required. I removed them in https://github.com/Peter0x44/w64devkit/actions/runs/18278436300/job/52035735401 and it hung. |
|
I managed to remove the changes to the Dockerfile, it still works. |
28e393b to
4a5e72c
Compare
|
I fixed the duplicate runs on pull requests. Should be good to merge @skeeto . |
7b0d096 to
f86ca3d
Compare
|
No. I can't get that working. |
5942be1 to
ad1624e
Compare
|
@skeeto any objections left? I would love to get this in, I'm using it heavily. |
|
Pinging this again... |
|
Sorry, I've been putting this off because CI/CD is unpleasant for me, and it's difficult to find motivation, especially when the results are unimportant to me. I barely tolerate it even when I'm being paid to deal with it. Embedding a programming language within YAML syntax, and the resulting syntactical nesting, has got to be one of the worst ideas in computer science to gain widespread adoption. The rename step seems superfluous, but I see that you deliberately added it in order to cache. It seems the rename still isn't actually necessary, and a "breather" step between "build" and 'run" is what really matters? I'm just trying to understand that part. I looked at your Actions result to see what this all looks like in the end, and I noticed:
While this issue with signals doesn't matter to our use case, the warning is annoying and it would be nice not to have it. I'm fine with dropping --- a/Dockerfile
+++ b/Dockerfile
@@ -525,4 +525,3 @@ RUN printf "id ICON \"$PREFIX/src/w64devkit.ico\"" >w64devkit.rc \
&& echo $VERSION >$PREFIX/VERSION.txt \
- && 7z a -mx=9 -mtm=- $PREFIX.7z $PREFIX
-ENV PREFIX=${PREFIX}
-CMD cat /7z/7z.sfx $PREFIX.7z
+ && 7z a -mx=9 -mtm=- w64devkit.7z $PREFIX
+CMD ["cat", "/7z/7z.sfx", "w64devkit.7z"]Dropping that Just as a result of making that branch I've got my first Actions result: https://github.com/skeeto/w64devkit/actions/runs/19975315723/job/57289946957 I haven't set "Read and write permissions" yet, so I expect this to fail. It's still going as I write this. How have you confirmed that the cache works? The automatic build and insert into a draft on tags seems like it could be convenient, though it depends on how long that typically takes. I can build locally from scratch pretty quickly, and I test my builds before I even push the tag, so generally the delay between pushing the tag and creating the formal release with artifacts is the time it takes to upload the builds plus Is the primary convenience for you having the What follows is a failed attempt to make this easier on myself, and it's not so important to the PR. It's probably a personal shortcoming, but my frustration increases quadratically on the time between action and feedback, and with CI/CD that means committing, pushing, then waiting minutes on even the slightest change. (One reason I like C so much: It's one of the precious few programming ecosystems where we measure the time between action and result in milliseconds!) I soon found nektos/act, which is a neat little utility for running GitHub Actions locally, and would ideally minimize that time. I rebased and squashed your changes to 6ea4c17, then tried it on Windows with: So far most of the time Docker Desktop crashes on the final export step, causing Obviously they're a little under half the size they're supposed to be. I see a Next I try building in my mac, and I immediately get warnings about running on Apple Silicon, and it seems it's not well-supported either. It successfully builds and "uploads" an x64 package, but the x86 package fails (maybe due to a Git error: "failed to identify reference (tag/branch) for the checked-out revision" but there are lots of these?). The x64 package seems to work fine, so a small success. But the cache does not work, and every build is done from scratch. Perhaps caching isn't solvable with |
|
First of all, thanks for getting around to it. I understand it isn't a fun subject and I pretty much agree with your assessment. Yaml is truly horrific. Related: https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell But regarding CI itself, I think it's extremely valuable and would do it for any library/executable I make. There is no easier way to get testing on a variety of operating systems and environments. The pain is nearly always worth it, IMO.
Yeah, I'm getting tired of lugging that commit around to all of my experiment branches and having to rebase it constantly.
painfully. I just push a commit changing something after the toolchain, and observe that it doesn't take as long (~5 minutes), and the log doesn't do as much. I don't have any evidence to show other than "trust me bro". Unfortunately.
I don't remember that being the motivation. I just like having the commit hash in the file name so it's easy to track which commit a specific w64devkit.exe was built from.
probably. I don't care about this warning personally, but if it can be fixed without consequence, we should do it. |
I added this change. |
Now, the workflow doesn't download tarballs on every run.
This suppresses a warning about signal handling. It also removes a layer
|
Pinging this again. |




This is a continuation of #72, the changes I added were to make caching work, so the CI doesn't have to download tarballs on every run.
I am not sure if the changes to the Dockerfile are necessary. I initially made them because exporting the image to layers or something like that was hanging, and it fixed that. Docker is not something I have a lot of knowledge about. My changes were LLM authored, but I did test them as thoroughly as I could.They are not. Removed.