Dis4IRC icon indicating copy to clipboard operation
Dis4IRC copied to clipboard

CI server/GitHub actions

Open Phoenix616 opened this issue 5 years ago • 9 comments

Would be cool if there was a public CI server available or GitHub actions which archive the jar file so that one could easily obtain latest builds. (Currently I have setup manual builds on my Jenkins but I doubt everyone wants to go through that effort just to test/use latest changes)

Phoenix616 avatar Dec 30 '20 18:12 Phoenix616

I was actually thinking about this a little earlier in the week. I'm hoping to poke at it this weekend.

I think I would prefer to try GH actions for this and keep it self-contained here on GH, although setting up a CI server will likely need to happen later for other more complex projects down the road (unrelated to this one).

zachbr avatar Dec 31 '20 02:12 zachbr

3c5410bb5b5d232d0f5636bbca228b1df1f0a0c4 90c7d6275e7f588178d5f618be83ae71b4bdc7ca

image

🎉

zachbr avatar Jan 03 '21 00:01 zachbr

A bit annoying that it create a zip file instead of a direct jar download but I assume that's just how github does it?

Phoenix616 avatar Jan 03 '21 00:01 Phoenix616

I get a jar from the artifact link image

I wish it would just use the filename as the artifact name, rather than making me specify it, but I'm not getting a zip?

zachbr avatar Jan 03 '21 00:01 zachbr

Tbh. I'm unsure on which page that is for you, I tried through this page and it gives this file.

Phoenix616 avatar Jan 03 '21 00:01 Phoenix616

I was doing it from the run log page that shows when you click the little green checkmark and then "details" on the checks popup. https://github.com/zachbr/Dis4IRC/runs/1637970278

I assume yours is just from the build page that shows up when you click "Actions" at the top, and then choose the latest result? https://github.com/zachbr/Dis4IRC/actions/runs/458382813

They both seem to point at the same artifact: https://github.com/zachbr/Dis4IRC/suites/1756749644/artifacts/33436052

It still gives me a jar. I hope GH isn't doing some weird filtering based on user agent or whether you have perms to the repo :/

Edit: Firefox is giving me zips instead of jars now. Not what I want but at least I can reproduce. I'll try and see why it feels the need to do that.

zachbr avatar Jan 03 '21 00:01 zachbr

I was doing it from the run log page that shows when you click the little green checkmark and then "details" on the checks popup. https://github.com/zachbr/Dis4IRC/runs/1637970278

I see, gives the same for me too.

I assume yours is just from the build page that shows up when you click "Actions" at the top, and then choose the latest result? https://github.com/zachbr/Dis4IRC/actions/runs/458382813

Yeah.

Edit: Firefox is giving me zips instead of jars now. Not what I want but at least I can reproduce. I'll try and see why it feels the need to do that.

Odd. I use Chromium though so it's at least not a Firefox vs Chrome difference.

Also while testing with curl/wget I noticed another very odd behaviour: It returns a 404/Not Found in that case. Testing with a logged out browser reveals that I can only download the file while being logged in even though the artifact is listed on the Actions page (while being logged out)? Makes this quite useless for easily obtaining it on a server :S I assume they simply don't want that to be used for public downloads or something? Not sure if you are willing to create a new tag and pre-release for each commit or if using something external (either for building or caching/proxying artifacts) would be the better option.

Phoenix616 avatar Jan 03 '21 01:01 Phoenix616

Regarding the zip issue: Just found out that according to the actions/upload-artifact readme the zip download is a limitation of the artifact system. :S

Phoenix616 avatar Jan 03 '21 01:01 Phoenix616

We can workaround the public/private issue with a GitHub app like nightly.link to basically handle the auth side. For example, here would be the one for master: https://nightly.link/zachbr/Dis4IRC/workflows/gradle/master/dis4irc-jar

It doesn't really link it up nice to commits and it doesn't fix the zip issue. I'm sure an app could do so if I took something and fiddled with it. At that point though I'm hosting something and if I'm hosting something GH actions looks less amazing.

Going to re-open this as a WIP ticket and see where it lands. At some point I will need some form of more traditional CI so this can get tacked onto that.

zachbr avatar Jan 03 '21 05:01 zachbr

My aversion to hosting a traditional CI server still outweighs how annoying GitHub wrapping the file in a zip is. On my end I just have the bash script unzip it first and then move on. That seems to have worked fine enough since this was opened. It's not great but it is what it is I suppose. A third-party CI could always be used instead, if it were trusted.

zachbr avatar Jun 25 '23 07:06 zachbr