-
Notifications
You must be signed in to change notification settings - Fork 2
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
Standardize inputs and refactor workflows #22
Conversation
932f9a4
to
d3e2449
Compare
Looks awesome, do you think there is a way to provide caching for the release downloads? |
That's what I've done in our repo, I just need to get it into this branch Only thing I need to consider is that many people (including ourselves) are using custom runners like Buildjet/Blacksmith/WarpBuild/Depot etc., and some of them have their own caching actions, so I should probably allow that to be provided as an input Setup Java as you can see I moved out of the action because that seems to be the standard for most other workflows including some of GitHub's own, and it gives people some flexibility (especially if they're running this as part of a build & test job which would require Java already) I was a little overwhlemed by the huge number of actions in this repo, many of which don't appear to be used, so I'd like to consolidate those in this PR also |
Question @3arthqu4ke, why does Also, I note there's effectively 2 different "products" in this repo, the |
488f9c0
to
c5f1544
Compare
Yes many can just be thrown out.
This is an edge case for 1.12.2, with lwjgl-2.9.4 and xvfb, I am not sure if older lwjgl versions are affected.
Hmmm, good question. Value in putting the mod in its own repository would probably be that it would make workflows in this repository much faster, because the run workflow does not need to build every single mod version every time. On the other hand if I release a new version of the mod it means I also need to release a new version of the action, having it in one place makes that easier, but that is a nitpick. |
✅ Already sorted!
Keeping them together:
Splitting them up:
Honestly, I’m leaning toward splitting them. The mod feels pretty repetitive right now (lots of duplicated code between version folders), and separating it would make it easier to DRY up without affecting the action workflows. Plus, I’m not a Java dev, so having it in its own space would make the action easier to work on. |
I have tried the LWJGL_DISABLE_XRANDR variable and it did not work, lwjgl tries to fallback to XF86VIDMODE which also fails and then crashes. Odd, I will look into this. Your runner is newer than the one used for my workflow but besides that I have no clue.
Yeah, I also tend to splitting them, I have plans for the duplicate code. While supporting many different minecraft and modloader versions is difficult, it could be possible with a Java Pre-processor #8 |
https://github.com/marcusk-studio/mc-runtime-test/actions/runs/12085945442/job/33704307750#step:6:583 In the xvfb-run workflow the -lwjgl flag is used. |
I think this is the wrong way around? If you use xvfb you do not want to add -lwjgl? |
I inverted the logic on this test run, same thing https://github.com/marcusk-studio/mc-runtime-test/actions/runs/12104807693 I also tried both In the name of progress, I'm inclined to polish and get this PR out of WIP so we can get it merged and make more progress. I don't want any more scope creep on this PR. I'll add Release-Please and Renovate in a separate PR |
The lwjgl flag is still there in the xvfb-run. Its there in both runs Maybe the matrix input is interpreted as a string?
👍 |
The issue with the ${{ matrix.xvfb && '' || '-lwjgl' }} Normally, you'd expect this to work like a ternary operator: ${{ condition && 'if true' || 'if false' }} But in this case, even when To patch the behavior, I flipped the logic: ${{ !matrix.xvfb && '-lwjgl' || '' }} This works because:
Now the empty string is in the right spot, and everything works as expected. It’s a simple tweak, but it gets around the weirdness with GitHub Actions’ syntax. I'll bring that change over into this branch soon |
The Build, Test, Release workflow just failed due to 1.7.10 timing out (1.7.10 is a bit flaky sometimes it waits for the player indefinitely, not sure why). But when I tried to re-run the failed tests, they all failed because they were not able to find the artifacts uploaded in the Build job. Probably because of the Cleanup Step that always runs deleted them. This is just an observation. I dont think this is necessarily bad because I wouldnt know how to do it differently while having a cleanup step. I like that the artifacts are deleted, but if a test fails we need to re-run all tests, instead of the cancelled/failed ones. |
On timeout: headlessmc handles retries and retries on timeout would also be great. Just opening the discussion to the question if handling the timeout in headlessmc would make sense, or handling retries in mc-runtime-test would make sense. The reason I put retries on the headlessmc side for now was to distinguish between headlessmc configuration errors and minecraft errors but not sure. Another question that is left to the user is, if they even want retries. It could hide flakyness issues in the users own application, but on the other hand there are flaky Minecraft versions (1.7.10, 1.19.1-1.19.3, 1.20.1-4 nightconfig crashes). |
Ah and this time the 1.19.3 test just timed out, just as I wrote about the 1.19.3 flakyness. Edit: yeah I remember now why I commented out the 1.19-1.19.3 tests in headlessmc, these versions often get stuck on the CreateWorldScreen. https://github.com/3arthqu4ke/headlessmc/blob/9c3551e470862a0e25b988011d992ff0bbc87766/.github/workflows/run-matrix-xvfb.yml#L64 |
Actually the only idea I just had would be to have a conditional confirmation step before the cleanup step if the run step failed. |
Perhaps we should only clean up artifacts from passed tests I'm working on selective builds right now based on the content of a PR, so in those instances I believe we shouldn't remove the artifacts either. See here: https://github.com/marcusk-studio/mc-runtime-test/actions/runs/12111015708 |
Alright this is about as polished as I can manage for now @3arthqu4ke, I'll raise another PR after this is in for the dependency updates and semantic versioning etc. I'm sure there'll be some teething issues, but it'll be simple enough to squash them now |
wget -O run/mods/fabric-api-${{ inputs.fabric-api }}+${{ inputs.mc }}.jar | ||
https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api/${{ inputs.fabric-api }}+${{ inputs.mc }}/fabric-api-${{ inputs.fabric-api }}+${{ inputs.mc }}.jar |
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.
DRY this, we should avoid referencing the filename twice.
wget -O run/mods/fabric-gametest-api-v1-${{ inputs.fabric-gametest-api }}.jar | ||
https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-gametest-api-v1/${{ inputs.fabric-gametest-api }}/fabric-gametest-api-v1-${{ inputs.fabric-gametest-api }}.jar |
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.
DRY this, we should avoid referencing the filename twice.
Could you rebase on top of main real quick, please? I think I fixed the 1.19 issues, that way I can run the workflows for this PR without having to restart them if 1.19 fails. |
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.
Thanks a lot, this is awesome!
Workflows now no longer fail fast if something in the run step goes wrong, but I guess that was to be expected? |
Can be merged |
Yeah that was a last minute choice Equally you probably want a complete picture of which configurations work |
Will do |
No need to, workflows ran successfully, will merge now, Just wanted clarification on my comment. Perfekt, great Work! |
Should I just bump everything to 3.0.0 and release, or what did you have in mind? |
Let me get the renovate/release-please PR in then we can run the 3.0.0 release automatically |
This PR refines several things:
robinraju/release-downloader
action, so the action leverages the runner'sGITHUB_TOKEN
against the API as standardgradlew
files and removed redundant workflow steps