-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
66 lines (52 loc) · 1.88 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM korostinskiyr/compiler_performance_testing:manual
WORKDIR /home
# copy script and all required files
COPY . /home/compiler-performance-testing
# install required packages for running llvm-test-suite
RUN apt-get update && \
apt-get install -y python3 && \
apt-get -y install python3-pip && \
apt-get install python-is-python3 && \
apt-get -y install git
# install required python packages
RUN pip3 install paramiko && \
pip3 install virtualenv
# install lnt
RUN mkdir -p /home/lnt-venv && \
virtualenv /home/lnt-venv && \
git clone https://github.com/llvm/llvm-lnt.git /home/lnt && \
~/lnt-venv/bin/python ~/lnt/setup.py develop
# clone and set llvm-test-suite
RUN git clone https://github.com/llvm/llvm-test-suite.git test-suite
COPY ./docker-settings/lit.cfg /home/test-suite/
# install cmake, ninja and rsync
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -y install ninja-build && \
apt-get -y install cmake && \
apt-get install -y rsync
# install clang and gcc
RUN apt-get update && \
apt-get -y install clang && \
apt-get -y install gcc-aarch64-linux-gnu && \
apt-get -y install g++-aarch64-linux-gnu
# clone OpenArkCompiler
RUN git clone https://gitee.com/openarkcompiler/OpenArkCompiler
# install packages for OpenArkCompiler
RUN apt-get update && \
apt-get -y install wget && \
apt-get -y install unzip && \
apt-get install -y lsb-release && \
apt install -y libtinfo5
# build OpenArkCompiler
WORKDIR /home/OpenArkCompiler
RUN ["/bin/bash", "-c", "source build/envsetup.sh arm release && make setup"]
RUN ["/bin/bash", "-c", "source build/envsetup.sh arm release && make"]
WORKDIR /home
# generate SSH key pair
RUN apt-get update && \
apt-get install sshpass
RUN ["/bin/bash", "-c", "ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa <<<y >/dev/null 2>&1"]
#execute script
WORKDIR /home/compiler-performance-testing/docker-settings
ENTRYPOINT ["./docker-script.py"]