PR and release workflow improvements umbrella issue
We have been running into some problems with PR and Release workflows. We especially felt the pain during debugging of ssl issue during mqtt work.
I am trying to find out all the differences between build and release workflows to make them consistent for easy debugging and predictable behavior:
- [ ] PR workflows don't build for Linux/Mac aarch64 targets
- [ ] Toolchain setup is done using
.github/actions/spin-ci-dependencies/action.ymlin PR workflow, and done using directrust toolchaincommands in Release workflows - [ ] PR workflows run on
ubuntu-latest, which translates toubuntu-22.04, but release workflows run withubuntu-20.04 - [ ] Some configs are passed along during build in GitHub actions workflows, while some config is passed using
.cargo/configfiles
This issue will likely evolve a bit more before we find all the discrepancies and fix them.
Adding some historical context for some of this (not suggesting we should not change them, just providing more info):
- building Linux/Mac aarch64 targets for every PR was very slow because GH Actions still did cross compilation. GitHub added a private beta for ARM runners, but we don't have access yet (https://resources.github.com/devops/accelerate-your-cicd-with-arm-and-gpu-runners-in-github-actions/)
- the main reason we do the release workflow on an older Debian release is because linking against a GLIBC that is old enough so the binary we build works reliably across older distros (more context in https://github.com/fermyon/spin/issues/168)
+1 to Radu's second point. We aim to use the oldest Ubuntu image available in GH Actions. Looks like the PR workflow accidentally diverged during a previous iteration.
@rajatjindal You asked for my feedback based on trying to get these working for the SSL stuff. I didn't really do much debugging to be honest: I could not figure out why or how the two were out of sync, so I copped out and copied the release stuff into the PR workflow so that I could have reasonable confidence in green PRs even if it was slow.
@itowlson, what do you recommend re: using oldest ubuntu image?
I would say we should use same ubuntu version in PR and release workflow to avoid surprises after merge.
@rajatjindal Yes. We should:
- Use the oldest Ubuntu image available
- And use it everywhere