1 name: LLVM Premerge Checks
9 - .github/workflows/premerge.yaml
15 premerge-checks-linux:
16 if: github.repository_owner == 'llvm'
17 runs-on: llvm-premerge-linux-runners
19 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
20 cancel-in-progress: true
22 image: ghcr.io/llvm/ci-ubuntu-22.04:latest
28 uses: actions/checkout@v4
32 uses: hendrikmuhs/ccache-action@v1.2.14
33 - name: Build and Test
35 git config --global --add safe.directory '*'
37 modified_files=$(git diff --name-only HEAD~1...HEAD)
38 modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
43 . ./.ci/compute-projects.sh
45 all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
46 modified_projects="$(keep-modified-projects ${all_projects})"
48 linux_projects_to_test=$(exclude-linux $(compute-projects-to-test 0 ${modified_projects}))
49 linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq)
50 linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq)
52 linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test})
53 linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq)
54 linux_runtimes=$(echo ${linux_runtimes_to_test} | sort | uniq)
56 if [[ "${linux_projects}" == "" ]]; then
57 echo "No projects to build"
61 echo "Building projects: ${linux_projects}"
62 echo "Running project checks targets: ${linux_check_targets}"
63 echo "Building runtimes: ${linux_runtimes}"
64 echo "Running runtimes checks targets: ${linux_runtime_check_targets}"
66 export CC=/opt/llvm/bin/clang
67 export CXX=/opt/llvm/bin/clang++
69 ./.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"