mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-19 13:06:56 +00:00
Use container on Linux to run llvm-project-tests workflow (#81349)
This commit is contained in:
parent
acdb4cdc04
commit
fe20a759fc
10
.github/workflows/llvm-project-tests.yml
vendored
10
.github/workflows/llvm-project-tests.yml
vendored
@ -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:
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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 }}'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user