Update clang version
apt.llvm.org signature has changed, we also should use debian:stable (=buster) as a base image to correctly install packages. Removed jdk from the base image as it was used only by Jenkins. Log packages version for every build. Related issues: #112
This commit is contained in:
parent
89e3f73689
commit
fb830daebe
5 changed files with 63 additions and 39 deletions
|
@ -1,18 +1,34 @@
|
|||
FROM debian:testing
|
||||
FROM debian:buster
|
||||
|
||||
RUN echo 'intall build dependencies'; \
|
||||
echo "deb [trusted=yes] http://apt.llvm.org/buster/ llvm-toolchain-buster-10 main\n$(cat /etc/apt/sources.list)" > /etc/apt/sources.list ;\
|
||||
apt-get update ;\
|
||||
apt-get install -y --no-install-recommends \
|
||||
locales openssh-client\
|
||||
cmake ninja-build git ca-certificates clang lld ccache python3 build-essential gdb \
|
||||
clang-tidy clang-format \
|
||||
python3-psutil zip wget \
|
||||
openjdk-11-jdk \
|
||||
locales openssh-client gnupg ca-certificates \
|
||||
zip wget git \
|
||||
cmake gdb build-essential \
|
||||
ninja-build \
|
||||
ccache \
|
||||
python3 python3-psutil \
|
||||
python3-pip python3-setuptools \
|
||||
swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync jq; \
|
||||
apt-get clean; \
|
||||
echo 'configure locale'; \
|
||||
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 - ;\
|
||||
echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-10 main\ndeb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-10 main\n$(cat /etc/apt/sources.list)" > /etc/apt/sources.list ;\
|
||||
cat /etc/apt/sources.list; \
|
||||
apt-get update ;\
|
||||
apt-get upgrade -y ;\
|
||||
apt-get install -y \
|
||||
clang-10 lld-10 clang-tidy-10 clang-format-10 \
|
||||
;\
|
||||
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 /usr/bin/clang-tidy-diff;\
|
||||
ln -s /usr/bin/clang-format-10 /usr/bin/clang-format;\
|
||||
ln -s /usr/bin/clang-format-diff-10 /usr/bin/clang-format-diff;\
|
||||
ln -s /usr/bin/lld-10 /usr/bin/lld;\
|
||||
apt-get clean;
|
||||
|
||||
RUN echo 'configure locale'; \
|
||||
sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\
|
||||
locale-gen ;\
|
||||
echo 'make python 3 default'; \
|
||||
|
|
|
@ -25,6 +25,7 @@ if __name__ == '__main__':
|
|||
'label': ':linux: build and test linux',
|
||||
'key': 'linux',
|
||||
'commands': [
|
||||
'dpkg -l >> artifacts/packages.txt',
|
||||
'export SRC=${BUILDKITE_BUILD_PATH}/llvm-premerge-checks',
|
||||
'rm -rf ${SRC}',
|
||||
'git clone --depth 1 --branch ${scripts_branch} https://github.com/google/llvm-premerge-checks.git ${SRC}',
|
||||
|
|
|
@ -25,6 +25,7 @@ if __name__ == '__main__':
|
|||
'label': ':linux: build and test linux',
|
||||
'key': 'linux',
|
||||
'commands': [
|
||||
'dpkg -l >> artifacts/packages.txt',
|
||||
'export SRC=${BUILDKITE_BUILD_PATH}/llvm-premerge-checks',
|
||||
'rm -rf ${SRC}',
|
||||
'git clone --depth 1 --branch ${scripts_branch} https://github.com/google/llvm-premerge-checks.git ${SRC}',
|
||||
|
|
|
@ -34,17 +34,17 @@ from phabtalk.phabtalk import Report, PhabTalk, Step
|
|||
|
||||
|
||||
def ninja_all_report(step: Step, _: Report):
|
||||
print('Full will be available in Artifacts "ninja-all.log"', flush=True)
|
||||
print('Full log will be available in Artifacts "ninja-all.log"', flush=True)
|
||||
r = subprocess.run(f'ninja all | '
|
||||
f'tee {artifacts_dir}/ninja-all.log | '
|
||||
f'grep -vE "\\[.*] (Building|Linking|Copying|Generating|Creating)"',
|
||||
f'grep -vE "\\[.*] (Building|Linking|Linting|Copying|Generating|Creating)"',
|
||||
shell=True, cwd=build_dir)
|
||||
logging.debug(f'ninja all: returned {r.returncode}, stderr: "{r.stderr}"')
|
||||
step.set_status_from_exit_code(r.returncode)
|
||||
|
||||
|
||||
def ninja_check_all_report(step: Step, _: Report):
|
||||
print('Full will be available in Artifacts "ninja-check-all.log"', flush=True)
|
||||
print('Full log will be available in Artifacts "ninja-check-all.log"', flush=True)
|
||||
r = subprocess.run(f'ninja check-all | tee {artifacts_dir}/ninja-check-all.log | '
|
||||
f'grep -vE "^\\[.*] (Building|Linking)" | '
|
||||
f'grep -vE "^(PASS|XFAIL|UNSUPPORTED):"', shell=True, cwd=build_dir)
|
||||
|
|
|
@ -33,34 +33,40 @@ def run(working_dir: str, test_results: str, step: Optional[Step], report: Optio
|
|||
step.messages.append(f'test report "{path}" is not found')
|
||||
return
|
||||
report.add_artifact(working_dir, test_results, 'test results')
|
||||
success = True
|
||||
root_node = etree.parse(path)
|
||||
for test_case in root_node.xpath('//testcase'):
|
||||
test_result = 'pass'
|
||||
if test_case.find('failure') is not None:
|
||||
test_result = 'fail'
|
||||
if test_case.find('skipped') is not None:
|
||||
test_result = 'skip'
|
||||
report.test_stats[test_result] += 1
|
||||
if test_result == 'fail':
|
||||
success = False
|
||||
failure = test_case.find('failure')
|
||||
test_result = {
|
||||
'name': test_case.attrib['name'],
|
||||
'namespace': test_case.attrib['classname'],
|
||||
'result': test_result,
|
||||
'duration': float(test_case.attrib['time']),
|
||||
'details': failure.text
|
||||
}
|
||||
report.unit.append(test_result)
|
||||
try:
|
||||
success = True
|
||||
root_node = etree.parse(path)
|
||||
for test_case in root_node.xpath('//testcase'):
|
||||
test_result = 'pass'
|
||||
if test_case.find('failure') is not None:
|
||||
test_result = 'fail'
|
||||
if test_case.find('skipped') is not None:
|
||||
test_result = 'skip'
|
||||
report.test_stats[test_result] += 1
|
||||
if test_result == 'fail':
|
||||
success = False
|
||||
failure = test_case.find('failure')
|
||||
test_result = {
|
||||
'name': test_case.attrib['name'],
|
||||
'namespace': test_case.attrib['classname'],
|
||||
'result': test_result,
|
||||
'duration': float(test_case.attrib['time']),
|
||||
'details': failure.text
|
||||
}
|
||||
report.unit.append(test_result)
|
||||
|
||||
msg = f'{report.test_stats["pass"]} tests passed, {report.test_stats["fail"]} failed and ' \
|
||||
f'{report.test_stats["skip"]} were skipped.\n'
|
||||
if not success:
|
||||
msg = f'{report.test_stats["pass"]} tests passed, {report.test_stats["fail"]} failed and ' \
|
||||
f'{report.test_stats["skip"]} were skipped.\n'
|
||||
if not success:
|
||||
step.success = False
|
||||
for test_case in report.unit:
|
||||
if test_case['result'] == 'fail':
|
||||
msg += f'{test_case["namespace"]}/{test_case["name"]}\n'
|
||||
except Exception as e:
|
||||
logging.error(e)
|
||||
step.messages.append('Parsing of test results failed')
|
||||
step.success = False
|
||||
for test_case in report.unit:
|
||||
if test_case['result'] == 'fail':
|
||||
msg += f'{test_case["namespace"]}/{test_case["name"]}\n'
|
||||
|
||||
logging.debug(f'report: {report}')
|
||||
logging.debug(f'step: {step}')
|
||||
|
||||
|
|
Loading…
Reference in a new issue