1
0
Fork 0

update linux node pool (machines w/ no external ssd)

updated llvm version to 12 with relevant fixes in scrips
This commit is contained in:
Mikhail Goncharov 2021-05-17 10:05:54 +02:00
parent 1b603e884a
commit f0d1cc6ab3
4 changed files with 20 additions and 25 deletions

View file

@ -1,3 +1,4 @@
# 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'; \ RUN echo 'intall build dependencies'; \
@ -10,16 +11,12 @@ RUN echo 'intall build dependencies'; \
ccache \ ccache \
python3 python3-psutil \ python3 python3-psutil \
python3-pip python3-setuptools \ python3-pip python3-setuptools \
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 -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - ;\ RUN wget https://apt.llvm.org/llvm.sh; \
echo "deb http://apt.llvm.org/unstable/ llvm-toolchain-10 main\ndeb-src http://apt.llvm.org/unstable/ llvm-toolchain-10 main\n$(cat /etc/apt/sources.list)" > /etc/apt/sources.list ;\ chmod +x llvm.sh; \
cat /etc/apt/sources.list; \ ./llvm.sh 12;\
apt-get update ;\ apt install -y clang-format-12 clang-tidy-12
apt-get upgrade -y ;\
apt-get install -y \
clang-10 lld-10 clang-tidy-10 clang-format-10 \
;\
apt-get clean
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 ;\
@ -33,16 +30,11 @@ ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8 ENV LC_ALL en_US.UTF-8
# Install python dependencies for the scripts. ADD will check contentents of a file for changes changed. RUN ln -s /usr/bin/clang-12 /usr/bin/clang;\
# TODO: that should be done during the build as it will pull this repo anyway and will have latest version. ln -s /usr/bin/clang++-12 /usr/bin/clang++;\
ADD "https://raw.githubusercontent.com/google/llvm-premerge-checks/main/scripts/requirements.txt" requirements.txt ln -s /usr/bin/clang-tidy-12 /usr/bin/clang-tidy;\
RUN pip3 install -r requirements.txt ln -s /usr/bin/clang-tidy-diff-12.py /usr/bin/clang-tidy-diff;\
ln -s /usr/bin/clang-format-12 /usr/bin/clang-format;\
ln -s /usr/bin/clang-format-diff-12 /usr/bin/clang-format-diff;\
ln -s /usr/bin/lld-12 /usr/bin/lld
RUN ln -s /usr/bin/clang-10 /usr/bin/clang;\
ln -s /usr/bin/clang++-10 /usr/bin/clang++;\
ln -s /usr/bin/clang-tidy-10 /usr/bin/clang-tidy;\
ln -s /usr/bin/clang-tidy-diff-10.py /usr/bin/clang-tidy-diff;\
ln -s /usr/bin/clang-format-10 /usr/bin/clang-format;\
ln -s /usr/bin/git-clang-format-10 /usr/bin/git-clang-format;\
ln -s /usr/bin/clang-format-diff-10 /usr/bin/clang-format-diff;\
ln -s /usr/bin/lld-10 /usr/bin/lld

View file

@ -19,6 +19,10 @@ metadata:
namespace: buildkite namespace: buildkite
spec: spec:
replicas: 1 replicas: 1
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 50%
selector: selector:
matchLabels: matchLabels:
app: agent-premerge-debian app: agent-premerge-debian
@ -33,10 +37,10 @@ spec:
resources: resources:
limits: limits:
cpu: 30 cpu: 30
memory: 50Gi memory: 80Gi
requests: requests:
cpu: 30 cpu: 30
memory: 50Gi memory: 80Gi
volumeMounts: volumeMounts:
- name: github-ssh - name: github-ssh
mountPath: /mnt/ssh mountPath: /mnt/ssh

View file

@ -26,7 +26,7 @@ from buildkite_utils import annotate
def get_diff(base_commit) -> Tuple[bool, str]: def get_diff(base_commit) -> Tuple[bool, str]:
r = subprocess.run(f'git-clang-format {base_commit}', shell=True) r = subprocess.run(f'python3 clang/tools/clang-format/git-clang-format {base_commit}', shell=True)
logging.debug(f'git-clang-format {r}') logging.debug(f'git-clang-format {r}')
if r.returncode != 0: if r.returncode != 0:
logging.error(f'git-clang-format returned an non-zero exit code {r.returncode}') logging.error(f'git-clang-format returned an non-zero exit code {r.returncode}')

View file

@ -57,7 +57,6 @@ def generic_linux(projects: str, check_diff: bool) -> List:
'EXIT_STATUS=$$?', 'EXIT_STATUS=$$?',
'echo "--- ccache stats"', 'echo "--- ccache stats"',
'ccache --print-stats', 'ccache --print-stats',
'ccache --show-stats',
'exit $$EXIT_STATUS', 'exit $$EXIT_STATUS',
]) ])