← Back to context

Comment by sambuccid

4 days ago

I'm not sure why no one mentioned it yet, but the CI tool of sourcehut (https://man.sr.ht/builds.sr.ht/) simplifies all of this. It just spins a linux distro of your choice, and executes a very bare bone yml that essentially contains a lot of shell commands, so it's also easy to replicate locally.

There are 12 yml keywords in total that cover everything.

Other cool things are the ability to ssh in a build if it failed(for debugging), and to run a one-time build with a custom yml without committing it(for testing).

I believe it can checkout any repository, not just one in sourcehut that triggers a build, and that has also a GraphQL API

Everything I've seen that's based on yaml makes easy things trivial, and hard things impossible.

This caused me to default back to Jenkins several times already, now I'm in a position to never wander off to another yaml-based tool.

BTW if you follow the philosophy of using bash as your CI so it runs locally (mentioned by several people in this thread), then you can use the same CI logic on sourcehut and Github Actions.

Both of them provide VMs where you can run anything, and bash is of course there on every image.

We do that for https://oils.pub/

sourcehut yaml: https://github.com/oils-for-unix/oils/tree/master/.builds

github yaml: https://github.com/oils-for-unix/oils/tree/master/.github/wo...

They both call the same shell. The differences are:

* We use Github's API to merge on green; right now we don't have the same for sourcehut (since Github is the primary repo)

* Github Actions provides way more resources. They are kind of "locking projects in" by being free.

This post on NixOS gives a hint of htat

https://blog.erethon.com/blog/2025/07/31/how-nixos-is-built/

The monthly cost for all the actions in July of 2025 came out to a bit over 14500 USD which GitHub covers in its entirety.

So I think many projects are gradually sucked in to Github because it is indeed quite generous (including us, which annoys me -- we run more tasks on Github than sourcehut, even though in theory we could run all on sourcehut)

---

BUT I think it is a good idea to gradually consolidate your logic into shell, so you can move off Github in the future. Open source projects tend to last longer than cloud services.

This already happened to us -- we started using Travis CI in 2018 or so, and by 2021, it was acquired and the free tier was removed

Sourcehuts build.sr.ht is the best CI system I've used. I really want to give it a go at work as a replacement for our existing Jenkins solution, and I don't even thing that Jenkins is that bad.

Previously I've argued that CI/CD systems need two things, the ability to run bash and secrets management. Today I'd add: The ability to spin up an isolated environment for running the bash script.

A big reason people use actions is because they need to run things on MacOS and Windows.