Skip to content

Commit 0736e75

Browse files
first commit
0 parents  commit 0736e75

33 files changed

+3589
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
test-queue
2+
taxicab
3+
test-taxicab
4+
bmark-taxicab
5+
build/
6+
output/

Dockerfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
FROM ubuntu:20.04
2+
3+
ARG X_USER=docker
4+
ARG X_UID=1000
5+
ARG X_GID=1000
6+
ARG X_PASSWORD=1234
7+
8+
ENV TZ=Europe/Istanbul
9+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
10+
&& echo $TZ > /etc/timezone
11+
12+
RUN apt-get update && apt-get install -y \
13+
sudo \
14+
build-essential \
15+
software-properties-common \
16+
xz-utils \
17+
wget \
18+
curl \
19+
git \
20+
cmake
21+
22+
# install g++-10
23+
RUN g++ --version \
24+
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
25+
&& apt-get update \
26+
&& apt-get install -y gcc-10 g++-10
27+
RUN g++-10 --version
28+
29+
# install clang-10
30+
# https://apt.llvm.org/
31+
RUN wget https://apt.llvm.org/llvm.sh \
32+
&& chmod +x llvm.sh \
33+
&& ./llvm.sh 10
34+
RUN clang-10 --version
35+
36+
# install Google Test
37+
RUN git clone https://github.com/google/googletest.git /google-test \
38+
&& mkdir -p /google-test/build \
39+
&& cd /google-test/build \
40+
&& cmake .. && make && make install \
41+
&& cd / && rm -rf /google-test
42+
43+
# install Google Benchmark
44+
RUN git clone https://github.com/google/benchmark.git /google-benchmark \
45+
&& git clone https://github.com/google/googletest.git /google-benchmark/googletest \
46+
&& mkdir -p /google-benchmark/build \
47+
&& cd /google-benchmark/build \
48+
&& cmake .. && make && make install \
49+
&& cd / && rm -rf /google-benchmark
50+
51+
# add user so that directories created in container's volume have the correct owner
52+
RUN useradd -m ${X_USER} --uid=${X_UID} \
53+
&& echo "${X_USER}:${X_PASSWORD}" | chpasswd \
54+
&& adduser ${X_USER} sudo
55+
56+
USER ${X_UID}:${X_GID}
57+
WORKDIR /home/${X_USER}
58+
59+
CMD ["/bin/bash"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Orhan Kupusoglu
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)