Skip to content

Commit 641f0f5

Browse files
authored
Merge branch 'main' into rosezhang2
2 parents 02188a7 + 68a6481 commit 641f0f5

File tree

1,342 files changed

+89396
-27278
lines changed

Some content is hidden

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

1,342 files changed

+89396
-27278
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ echo "Directories modified:" >&2
5353
echo "$modified_dirs" >&2
5454

5555
function compute-projects-to-test() {
56+
isForWindows=$1
57+
shift
5658
projects=${@}
5759
for project in ${projects}; do
5860
echo "${project}"
@@ -63,9 +65,13 @@ function compute-projects-to-test() {
6365
done
6466
;;
6567
llvm)
66-
for p in bolt clang clang-tools-extra flang lld lldb mlir polly; do
68+
for p in bolt clang clang-tools-extra lld lldb mlir polly; do
6769
echo $p
6870
done
71+
# Flang is not stable in Windows CI at the moment
72+
if [[ $isForWindows == 0 ]]; then
73+
echo flang
74+
fi
6975
;;
7076
clang)
7177
for p in clang-tools-extra compiler-rt lldb cross-project-tests; do
@@ -76,7 +82,10 @@ function compute-projects-to-test() {
7682
echo libc
7783
;;
7884
mlir)
79-
echo flang
85+
# Flang is not stable in Windows CI at the moment
86+
if [[ $isForWindows == 0 ]]; then
87+
echo flang
88+
fi
8089
;;
8190
*)
8291
# Nothing to do
@@ -241,15 +250,15 @@ fi
241250
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
242251
modified_projects="$(keep-modified-projects ${all_projects})"
243252

244-
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_projects}))
253+
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test 0 ${modified_projects}))
245254
linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq)
246255
linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq)
247256

248257
linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test})
249258
linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq)
250259
linux_runtimes=$(echo ${linux_runtimes_to_test} | sort | uniq)
251260

252-
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects}))
261+
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test 1 ${modified_projects}))
253262
windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq)
254263
windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq)
255264

.github/new-prs-labeler.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ llvm-lit:
5454
- llvm/utils/lit/**/*
5555

5656
PGO:
57+
- llvm/**/ProfileData/**/*
58+
- llvm/**/SampleProfile*
59+
- llvm/**/CodeGen/MIRSampleProfile*
5760
- llvm/lib/Transforms/Instrumentation/CGProfile.cpp
5861
- llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
5962
- llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
@@ -62,9 +65,9 @@ PGO:
6265
- llvm/lib/Transforms/Instrumentation/ValueProfile*
6366
- llvm/test/Instrumentation/InstrProfiling/**/*
6467
- llvm/test/Transforms/PGOProfile/**/*
68+
- llvm/test/Transforms/SampleProfile/**/*
6569
- llvm/**/llvm-profdata/**/*
6670
- llvm/**/llvm-profgen/**/*
67-
- llvm/unittests/ProfileData/**/*
6871

6972
vectorization:
7073
- llvm/lib/Transforms/Vectorize/**/*
@@ -746,6 +749,8 @@ backend:ARM:
746749
- clang/lib/CodeGen/Targets/ARM.cpp
747750
- clang/include/clang/Basic/BuiltinsARM*
748751
- llvm/test/MC/DisasemblerARM/**
752+
- clang/include/clang/Sema/SemaARM.h
753+
- clang/lib/Sema/SemaARM.cpp
749754

750755
backend:AArch64:
751756
- llvm/include/llvm/IR/IntrinsicsAArch64.td
@@ -757,6 +762,8 @@ backend:AArch64:
757762
- clang/lib/CodeGen/Targets/AArch64.cpp
758763
- clang/include/clang/Basic/BuiltinsAArch64*
759764
- llvm/test/MC/Disassembler/AArch64/**
765+
- clang/include/clang/Sema/SemaARM.h
766+
- clang/lib/Sema/SemaARM.cpp
760767

761768
backend:loongarch:
762769
- llvm/include/llvm/IR/IntrinsicsLoongArch.td
@@ -767,6 +774,8 @@ backend:loongarch:
767774
- clang/lib/Driver/ToolChains/Arch/LoongArch.*
768775
- clang/lib/CodeGen/Targets/LoongArch.cpp
769776
- clang/include/clang/Basic/BuiltinsLoongArch*
777+
- clang/include/clang/Sema/SemaLoongArch.h
778+
- clang/lib/Sema/SemaLoongArch.cpp
770779

771780
backend:MSP430:
772781
- llvm/include/llvm/IR/IntrinsicsMSP430.td
@@ -814,6 +823,8 @@ backend:WebAssembly:
814823
- llvm/unittests/Target/WebAssembly/**
815824
- llvm/test/DebugInfo/WebAssembly/**
816825
- llvm/test/MC/WebAssembly/**
826+
- clang/include/clang/Sema/SemaWasm.h
827+
- clang/lib/Sema/SemaLoongWasm.cpp
817828

818829
backend:X86:
819830
- llvm/include/llvm/IR/IntrinsicsX86.td
@@ -833,6 +844,8 @@ backend:X86:
833844
- llvm/include/llvm/TargetParser/X86*
834845
- llvm/lib/TargetParser/X86*
835846
- llvm/utils/TableGen/X86*
847+
- clang/include/clang/Sema/SemaX86.h
848+
- clang/lib/Sema/SemaX86.cpp
836849

837850
backend:PowerPC:
838851
- llvm/include/llvm/BinaryFormat/ELFRelocs/PowerPC*
@@ -857,6 +870,8 @@ backend:PowerPC:
857870
- clang/lib/Driver/ToolChains/AIX*
858871
- clang/lib/Driver/ToolChains/Arch/PPC.*
859872
- clang/test/CodeGen/PowerPC/**
873+
- clang/include/clang/Sema/SemaPPC.h
874+
- clang/lib/Sema/SemaPPC.cpp
860875

861876
backend:SystemZ:
862877
- llvm/include/llvm/BinaryFormat/ELFRelocs/SystemZ*
@@ -877,6 +892,8 @@ backend:SystemZ:
877892
- clang/lib/Driver/ToolChains/ZOS*
878893
- clang/lib/Driver/ToolChains/Arch/SystemZ.*
879894
- clang/test/CodeGen/SystemZ/**
895+
- clang/include/clang/Sema/SemaSystemZ.h
896+
- clang/lib/Sema/SemaSystemZ.cpp
880897

881898
third-party:unittests:
882899
- third-party/unittests/**
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Restart Preempted Libc++ Workflow
2+
3+
# The libc++ builders run on preemptable VMs, which can be shutdown at any time.
4+
# This workflow identifies when a workflow run was canceled due to the VM being preempted,
5+
# and restarts the workflow run.
6+
7+
# We identify a canceled workflow run by checking the annotations of the check runs in the check suite,
8+
# which should contain the message "The runner has received a shutdown signal."
9+
10+
# Note: If a job is both preempted and also contains a non-preemption failure, we do not restart the workflow.
11+
12+
on:
13+
workflow_run:
14+
workflows: [Build and Test libc\+\+]
15+
types:
16+
- completed
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
restart:
23+
if: github.repository_owner == 'llvm' && (github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'cancelled')
24+
name: "Restart Job"
25+
permissions:
26+
statuses: read
27+
checks: read
28+
actions: write
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: "Restart Job"
32+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
33+
with:
34+
script: |
35+
const failure_regex = /Process completed with exit code 1./
36+
const preemption_regex = /The runner has received a shutdown signal/
37+
38+
console.log('Listing check runs for suite')
39+
const check_suites = await github.rest.checks.listForSuite({
40+
owner: context.repo.owner,
41+
repo: context.repo.repo,
42+
check_suite_id: context.payload.workflow_run.check_suite_id
43+
})
44+
45+
check_run_ids = [];
46+
for (check_run of check_suites.data.check_runs) {
47+
console.log('Checking check run: ' + check_run.id);
48+
if (check_run.status != 'completed') {
49+
console.log('Check run was not completed. Skipping.');
50+
continue;
51+
}
52+
if (check_run.conclusion != 'failure' && check_run.conclusion != 'cancelled') {
53+
console.log('Check run had conclusion: ' + check_run.conclusion + '. Skipping.');
54+
continue;
55+
}
56+
check_run_ids.push(check_run.id);
57+
}
58+
59+
has_preempted_job = false;
60+
61+
for (check_run_id of check_run_ids) {
62+
console.log('Listing annotations for check run: ' + check_run_id);
63+
64+
annotations = await github.rest.checks.listAnnotations({
65+
owner: context.repo.owner,
66+
repo: context.repo.repo,
67+
check_run_id: check_run_id
68+
})
69+
70+
for (annotation of annotations.data) {
71+
if (annotation.annotation_level != 'failure') {
72+
continue;
73+
}
74+
75+
const preemption_match = annotation.message.match(preemption_regex);
76+
77+
if (preemption_match != null) {
78+
console.log('Found preemption message: ' + annotation.message);
79+
has_preempted_job = true;
80+
}
81+
82+
const failure_match = annotation.message.match(failure_regex);
83+
if (failure_match != null) {
84+
// We only want to restart the workflow if all of the failures were due to preemption.
85+
// We don't want to restart the workflow if there were other failures.
86+
console.log('Choosing not to rerun workflow because we found a non-preemption failure');
87+
console.log('Failure message: ' + annotation.message);
88+
return;
89+
}
90+
}
91+
}
92+
93+
if (!has_preempted_job) {
94+
console.log('No preempted jobs found. Not restarting workflow.');
95+
return;
96+
}
97+
98+
console.log("Restarted workflow: " + context.payload.workflow_run.id);
99+
await github.rest.actions.reRunWorkflowFailedJobs({
100+
owner: context.repo.owner,
101+
repo: context.repo.repo,
102+
run_id: context.payload.workflow_run.id
103+
})
104+
105+

0 commit comments

Comments
 (0)