diff options
author | Tom Stellard <tstellar@redhat.com> | 2024-02-14 16:05:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 16:05:52 -0800 |
commit | fe20a759fcd20e1755ea1b34c5e6447a787925dc (patch) | |
tree | b614b43d639bd48ae8ff0907538ffa8b9f605fee /.github | |
parent | acdb4cdc04ed4d9a130f0fa706ed1b0f42cc1aa0 (diff) | |
download | llvm-fe20a759fcd20e1755ea1b34c5e6447a787925dc.zip llvm-fe20a759fcd20e1755ea1b34c5e6447a787925dc.tar.gz llvm-fe20a759fcd20e1755ea1b34c5e6447a787925dc.tar.bz2 |
Use container on Linux to run llvm-project-tests workflow (#81349)
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/llvm-project-tests.yml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/.github/workflows/llvm-project-tests.yml b/.github/workflows/llvm-project-tests.yml index 68b4a68..43b9019 100644 --- a/.github/workflows/llvm-project-tests.yml +++ b/.github/workflows/llvm-project-tests.yml @@ -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 }}' |