-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 CI: build LLVM from source #14573
Conversation
Hmm actually it looks like there wasn't even any reason to have those caches before because it just moves the download+extract step from one place on GitHub to another. |
@@ -38,19 +33,30 @@ jobs: | |||
uses: actions/cache@v4 | |||
with: | |||
path: ./llvm | |||
key: llvm-${{ matrix.llvm_version }} | |||
key: llvm-libs-${{ matrix.llvm_version }}-${{ hashFiles('.github/workflows/llvm.yml') }}-linux |
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.
issue: The hash on this workflow file triggers a rebuild every time we change anything here. This includes every time we bump the version for install-crystal
action after each release. I think that's quite frequent in relation to the long build times for LLVM.
I'm wondering if we could narrow this down somehow, maybe call a separate workflow which handles only building LLVM?
I was actually about to look into using We already have an environment with configurable LLVM versions in |
You mean the official Debian or Ubuntu APT repositories? Because the official LLVM APT repositories have all the releases we want. For example LLVM 13 to 18 for Ubuntu 22.04 + nightlies of LLVM 19 (see https://apt.llvm.org/jammy/pool/main/l/), and it will continue to receive the new releases for years to come. For Ubuntu 20.04 they have all releases since LLVM 9 (see https://apt.llvm.org/focal/pool/main/l/). |
Noble, the next Ubuntu version that is going to become LTS, serves only 17 and beyond, so we risk being unable to update to a more recent Ubuntu runner image. We cannot really drop CI for LLVM 13 yet, and technically all the way down to LLVM 11, the most recent version released when Crystal 1.0 was out. Also I don't think there is really a reason to switch to nightlies. The stable source releases are good enough. |
The official Apt repositories only serve the 3 most recent major versions, while the volunteer-built packages are incomplete and of inconsistent quality, so the best solution is to build LLVM ourselves.
This also reduces the total size for the 6 LLVM caches from 8 GB to around 2.4 GB. That's more than half the limit for a GitHub repository.
lld
is needed for #13193; technically speaking, we could build it straight from the very repository we're cloning here, but we aren't really testing any version-specificlld
behavior, so this patch grabs it from Apt.