|
12 | 12 | - 'main' |
13 | 13 |
|
14 | 14 | jobs: |
| 15 | + premerge-checks-linux: |
| 16 | + if: github.repository_owner == 'llvm' |
| 17 | + runs-on: llvm-premerge-linux-runners |
| 18 | + concurrency: |
| 19 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} |
| 20 | + cancel-in-progress: true |
| 21 | + steps: |
| 22 | + - name: Checkout LLVM |
| 23 | + uses: actions/checkout@v4 |
| 24 | + with: |
| 25 | + fetch-depth: 2 |
| 26 | + - name: Setup ccache |
| 27 | + uses: hendrikmuhs/[email protected] |
| 28 | + with: |
| 29 | + max-size: "2000M" |
| 30 | + - name: Build and Test |
| 31 | + # Mark the job as a success even if the step fails so that people do |
| 32 | + # not get notified while the new premerge pipeline is in an |
| 33 | + # experimental state. |
| 34 | + # TODO(boomanaiden154): Remove this once the pipeline is stable and we |
| 35 | + # are ready for people to start recieving notifications. |
| 36 | + continue-on-error: true |
| 37 | + run: | |
| 38 | + git config --global --add safe.directory '*' |
| 39 | +
|
| 40 | + modified_files=$(git diff --name-only HEAD~1...HEAD) |
| 41 | + modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u) |
| 42 | +
|
| 43 | + echo $modified_files |
| 44 | + echo $modified_dirs |
| 45 | +
|
| 46 | + . ./.ci/compute-projects.sh |
| 47 | +
|
| 48 | + all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl" |
| 49 | + modified_projects="$(keep-modified-projects ${all_projects})" |
| 50 | +
|
| 51 | + linux_projects_to_test=$(exclude-linux $(compute-projects-to-test 0 ${modified_projects})) |
| 52 | + linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) |
| 53 | + linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) |
| 54 | +
|
| 55 | + linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) |
| 56 | + linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) |
| 57 | + linux_runtimes=$(echo ${linux_runtimes_to_test} | sort | uniq) |
| 58 | +
|
| 59 | + if [[ "${linux_projects}" == "" ]]; then |
| 60 | + echo "No projects to build" |
| 61 | + exit 0 |
| 62 | + fi |
| 63 | +
|
| 64 | + echo "Building projects: ${linux_projects}" |
| 65 | + echo "Running project checks targets: ${linux_check_targets}" |
| 66 | + echo "Building runtimes: ${linux_runtimes}" |
| 67 | + echo "Running runtimes checks targets: ${linux_runtime_check_targets}" |
| 68 | +
|
| 69 | + export CC=/opt/llvm/bin/clang |
| 70 | + export CXX=/opt/llvm/bin/clang++ |
| 71 | +
|
| 72 | + ./.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})" |
| 73 | +
|
15 | 74 | premerge-checks-windows: |
16 | 75 | if: github.repository_owner == 'llvm' |
17 | 76 | runs-on: llvm-premerge-windows-runners |
@@ -59,6 +118,12 @@ jobs: |
59 | 118 | echo "windows-projects=${windows_projects}" >> $GITHUB_OUTPUT |
60 | 119 | echo "windows-check-targets=${windows_check_targets}" >> $GITHUB_OUTPUT |
61 | 120 | - name: Build and Test |
| 121 | + # Mark the job as a success even if the step fails so that people do |
| 122 | + # not get notified while the new premerge pipeline is in an |
| 123 | + # experimental state. |
| 124 | + # TODO(boomanaiden154): Remove this once the pipeline is stable and we |
| 125 | + # are ready for people to start recieving notifications. |
| 126 | + continue-on-error: true |
62 | 127 | shell: cmd |
63 | 128 | run: | |
64 | 129 | set MAX_PARALLEL_COMPILE_JOBS=64 |
|
0 commit comments