2 #===----------------------------------------------------------------------===##
4 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 # See https://llvm.org/LICENSE.txt for license information.
6 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 #===----------------------------------------------------------------------===##
11 # This file contains functions to compute which projects should be built by CI
12 # systems and is intended to provide common functionality applicable across
13 # multiple systems during a transition period.
16 function compute-projects-to-test
() {
20 for project
in ${projects}; do
24 for p
in bolt cross-project-tests
; do
29 for p
in bolt clang clang-tools-extra lld lldb mlir polly
; do
32 # Flang is not stable in Windows CI at the moment
33 if [[ $isForWindows == 0 ]]; then
38 # lldb is temporarily removed to alleviate Linux pre-commit CI waiting times
39 for p
in clang-tools-extra compiler-rt cross-project-tests
; do
47 # Flang is not stable in Windows CI at the moment
48 if [[ $isForWindows == 0 ]]; then
59 function compute-runtimes-to-test
() {
61 for project
in ${projects}; do
64 for p
in libcxx libcxxabi libunwind
; do
75 function add-dependencies
() {
77 for project
in ${projects}; do
81 for p
in clang lld llvm
; do
86 for p
in lld clang
; do
91 for p
in llvm clang
; do
95 compiler-rt|libc|openmp
)
99 for p
in llvm clang
; do
113 function exclude-linux
() {
115 for project
in ${projects}; do
117 cross-project-tests
) ;; # tests failing
118 openmp
) ;; # https://github.com/google/llvm-premerge-checks/issues/410
126 function exclude-windows
() {
128 for project
in ${projects}; do
130 cross-project-tests
) ;; # tests failing
131 compiler-rt
) ;; # tests taking too long
132 openmp
) ;; # TODO: having trouble with the Perl installation
133 libc
) ;; # no Windows support
134 lldb
) ;; # custom environment requirements (https://github.com/llvm/llvm-project/pull/94208#issuecomment-2146256857)
135 bolt
) ;; # tests are not supported yet
143 # Prints only projects that are both present in $modified_dirs and the passed
145 function keep-modified-projects
() {
147 for project
in ${projects}; do
148 if echo "$modified_dirs" |
grep -q -E "^${project}$"; then
154 function check-targets
() {
155 # Do not use "check-all" here because if there is "check-all" plus a
156 # project specific target like "check-clang", that project's tests
159 for project
in ${projects}; do
162 echo "check-clang-tools"
165 echo "check-compiler-rt"
168 echo "check-cross-project"
183 # Currently we do not run pstl tests in CI.
186 # Currently there is no testing for libclc.
189 echo "check-${project}"