Skip to content

Commit 7c6f651

Browse files
boomanaiden154vvereschaka
authored andcommitted
Add profcheck init script (llvm#561)
This is to be run on VM startup to setup the machine and start the buildbot.
1 parent b1fcfbb commit 7c6f651

File tree

2 files changed

+52
-4
lines changed

2 files changed

+52
-4
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
set -ex
2+
3+
apt-get update
4+
apt-get install -y python3 python3-pip cmake ninja-build git ccache lsb-release wget software-properties-common gnupg wget
5+
pip3 install --break-system-packages buildbot-worker==3.11.7
6+
7+
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 20
8+
ln -sf /usr/bin/clang-20 /usr/bin/cc
9+
ln -sf /usr/bin/clang++-20 /usr/bin/c++
10+
ln -sf /usr/bin/ld.lld-20 /usr/bin/ld
11+
12+
rm -rf /b
13+
BOT_DIR=/b
14+
SERVER_PORT=9994
15+
WORKER_NAME="$(hostname)"
16+
WORKER_PASSWORD="$(gsutil cat gs://sanitizer-buildbot/$(hostname)-password)"
17+
18+
userdel buildbot | true
19+
groupadd -f buildbot
20+
useradd buildbot -g buildbot -m -d /b/home
21+
chown buildbot:buildbot $BOT_DIR
22+
23+
sudo -u buildbot buildbot-worker create-worker -f --allow-shutdown=signal $BOT_DIR lab.llvm.org:$SERVER_PORT \
24+
"${WORKER_NAME}" "${WORKER_PASSWORD}"
25+
26+
{
27+
echo "Mircea Trofin <[email protected]>"
28+
echo "Aiden Grossman <[email protected]>"
29+
} > $BOT_DIR/info/admin
30+
31+
{
32+
echo "To reproduce locally, use a standard CMake invocation with -DLLVM_ENABLE_PROFCHECK=ON and -DLLVM_LIT_ARGS='--exclude-xfail'"
33+
echo "Example:"
34+
echo "cmake -GNinja"
35+
echo " -DCMAKE_BUILD_TYPE=Release"
36+
echo " -DLLVM_ENABLE_ASSERTIONS=ON"
37+
echo " -DLLVM_LIT_ARGS='--exclude-xfail'"
38+
echo " -DLLVM_ENABLE_PROFCHECK=ON"
39+
echo
40+
uname -a | head -n1
41+
date
42+
cmake --version | head -n1
43+
c++ --version | head -n1
44+
ld --version | head -n1
45+
lscpu
46+
} > $BOT_DIR/info/host
47+
48+
sudo -u buildbot buildbot-worker start $BOT_DIR

premerge/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ module "premerge_cluster_us_central_resources" {
171171
linux_object_cache_gcp_service_account_email = module.premerge_cluster_us_central.linux_object_cache_gcp_service_account_email
172172
windows_2022_object_cache_gcp_service_account_email = module.premerge_cluster_us_central.windows_2022_object_cache_gcp_service_account_email
173173
github_arc_version = "0.12.1"
174-
linux_buildbot_name = "premerge-us-central-linux"
174+
linux_buildbot_name = "premerge-us-central-linux-b1"
175175
linux_buildbot_password = data.google_secret_manager_secret_version.us_central_linux_buildbot_password.secret_data
176-
windows_buildbot_name = "premerge-us-central-windows"
176+
windows_buildbot_name = "premerge-us-central-windows-b1"
177177
windows_buildbot_password = data.google_secret_manager_secret_version.us_central_windows_buildbot_password.secret_data
178178
linux_object_cache_buildbot_service_account_email = module.premerge_cluster_us_central.linux_object_cache_buildbot_service_account_email
179179
windows_2022_object_cache_buildbot_service_account_email = module.premerge_cluster_us_central.windows_2022_object_cache_buildbot_service_account_email
@@ -198,9 +198,9 @@ module "premerge_cluster_us_west_resources" {
198198
linux_object_cache_gcp_service_account_email = module.premerge_cluster_us_west.linux_object_cache_gcp_service_account_email
199199
windows_2022_object_cache_gcp_service_account_email = module.premerge_cluster_us_west.windows_2022_object_cache_gcp_service_account_email
200200
github_arc_version = "0.12.1"
201-
linux_buildbot_name = "premerge-us-west-linux"
201+
linux_buildbot_name = "premerge-us-west-linux-b1"
202202
linux_buildbot_password = data.google_secret_manager_secret_version.us_west_linux_buildbot_password.secret_data
203-
windows_buildbot_name = "premerge-us-west-windows"
203+
windows_buildbot_name = "premerge-us-west-windows-b1"
204204
windows_buildbot_password = data.google_secret_manager_secret_version.us_west_windows_buildbot_password.secret_data
205205
linux_object_cache_buildbot_service_account_email = module.premerge_cluster_us_west.linux_object_cache_buildbot_service_account_email
206206
windows_2022_object_cache_buildbot_service_account_email = module.premerge_cluster_us_west.windows_2022_object_cache_buildbot_service_account_email

0 commit comments

Comments
 (0)