[cpullvm] Use cmake 4.4.2 for Linux x86_64 builds - #597
[cpullvm] Use cmake 4.4.2 for Linux x86_64 builds#597srilakshmi yalamaraju (sriyalamar) wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Any path that only works on a specific builder should be part of the configuration of that builder.
Maybe we can just mess with the PATH on the builder?
There was a problem hiding this comment.
FWIW I think the problem with touching the PATH on the builder is that the same builders/environment is (unfortunately) shared across different versions so we'd have to check nothing goes wrong with 22/23 as well at the same time.
There was a problem hiding this comment.
We can make the GitHub Action set an environment variable, if we want to restrict it to a specific build config.
There was a problem hiding this comment.
I completly agree, this build.sh update will not work on the servers which do not have this path.
srilakshmi yalamaraju (@sriyalamar), lets try the WF update like below (fix the indentation), and you don't have to change this sh file?
- name: Setup CMake 3.31.0
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.0'
There was a problem hiding this comment.
May be the build.sh can just check if the cmake version is >= 3.31.0 and fail otherwise.
|
+1 to Eli's comment--I'd prefer we avoid this sort of thing unless we absolutely have to (ex: to unbreak builders if/when this upgrade lands upstream). Navaneeth Shanmugasundaram (@navaneethshan) my assumption is that changing how our builders are hosted will let us more naturally fix this since we can/could have multiple different images (with different cmake versions and/or PATHs set (or whatever other dependency)). Is that right/is this slated to come early enough that we might be able to just wait for that? |
I am not sure what you refering to, you mean using docker image or AWS? |
a2c48cc to
ab9303c
Compare
|
srilakshmi yalamaraju (@sriyalamar), did you test: https://github.com/marketplace/actions/actions-setup-cmake ? good if we don't hardcode the path anywhere. |
I'd rather not add dependencies from unknown third parties; if we're going to download CMake as a build step, we should just write that out explicitly. We could download CMake as a build step instead of having it preinstalled on the bot ( |
|
A few scattered responses/comments below. On the patch itself:
Navaneeth Shanmugasundaram (@navaneethshan) I suppose either--I mentioned AWS as my understanding is moving to AWS would mean we will finally move away from having these persistent machines/environments (between runs, jobs, etc.) as in the DMZ machines. But we could do the same thing by specifying docker images, etc. The idea being that we can just install dependencies in the workflow itself or use different images with different dependencies installed, etc without worrying about interfering with other CPULLVM branches, etc. that might use the same machines (as is the case today).
Navaneeth Shanmugasundaram (@navaneethshan) Eli Friedman (@efriedma-quic) +1 FWIW too, I think we have some qualcomm-org-imposed checks that rejects most 3rd party actions usage (there's some allow list, but I don't know what exactly is and isn't covered and I agree with Eli about not using 3rd party things so would prefer we not pursue an exception for this).
I don't necessarily mind if we install it every run, but then it seems like we should be consistent and make sure we clean it up every run in the DMZ builders. |
daece1c to
adb966f
Compare
LLVM 24 requires cmake >= 3.31.0. The DMZ self-hosted runner has cmake 3.28.3 system-wide which is insufficient. Add a composite action .github/actions/setup-cmake that downloads cmake 4.4.2 to RUNNER_TEMP (cleaned per job — no permanent changes to the runner). The action is a no-op on non-Linux-x86_64 runners so it can be referenced unconditionally from any workflow. To update the cmake version, change the URL and paths in .github/actions/setup-cmake/action.yml only — all workflows update automatically. Updated workflows: nightly.yml, linux-premerge.yml, libcxx-test.yml, native-runtime-nightly.yml. Signed-off-by: syalamar <syalamar@qti.qualcomm.com>
adb966f to
067c2b6
Compare
|
Thanks srilakshmi yalamaraju (@sriyalamar), I like this apporach, but I have below questions.
Thanks Jonathon Penix (@jonathonpenix) and Eli Friedman (@efriedma-quic) for the review comments so far, I agree on all of those. |
When we use AWS or Docker in future, we will use the images or AMI with correct version of cmake in it, but I don't expect the current implementation will break anything there. For now, we need a WF which will work on DMZ worker and GH runner, when we add AWS, I expect the WF to be updated a bit. |
This seems fine. Pinning down the versions of tools we use will make the behavior more predictable. |
Agreed, I was originally just asking if this changeover was going to happen soon enough that it would make sense to skip this interim step, but I'm assuming at this point the answer is 'no'.
I'd prefer we don't do this. In general the cmake minimums should be enforced in cmake itself ( I don't know about others, but at least I occasionally use the build.sh scripts (or variants for overlays, etc.) when doing things locally. |
|
Thanks Eli Friedman (@efriedma-quic), Jonathon Penix (@jonathonpenix), and Navaneeth Shanmugasundaram (@navaneethshan) for your reviews and suggestions. It looks like we are in good shape with this commit. Based on the latest logs, the CMake warning related to the upgrade has also been resolved. Could you please approve the PR when you have a chance. |
|
I don't know if we have a nightly test build avialable to look at, I started one: https://github.com/qualcomm/cpullvm-toolchain/actions/runs/32753816743/job/97821249951?pr=597 |
At this point, there is no plan to move to AWS completely, it will be hybrid option, DMZ+ AWS. |
LGTM. |
|
I guess I'm fine if this goes in as-is if it is going to be a temporary/interim thing. Long term, I don't think this is how we should be handling dependencies though/I don't think we should be using this as a model going forward:
|
LLVM 24 requires cmake >= 3.31.0. The DMZ self-hosted runner has cmake 3.28.3 system-wide which is insufficient.