This repository has been archived by the owner on Aug 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
69 lines (52 loc) · 1.89 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
67
68
69
FROM ubuntu:focal AS builder
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update
RUN apt-get -qq install -y make cmake git libstdc++-10-dev g++-10 clang-11
RUN apt-get -qq install -y python3-pip python3-setuptools python3-wheel
# uuid-dev pkg-config openjdk-11-jdk
# setup conan
RUN pip3 install conan
RUN conan user && \
conan profile new --detect default && \
conan profile update settings.compiler.libcxx=libstdc++11 default && \
conan profile update settings.compiler.version=10 default && \
conan profile new --detect clang11 && \
conan profile update settings.compiler=clang clang11 &&\
conan profile update settings.compiler.version=11 clang11 && \
conan profile update settings.compiler.libcxx=libstdc++11 clang11
RUN conan remote add dice "https://conan.dice-research.org/artifactory/api/conan/tentris"
WORKDIR /rdf-parser
COPY CMakeLists.txt CMakeLists.txt
COPY tests tests
COPY include include
COPY cmake cmake
COPY conanfile.py conanfile.py
#gcc
WORKDIR /rdf-parser/build_gcc
ENV CXX="g++-10"
ENV CC="gcc10"
RUN conan install .. --build=missing -o rdf-parser:with_tests=True
## change working directory
WORKDIR /rdf-parser/build_gcc
#
# run cmake
RUN CC=gcc-10 CXX=g++-10 cmake -DCMAKE_BUILD_TYPE=Release -DRDF_PARSER_BUILD_TESTS=ON ..
# build
RUN make -j $(nproc)
#for clang
## change working directory
WORKDIR /rdf-parser/build_clang
ENV CXX="clang++-11"
ENV CC="clang-11"
RUN conan install .. --build=missing --profile clang11 -o rdf-parser:with_tests=True
# run cmake
RUN CC=clang-11 CXX=clang++-11 cmake -DCMAKE_BUILD_TYPE=Release -DRDF_PARSER_BUILD_TESTS=ON ..
# build
RUN make -j $(nproc)
WORKDIR /rdf-parser/build_clang
RUN ./bin/tests
WORKDIR /rdf-parser/build_gcc
RUN ./bin/tests
WORKDIR /rdf-parser/
#RUN conan create . "rdf-parser/test1@dice-group/stable" --build missing
#RUN conan create . "rdf-parser/test2dice-group/stable" --build missing --profile clang11