-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
[Github] Fix LLVM Project Tests Workflow on Linux #122221
[Github] Fix LLVM Project Tests Workflow on Linux #122221
Conversation
074fa10
to
b6a6510
Compare
@llvm/pr-subscribers-github-workflow Author: Aiden Grossman (boomanaiden154) ChangesThis patch fixes the LLVM project tests workflow on Linux. Two changes were needed. Firstly, some commands need to be performed with sudo now that the container executes as a non-root user. Second, we needed to change from Full diff: https://github.com/llvm/llvm-project/pull/122221.diff 1 Files Affected:
diff --git a/.github/workflows/llvm-project-tests.yml b/.github/workflows/llvm-project-tests.yml
index 95a3890c0d2dc7..4ff84c511250fb 100644
--- a/.github/workflows/llvm-project-tests.yml
+++ b/.github/workflows/llvm-project-tests.yml
@@ -39,7 +39,12 @@ on:
type: string
# Use windows-2019 due to:
# https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317
- default: '["ubuntu-latest", "windows-2019", "macOS-13"]'
+ # Use ubuntu-22.04 rather than ubuntu-latest to match the ubuntu
+ # version in the CI container. Without this, setup-python tries
+ # to install a python version linked against a newer version of glibc.
+ # TODO(boomanaiden154): Bump the Ubuntu version once the version in the
+ # container is bumped.
+ default: '["ubuntu-22.04", "windows-2019", "macOS-13"]'
python_version:
required: false
@@ -113,7 +118,8 @@ jobs:
run: |
if [ "${{ runner.os }}" == "Linux" ]; then
builddir="/mnt/build/"
- mkdir -p $builddir
+ sudo mkdir -p $builddir
+ sudo chown gha $builddir
extra_cmake_args="-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang"
else
builddir="$(pwd)"/build
|
b6a6510
to
34a0ad8
Compare
… (#122395) For the same reason as [#122221](llvm/llvm-project#122221), this fixes build failure from missing python3.
For the same reason as [llvm#122221](llvm#122221), this fixes build failure from missing python3.
This patch fixes the LLVM project tests workflow on Linux. Two changes were needed. Firstly, some commands need to be performed with sudo now that the container executes as a non-root user. Second, we needed to change from `ubuntu-latest` to `ubuntu-22.04` as `ubuntu-latest` not defaults to `ubuntu-24.04` which causes `setup-python` to install a python executable linked against a newer version of glibc that is not found on ubuntu 22.04, which causes failures when CMake cannot execute the python interpreter that it finds.
For the same reason as [llvm#122221](llvm#122221), this fixes build failure from missing python3.
This patch fixes the LLVM project tests workflow on Linux. Two changes were needed. Firstly, some commands need to be performed with sudo now that the container executes as a non-root user. Second, we needed to change from `ubuntu-latest` to `ubuntu-22.04` as `ubuntu-latest` not defaults to `ubuntu-24.04` which causes `setup-python` to install a python executable linked against a newer version of glibc that is not found on ubuntu 22.04, which causes failures when CMake cannot execute the python interpreter that it finds. (cherry picked from commit a759176)
This patch fixes the LLVM project tests workflow on Linux. Two changes were needed. Firstly, some commands need to be performed with sudo now that the container executes as a non-root user. Second, we needed to change from `ubuntu-latest` to `ubuntu-22.04` as `ubuntu-latest` not defaults to `ubuntu-24.04` which causes `setup-python` to install a python executable linked against a newer version of glibc that is not found on ubuntu 22.04, which causes failures when CMake cannot execute the python interpreter that it finds.
For the same reason as [llvm#122221](llvm#122221), this fixes build failure from missing python3.
This patch fixes the LLVM project tests workflow on Linux. Two changes were needed. Firstly, some commands need to be performed with sudo now that the container executes as a non-root user. Second, we needed to change from
ubuntu-latest
toubuntu-22.04
asubuntu-latest
not defaults toubuntu-24.04
which causessetup-python
to install a python executable linked against a newer version of glibc that is not found on ubuntu 22.04, which causes failures when CMake cannot execute the python interpreter that it finds.