1
0
Fork 0

enable bolt premerge checks

This commit is contained in:
Mikhail Goncharov 2022-01-26 18:40:18 +01:00
parent 4f5a16bbdb
commit f3ac1b41dd
5 changed files with 57 additions and 5 deletions

View file

@ -1,23 +1,31 @@
# debian:unstable to get a go version > 1.11 (migth have other packages with different version, please check before updating)
FROM debian:unstable
RUN echo 'intall build dependencies'; \
apt-get update ;\
RUN echo 'intall packages'; \
apt-get update; \
apt-get install -y --no-install-recommends \
locales openssh-client gnupg ca-certificates \
zip wget git \
cmake gdb build-essential \
ninja-build \
libelf-dev libffi-dev gcc-multilib \
# for bolt subproject
libc6-dev-i386 \
ccache \
python3 python3-psutil \
python3-pip python3-setuptools \
lsb-release software-properties-common \
swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync jq;
RUN wget https://apt.llvm.org/llvm.sh; \
# LLVM must be installed after prerequsite packages.
RUN echo 'install llvm 13'; \
wget https://apt.llvm.org/llvm.sh; \
chmod +x llvm.sh; \
./llvm.sh 13;\
apt install -y clang-format-13 clang-tidy-13
apt-get update; \
apt install -y clang-format-13 clang-tidy-13;
RUN echo 'configure locale'; \
sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\

View file

@ -88,6 +88,24 @@ These are the steps to set up the build server on a clean infrastructure:
```
1. Configure it
## Running Docker containers
`./containers/build_run.sh` provides a good way to run a container once to check that it builds and contains good package versions. To work with a container and
persist it state do (taking 'base-debian' as example):
```
cd ./containers/base-debian
sudo docker build -t base-debian .
sudo docker run -it base-debian /bin/bash
```
to resume it from where you left
```
sudo docker start -a -i $(sudo docker ps -a -f ancestor=base-debian -q -l)
```
## Creating docker containers on Windows
If you want to build/update/test docker container for Windows, you need to do this on a Windows machine.
@ -218,3 +236,23 @@ htpasswd -b auth <user> <pass>
kubectl delete secret http-auth -n buildkite
kubectl create secret generic http-auth -n buildkite --from-file=./auth
```
## Update github-ssh secret
This Kubernetes stores github ssh access files for llvm.premerge.tests@gmail.com user.
To access it run `kubectl get secret github-ssh -n buildkite -o yaml | tee github-ssh.yam`.
It has 3 entries: "id_rsa", "id_rsa.pub", "known_hosts".
If you need to updated it, edit resulting yaml above with updated base 64 values.
To updated "known_hosts" run `ssh-keyscan github.com` and store base64 encoded output in "known_hosts".
Then run `kubectl apply -f github-ssh.yaml`.
To create this secret from scratch run
`kubectl create secret generic github-ssh --namespace buildkite --from-file ./id_rsa --from-file ./id_rsa.pub --from-file ./known_hosts`
providing all files needed.
Note that containers have to be restarted as ssh settings are copied at startup
(entrypoint.sh).

View file

@ -4,6 +4,8 @@
dependencies:
llvm: []
bolt:
- llvm
clang:
- llvm
clang-tools-extra:
@ -47,6 +49,7 @@ dependencies:
# llvm/CMakeLists.txt in "set(LLVM_ALL_PROJECTS ..."
# The value for all project is the list of ninja targets to run.
allprojects:
bolt: ["check-bolt"]
clang: ["check-clang"]
clang-tools-extra: ["check-clang-tools"]
compiler-rt: ["check-all"] # check-compiler-rt seems to exist only in standalone builds.
@ -68,6 +71,7 @@ allprojects:
# projects excluded from automatic configuration as they could not be built
excludedProjects:
windows:
- bolt # tests are not supported yet
- lldb # failing tests
- libunwind # no windows support
- libcxx # no windows support

View file

@ -27,4 +27,6 @@ arguments:
# CCACHE is enabled in script iff environment variable `CCACHE_DIR` is set
- '-D LLVM_ENABLE_LLD=ON'
- '-D CMAKE_CXX_FLAGS=-gmlt'
# Bolt https://github.com/google/llvm-premerge-checks/issues/364#issuecomment-1013952831.
- '-DBOLT_CLANG_EXE=/usr/bin/clang -DBOLT_LLD_EXE=/usr/bin/lld'
windows: []