-
Notifications
You must be signed in to change notification settings - Fork 10
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
LLVM release workflows #207
base: main
Are you sure you want to change the base?
Conversation
In #201 it was discussed to not do LLVM releases, now I'm a bit confused 😅 Do you plan to have separate workflows, but the binary release workflow is depending on this first? That would make sense to me (i.e. a release tag is first causing the LLVM workflows to run, and afterwards the binary is build using those artifacts - but the LLVM artifacts and the binary artifacts end up in the same release).
Yeah those are absolute potato VMs, I suggest using our parity runners. |
I read the discussion there and I see no contradiction. #201 ended up a bit ahead of me (while I was, or rather still am, stuck with mac / windows LLVM builds), so Evgeny did a temporary solution in a single workflow. |
What you are suggesting is that we use two tags to trigger either the LLVM build or the LLVM is just a build artifact. In that sense we don't release LLVM. We depend on it and attach it to the release as artifacts for convenience reasons. Having a dedicated tag and release for LLVM vs. releasing the artifacts together with the binary release seems mostly bikeshedding to me, with dedicated release increasing complexity.
I'm unsure about the added complexity is worth it (still unclear to me what exactly we gain from dedicated LLVM releases), but if you think of it as the better solution go for it. Keep in mind that every |
If we don't create a release where would we store the LLVM artifact so that it can be downloaded by the revive release? |
We just cache it as we do currently. |
Ahh okay you mean basically no new workflow and we just have #201 ? To be honest I like that we have those rare LLVM tags and don't have to deal with it in the other workflow. |
Yeah this is what I meant. But having it separate is also fine for me. |
So tl;dr we are fine with this PR and just waiting for macOS and windows to get fixed? |
Yes I'm fine, waiting for everything fixed and |
MacOS does work already, but Windows builds are inconsistent. Trying to figure them out. |
Should we maybe go forward and do the first iteration without windows? The issue with windows is not trivial, and the feedback loop on windows runners is two hours. |
# build-windows-gnu: | ||
# needs: create-release | ||
# runs-on: windows-latest | ||
# env: | ||
# MSYSTEM: "MINGW" | ||
# RUST_LOG: trace | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# | ||
# - name: install win deps | ||
# run: | | ||
# choco install ninja | ||
# | ||
# - name: Setup msys2 | ||
# id: msys2 | ||
# uses: msys2/setup-msys2@v2 | ||
# with: | ||
# path-type: inherit | ||
# install: >- | ||
# base-devel | ||
# mingw-w64-x86_64-clang | ||
# mingw-w64-x86_64-lld | ||
# mingw-w64-x86_64-rust | ||
# mingw-w64-x86_64-cmake | ||
# mingw-w64-x86_64-gcc | ||
# mingw-w64-x86_64-gcc-libs | ||
# mingw-w64-x86_64-python | ||
# mingw-w64-clang-x86_64-riscv64-unknown-elf-toolchain |
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.
Use msvc since you are building on windows. It is the most compatible and easiest to build for natively. No reason to pull mingw.
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.
As a matter of fact, I've started with msvc and failed. The suggestion from @xermicus was to look for inspiration in how matter-labs do their windows releases, and they use mingw
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.
I think this was the issue that I've been hitting with MSVC
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.
Have you read this comment: llvm/llvm-project#47189 (comment)
I would be really surprised if nobody could build LLVM with the Microsoft toolchain.
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.
I would be really surprised if nobody could build LLVM with the Microsoft toolchain.
I wouldn't be surprised if nobody has built matterlabs fork of LLVM with MS toolchain, as they're using mingw themselves.
Given the sort of the issue I'm getting right now, however, I'm inclined to give it another go.
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.
The comment I posted sounds like the issue with MSVC just happens under some rare circumstances you need to rule out. Like just setting some CMAKE var.
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.
- Windows should use MSVC
- macOS needs to be a universal binary: Build twice: Once on a Intel runner and once on a AppleSilicon runner. Then use
lipo
to merge the two binaries. You can also build both on any macOS runner since cross compiling in macOS is easy.
To me it does not make sense to ship this incomplete. We don't gain anything from that because we don't even have the revive workflow done. So nobody could do anything with those artifacts anyways.
Switching to the default toolchain on windows (msvc) hopefully makes it easier. |
I don't get it. These artifacts will be used in the revive workflow. Revive workflow depends on it, not the other way around. Why would revive workflow be a blocker here?
Looking a the previous roadblock that I had with MSVC, I can give it another shot, especially as my current issue with mingw happens when compiling builtins, which matterlabs don't seem to be doing.
Ah, right. I'll get to it in parallel to working on windows 👍. |
So you would change the in-progress other PR then? |
Not sure if I understand what you mean, but workflows in other PRs would be changed to use artifacts produced by this one. Is that what you're asking? |
Yes. I am just saying me mindful of that potential interaction with that other open PR. |
That interaction is intended and planned from the start |
Okay that is good to know. Because of right now the other PR just uses caching so there is no indication of that. Can't read minds. |
You mean resolc, not llvm though, right? If cross-compiling is easy, we wouldn't need to create a universal binary of every llvm / clang tool, right? |
LLVM is a dependency (LLD is a runtime dependency). If you cross-compile you need to cross-compile everything. |
You are right. LLVM is an intermediate artifact statically linked by the You could unify those two LLVM artifacts then by making all the binaries and libs universal. But you are right: I wouldn't do that. It's not worth it. We'll only do that for |
Let's skip the windows build for now and do that as a follow up. macOS and Linux is enough for now since those seem to be not problematic. I will look into the Windows build when the other things are working. |
I'll take this to draft for the time being, after #201 is merged, I'll alter that release pipeline to use llvm from this one, and hopefully add macos to it as well. |
I've been testing these on a fork with public runners.
Windows, unfortunately, still needs work, and linux fails on a 6h timeout, when executed on ubuntu-latest 😅.
But as at least some of it works, let's kick off the review, and hopefully, I'll be able to finish testing workflows and windows LLVM release in parallel (given the duration of the feedback loop on these tasks)