Skip to content

Commit 6c660f1

Browse files
committed
Merge branch 'main' into Fix_bug_issue_96432
2 parents 0e1f468 + 9f75b66 commit 6c660f1

File tree

12,833 files changed

+539341
-228833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

12,833 files changed

+539341
-228833
lines changed

.ci/compute-projects.sh

+194
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
#!/usr/bin/env bash
2+
#===----------------------------------------------------------------------===##
3+
#
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
7+
#
8+
#===----------------------------------------------------------------------===##
9+
10+
#
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.
14+
#
15+
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
27+
;;
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
35+
fi
36+
;;
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
42+
;;
43+
clang-tools-extra)
44+
echo libc
45+
;;
46+
mlir)
47+
# Flang is not stable in Windows CI at the moment
48+
if [[ $isForWindows == 0 ]]; then
49+
echo flang
50+
fi
51+
;;
52+
*)
53+
# Nothing to do
54+
;;
55+
esac
56+
done
57+
}
58+
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
67+
;;
68+
*)
69+
# Nothing to do
70+
;;
71+
esac
72+
done
73+
}
74+
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
84+
;;
85+
cross-project-tests)
86+
for p in lld clang; do
87+
echo $p
88+
done
89+
;;
90+
clang-tools-extra)
91+
for p in llvm clang; do
92+
echo $p
93+
done
94+
;;
95+
compiler-rt|libc|openmp)
96+
echo clang lld
97+
;;
98+
flang|lldb|libclc)
99+
for p in llvm clang; do
100+
echo $p
101+
done
102+
;;
103+
lld|mlir|polly)
104+
echo llvm
105+
;;
106+
*)
107+
# Nothing to do
108+
;;
109+
esac
110+
done
111+
}
112+
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
119+
*)
120+
echo "${project}"
121+
;;
122+
esac
123+
done
124+
}
125+
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
136+
*)
137+
echo "${project}"
138+
;;
139+
esac
140+
done
141+
}
142+
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}"
150+
fi
151+
done
152+
}
153+
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"
163+
;;
164+
compiler-rt)
165+
echo "check-compiler-rt"
166+
;;
167+
cross-project-tests)
168+
echo "check-cross-project"
169+
;;
170+
libcxx)
171+
echo "check-cxx"
172+
;;
173+
libcxxabi)
174+
echo "check-cxxabi"
175+
;;
176+
libunwind)
177+
echo "check-unwind"
178+
;;
179+
lldb)
180+
echo "check-lldb"
181+
;;
182+
pstl)
183+
# Currently we do not run pstl tests in CI.
184+
;;
185+
libclc)
186+
# Currently there is no testing for libclc.
187+
;;
188+
*)
189+
echo "check-${project}"
190+
;;
191+
esac
192+
done
193+
}
194+

.ci/generate-buildkite-pipeline-premerge

+1-178
Original file line numberDiff line numberDiff line change
@@ -52,184 +52,7 @@ modified_dirs=$(echo "$MODIFIED_FILES" | cut -d'/' -f1 | sort -u)
5252
echo "Directories modified:" >&2
5353
echo "$modified_dirs" >&2
5454

55-
function compute-projects-to-test() {
56-
isForWindows=$1
57-
shift
58-
projects=${@}
59-
for project in ${projects}; do
60-
echo "${project}"
61-
case ${project} in
62-
lld)
63-
for p in bolt cross-project-tests; do
64-
echo $p
65-
done
66-
;;
67-
llvm)
68-
for p in bolt clang clang-tools-extra lld lldb mlir polly; do
69-
echo $p
70-
done
71-
# Flang is not stable in Windows CI at the moment
72-
if [[ $isForWindows == 0 ]]; then
73-
echo flang
74-
fi
75-
;;
76-
clang)
77-
# lldb is temporarily removed to alleviate Linux pre-commit CI waiting times
78-
for p in clang-tools-extra compiler-rt cross-project-tests; do
79-
echo $p
80-
done
81-
;;
82-
clang-tools-extra)
83-
echo libc
84-
;;
85-
mlir)
86-
# Flang is not stable in Windows CI at the moment
87-
if [[ $isForWindows == 0 ]]; then
88-
echo flang
89-
fi
90-
;;
91-
*)
92-
# Nothing to do
93-
;;
94-
esac
95-
done
96-
}
97-
98-
function compute-runtimes-to-test() {
99-
projects=${@}
100-
for project in ${projects}; do
101-
case ${project} in
102-
clang)
103-
for p in libcxx libcxxabi libunwind; do
104-
echo $p
105-
done
106-
;;
107-
*)
108-
# Nothing to do
109-
;;
110-
esac
111-
done
112-
}
113-
114-
function add-dependencies() {
115-
projects=${@}
116-
for project in ${projects}; do
117-
echo "${project}"
118-
case ${project} in
119-
bolt)
120-
for p in clang lld llvm; do
121-
echo $p
122-
done
123-
;;
124-
cross-project-tests)
125-
for p in lld clang; do
126-
echo $p
127-
done
128-
;;
129-
clang-tools-extra)
130-
for p in llvm clang; do
131-
echo $p
132-
done
133-
;;
134-
compiler-rt|libc|openmp)
135-
echo clang lld
136-
;;
137-
flang|lldb|libclc)
138-
for p in llvm clang; do
139-
echo $p
140-
done
141-
;;
142-
lld|mlir|polly)
143-
echo llvm
144-
;;
145-
*)
146-
# Nothing to do
147-
;;
148-
esac
149-
done
150-
}
151-
152-
function exclude-linux() {
153-
projects=${@}
154-
for project in ${projects}; do
155-
case ${project} in
156-
cross-project-tests) ;; # tests failing
157-
openmp) ;; # https://github.com/google/llvm-premerge-checks/issues/410
158-
*)
159-
echo "${project}"
160-
;;
161-
esac
162-
done
163-
}
164-
165-
function exclude-windows() {
166-
projects=${@}
167-
for project in ${projects}; do
168-
case ${project} in
169-
cross-project-tests) ;; # tests failing
170-
compiler-rt) ;; # tests taking too long
171-
openmp) ;; # TODO: having trouble with the Perl installation
172-
libc) ;; # no Windows support
173-
lldb) ;; # custom environment requirements (https://github.com/llvm/llvm-project/pull/94208#issuecomment-2146256857)
174-
bolt) ;; # tests are not supported yet
175-
*)
176-
echo "${project}"
177-
;;
178-
esac
179-
done
180-
}
181-
182-
# Prints only projects that are both present in $modified_dirs and the passed
183-
# list.
184-
function keep-modified-projects() {
185-
projects=${@}
186-
for project in ${projects}; do
187-
if echo "$modified_dirs" | grep -q -E "^${project}$"; then
188-
echo "${project}"
189-
fi
190-
done
191-
}
192-
193-
function check-targets() {
194-
# Do not use "check-all" here because if there is "check-all" plus a
195-
# project specific target like "check-clang", that project's tests
196-
# will be run twice.
197-
projects=${@}
198-
for project in ${projects}; do
199-
case ${project} in
200-
clang-tools-extra)
201-
echo "check-clang-tools"
202-
;;
203-
compiler-rt)
204-
echo "check-compiler-rt"
205-
;;
206-
cross-project-tests)
207-
echo "check-cross-project"
208-
;;
209-
libcxx)
210-
echo "check-cxx"
211-
;;
212-
libcxxabi)
213-
echo "check-cxxabi"
214-
;;
215-
libunwind)
216-
echo "check-unwind"
217-
;;
218-
lldb)
219-
echo "check-lldb"
220-
;;
221-
pstl)
222-
# Currently we do not run pstl tests in CI.
223-
;;
224-
libclc)
225-
# Currently there is no testing for libclc.
226-
;;
227-
*)
228-
echo "check-${project}"
229-
;;
230-
esac
231-
done
232-
}
55+
. ./.ci/compute-projects.sh
23356

23457
# Project specific pipelines.
23558

0 commit comments

Comments
 (0)