enable bolt premerge checks
This commit is contained in:
parent
4f5a16bbdb
commit
f3ac1b41dd
5 changed files with 57 additions and 5 deletions
|
@ -1,23 +1,31 @@
|
||||||
# debian:unstable to get a go version > 1.11 (migth have other packages with different version, please check before updating)
|
# debian:unstable to get a go version > 1.11 (migth have other packages with different version, please check before updating)
|
||||||
FROM debian:unstable
|
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 \
|
apt-get install -y --no-install-recommends \
|
||||||
locales openssh-client gnupg ca-certificates \
|
locales openssh-client gnupg ca-certificates \
|
||||||
zip wget git \
|
zip wget git \
|
||||||
cmake gdb build-essential \
|
cmake gdb build-essential \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
libelf-dev libffi-dev gcc-multilib \
|
libelf-dev libffi-dev gcc-multilib \
|
||||||
|
# for bolt subproject
|
||||||
|
libc6-dev-i386 \
|
||||||
ccache \
|
ccache \
|
||||||
python3 python3-psutil \
|
python3 python3-psutil \
|
||||||
python3-pip python3-setuptools \
|
python3-pip python3-setuptools \
|
||||||
lsb-release software-properties-common \
|
lsb-release software-properties-common \
|
||||||
swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync jq;
|
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; \
|
chmod +x llvm.sh; \
|
||||||
./llvm.sh 13;\
|
./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'; \
|
RUN echo 'configure locale'; \
|
||||||
sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\
|
sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\
|
||||||
|
|
|
@ -30,4 +30,4 @@ cp /mnt/ssh/* /var/lib/buildkite-agent/.ssh
|
||||||
chmod 700 /var/lib/buildkite-agent/.ssh
|
chmod 700 /var/lib/buildkite-agent/.ssh
|
||||||
chmod 600 /var/lib/buildkite-agent/.ssh/*
|
chmod 600 /var/lib/buildkite-agent/.ssh/*
|
||||||
chown -R buildkite-agent:buildkite-agent /var/lib/buildkite-agent/.ssh/
|
chown -R buildkite-agent:buildkite-agent /var/lib/buildkite-agent/.ssh/
|
||||||
exec /usr/bin/tini -g -- $@
|
exec /usr/bin/tini -g -- $@
|
||||||
|
|
|
@ -88,6 +88,24 @@ These are the steps to set up the build server on a clean infrastructure:
|
||||||
```
|
```
|
||||||
1. Configure it
|
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
|
## 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.
|
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 delete secret http-auth -n buildkite
|
||||||
kubectl create secret generic http-auth -n buildkite --from-file=./auth
|
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).
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
llvm: []
|
llvm: []
|
||||||
|
bolt:
|
||||||
|
- llvm
|
||||||
clang:
|
clang:
|
||||||
- llvm
|
- llvm
|
||||||
clang-tools-extra:
|
clang-tools-extra:
|
||||||
|
@ -47,6 +49,7 @@ dependencies:
|
||||||
# llvm/CMakeLists.txt in "set(LLVM_ALL_PROJECTS ..."
|
# llvm/CMakeLists.txt in "set(LLVM_ALL_PROJECTS ..."
|
||||||
# The value for all project is the list of ninja targets to run.
|
# The value for all project is the list of ninja targets to run.
|
||||||
allprojects:
|
allprojects:
|
||||||
|
bolt: ["check-bolt"]
|
||||||
clang: ["check-clang"]
|
clang: ["check-clang"]
|
||||||
clang-tools-extra: ["check-clang-tools"]
|
clang-tools-extra: ["check-clang-tools"]
|
||||||
compiler-rt: ["check-all"] # check-compiler-rt seems to exist only in standalone builds.
|
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
|
# projects excluded from automatic configuration as they could not be built
|
||||||
excludedProjects:
|
excludedProjects:
|
||||||
windows:
|
windows:
|
||||||
|
- bolt # tests are not supported yet
|
||||||
- lldb # failing tests
|
- lldb # failing tests
|
||||||
- libunwind # no windows support
|
- libunwind # no windows support
|
||||||
- libcxx # no windows support
|
- libcxx # no windows support
|
||||||
|
|
|
@ -27,4 +27,6 @@ arguments:
|
||||||
# CCACHE is enabled in script iff environment variable `CCACHE_DIR` is set
|
# CCACHE is enabled in script iff environment variable `CCACHE_DIR` is set
|
||||||
- '-D LLVM_ENABLE_LLD=ON'
|
- '-D LLVM_ENABLE_LLD=ON'
|
||||||
- '-D CMAKE_CXX_FLAGS=-gmlt'
|
- '-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: []
|
windows: []
|
||||||
|
|
Loading…
Reference in a new issue