[M68k] always use movem for register spills (#106715)
[llvm-project.git] / .ci / compute-projects.sh
blob32baf26b4f0a051be5cf1c82c00fcc589f5ef555
1 #!/usr/bin/env bash
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() {
17 isForWindows=$1
18 shift
19 projects=${@}
20 for project in ${projects}; do
21 echo "${project}"
22 case ${project} in
23 lld)
24 for p in bolt cross-project-tests; do
25 echo $p
26 done
28 llvm)
29 for p in bolt clang clang-tools-extra lld lldb mlir polly; do
30 echo $p
31 done
32 # Flang is not stable in Windows CI at the moment
33 if [[ $isForWindows == 0 ]]; then
34 echo flang
37 clang)
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
40 echo $p
41 done
43 clang-tools-extra)
44 echo libc
46 mlir)
47 # Flang is not stable in Windows CI at the moment
48 if [[ $isForWindows == 0 ]]; then
49 echo flang
53 # Nothing to do
55 esac
56 done
59 function compute-runtimes-to-test() {
60 projects=${@}
61 for project in ${projects}; do
62 case ${project} in
63 clang)
64 for p in libcxx libcxxabi libunwind; do
65 echo $p
66 done
69 # Nothing to do
71 esac
72 done
75 function add-dependencies() {
76 projects=${@}
77 for project in ${projects}; do
78 echo "${project}"
79 case ${project} in
80 bolt)
81 for p in clang lld llvm; do
82 echo $p
83 done
85 cross-project-tests)
86 for p in lld clang; do
87 echo $p
88 done
90 clang-tools-extra)
91 for p in llvm clang; do
92 echo $p
93 done
95 compiler-rt|libc|openmp)
96 echo clang lld
98 flang|lldb|libclc)
99 for p in llvm clang; do
100 echo $p
101 done
103 lld|mlir|polly)
104 echo llvm
107 # Nothing to do
109 esac
110 done
113 function exclude-linux() {
114 projects=${@}
115 for project in ${projects}; do
116 case ${project} in
117 cross-project-tests) ;; # tests failing
118 openmp) ;; # https://github.com/google/llvm-premerge-checks/issues/410
120 echo "${project}"
122 esac
123 done
126 function exclude-windows() {
127 projects=${@}
128 for project in ${projects}; do
129 case ${project} in
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
137 echo "${project}"
139 esac
140 done
143 # Prints only projects that are both present in $modified_dirs and the passed
144 # list.
145 function keep-modified-projects() {
146 projects=${@}
147 for project in ${projects}; do
148 if echo "$modified_dirs" | grep -q -E "^${project}$"; then
149 echo "${project}"
151 done
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
157 # will be run twice.
158 projects=${@}
159 for project in ${projects}; do
160 case ${project} in
161 clang-tools-extra)
162 echo "check-clang-tools"
164 compiler-rt)
165 echo "check-compiler-rt"
167 cross-project-tests)
168 echo "check-cross-project"
170 libcxx)
171 echo "check-cxx"
173 libcxxabi)
174 echo "check-cxxabi"
176 libunwind)
177 echo "check-unwind"
179 lldb)
180 echo "check-lldb"
182 pstl)
183 # Currently we do not run pstl tests in CI.
185 libclc)
186 # Currently there is no testing for libclc.
189 echo "check-${project}"
191 esac
192 done