Skip to content
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

Use container on Linux to run llvm-project-tests workflow (#81349) #81807

Merged
merged 1 commit into from
Feb 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/llvm-project-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ jobs:
lit-tests:
name: Lit Tests
runs-on: ${{ matrix.os }}
container:
image: ${{(startsWith(matrix.os, 'ubuntu') && 'ghcr.io/llvm/ci-ubuntu-22.04:latest') || null}}
volumes:
- /mnt/:/mnt/
strategy:
fail-fast: false
matrix:
Expand All @@ -77,6 +81,7 @@ jobs:
with:
python-version: ${{ inputs.python_version }}
- name: Install Ninja
if: runner.os != 'Linux'
uses: llvm/actions/install-ninja@main
# actions/checkout deletes any existing files in the new git directory,
# so this needs to either run before ccache-action or it has to use
Expand Down Expand Up @@ -108,8 +113,8 @@ jobs:
run: |
if [ "${{ runner.os }}" == "Linux" ]; then
builddir="/mnt/build/"
sudo mkdir -p $builddir
sudo chown `whoami`:`whoami` $builddir
mkdir -p $builddir
extra_cmake_args="-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang"
else
builddir="$(pwd)"/build
fi
Expand All @@ -123,6 +128,7 @@ jobs:
-DLLDB_INCLUDE_TESTS=OFF \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
$extra_cmake_args \
${{ inputs.extra_cmake_args }}
ninja -C "$builddir" '${{ inputs.build_target }}'

Expand Down
Loading