Skip to content

[Github] Fix llvm project tests after default user changed in container #122044

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

Closed

Conversation

boomanaiden154
Copy link
Contributor

This patch adjusts the default user for llvm-project-tests when running on Linux. A recent change to the container made the default user non-root which prevents sccache from being installed as the command does not use sudo when trying to write to /usr/local/bin. For now, just run as root as we figure out a better solution to the problem.

This patch adjusts the default user for llvm-project-tests when running on
Linux. A recent change to the container made the default user non-root
which prevents sccache from being installed as the command does not use
sudo when trying to write to /usr/local/bin. For now, just run as root as
we figure out a better solution to the problem.
@llvmbot
Copy link
Member

llvmbot commented Jan 8, 2025

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

Changes

This patch adjusts the default user for llvm-project-tests when running on Linux. A recent change to the container made the default user non-root which prevents sccache from being installed as the command does not use sudo when trying to write to /usr/local/bin. For now, just run as root as we figure out a better solution to the problem.


Full diff: https://github.com/llvm/llvm-project/pull/122044.diff

1 Files Affected:

  • (modified) .github/workflows/llvm-project-tests.yml (+3)
diff --git a/.github/workflows/llvm-project-tests.yml b/.github/workflows/llvm-project-tests.yml
index 95a3890c0d2dc7..e6b2db198d8d20 100644
--- a/.github/workflows/llvm-project-tests.yml
+++ b/.github/workflows/llvm-project-tests.yml
@@ -60,6 +60,9 @@ jobs:
     runs-on: ${{ matrix.os }}
     container:
       image: ${{(startsWith(matrix.os, 'ubuntu') && 'ghcr.io/llvm/ci-ubuntu-22.04:latest') || null}}
+      # We run as the root user as when we need to install sccache, the action
+      # currently does not support running the installation commands using sudo.
+      options: --user root
       volumes:
         - /mnt/:/mnt/
     strategy:

@boomanaiden154
Copy link
Contributor Author

Closing because this doesn't want to work...

I think I'll just open a PR to instal sccache in the container.

@boomanaiden154 boomanaiden154 deleted the fix-llvm-project-tests-sudo branch January 8, 2025 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants