-
Notifications
You must be signed in to change notification settings - Fork 711
Build release artifacts in CI #4637
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
Comments
Nice. Note that for Windows and Linux we normally produce both a 32-bit and a 64-bit version. |
How do these 32-bit Windows binaries get built? 32-bit machine? "Cross" compile? |
Using the 32-bit HP on a Windows x64 machine. On Linux I used chroot + distro-bundled GHC. |
It would be great if binaries were released on GitHub Releases on every tag or something like that. |
I had pretty good success for Linux builds, see: https://github.com/ezyang/cabal-release |
Great! Once this is set up for every major platform, I'd like to use it from the threadscope project. Currently we're using hvr's PPA for Linux, this build for macOS and stack for Windows. It would be great if we could use the same cabal-install for all the platforms. |
GHC is standardising on Jenkins for its CI setup, maybe we can piggyback on that effort? |
@23Skidoo we should. That could solve other CI problems. |
I asked @bgamari about this today at HIW, and he said that it may be possible, conditional on the available server capacity. So if Cabal CI will increase the load on GHC Jenkins infrastructure too much, we may need to look for a source of additional funding to pay for that. |
This should be easy with GitHub Actions, I am assigning myself (I know I will regret this). |
@andreabedini i think there are plans to build artifacts in gitlab instead (see https://github.com/haskell/cabal/blob/master/.gitlab-ci.yml) but not sure about, maybe @Mikolaj could confirm |
We do build release artifacts in gitlab and I think there are reasons for this, e.g., that's the same setup that is used for GHC. However, we don't build the artifacts for each PR, which is a shame. We should either set up additional CI on the gitlab CI or at least try to mimic as closely as possible the artifact building pipeline in GHA. Let's discuss, e.g., on Matrix/IRC or the call this Thursday. |
FWIW, we did, but someone decided to not replicate how we built artifacts already but instead wrote a gitlab pipeline from scratch. You should try to escape the vicious CI refactoring cycle. |
Do you think it may be better to builds the artifacts on GHA? If so, we can reopen that discussion (if there was one, I don't remember). |
That is irrelevant. If https://github.com/haskell/cabal/blob/master/.gitlab/ci.sh script part which actually builds and packages weren't tied to GitLab, then using it also on GitHub would been trivial. That why I made |
i've just was finding out the release.py: https://github.com/haskell/cabal/blob/cabal-install-3.4.0.0/release.py |
Even more, the artifacts to be released are not tested in ci so although the code is the same (modulo chosen commit errors) and the probabilities to introduce bugs in the specific build for gitlab is low, theys exist |
I see, so if we used an updated release.py, we could run it on gitlab at release time to match GHC architectures and on GHA on every Ci run? @emilypi, @hasufell: do you remember why we haven't used release.py? No python on the gitlab machines? Anything else? Perhaps somebody will remember during the Thursday devs call. |
I don't understand why we need a 300 LOC python script to run If anyone wants to share code between github actions and gitlab CI, just create a shell script. I don't see any need for this, though. |
And what is the code that creates the artifacts on gitlab? Could you post a link? |
Thank you. @hasufell: I must have misinterpreted what you wrote. I expected to compare a single line When you say "I don't see any need for this, though.", do you mean that you don't see a need to run tests on artifacts before packaging them, or that you don't see a need to run tests on binaries created in exactly the same way as artifacts in PR CI runs? Or both? |
I'm not sure which scripts you were looking at, but https://github.com/haskell/cabal/blob/master/.gitlab/ci.sh minus GHC installation is about 30 LOC.
I can't really follow. I don't see that the python script runs tests on the binary. It may certainly make sense to add tests to gitlab CI. |
I will un-assign me for the moment. It doesn't look like we are on the same page, so I'd rather not keep this on my plate for now. |
related with #6616 |
In #3755, it was mentioned that one barrier to more frequent releases was the difficulty of getting binaries for all platforms. I've started experimenting with having our CIs generate binaries for us. Here is one binary from AppVeyor (cut off the 2.0-staging branch):
The text was updated successfully, but these errors were encountered: