Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
install rapidjson from sources
Browse files Browse the repository at this point in the history
leave package installation in one OS (old Ubuntu - 19.10). It is needed, because
rapidjson release package has a bug, which blocks pmemkv's compilation with C++20.
  • Loading branch information
lukaszstolarczuk committed May 26, 2020
1 parent 777307d commit b1e39e3
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/gha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
strategy:
matrix:
CONFIG: ["TYPE=normal OS=fedora OS_VER=32",
"TYPE=normal OS=ubuntu OS_VER=19.10",
"TYPE=normal OS=ubuntu OS_VER=20.04",
"TYPE=normal OS=ubuntu OS_VER=20.04 COVERAGE=1",
"TYPE=valgrind OS=ubuntu OS_VER=20.04",
Expand Down
1 change: 1 addition & 0 deletions travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
- DOCKERHUB_REPO=pmem/pmemkv
matrix:
- TYPE=normal OS=fedora OS_VER=32
- TYPE=normal OS=ubuntu OS_VER=19.10
- TYPE=normal OS=ubuntu OS_VER=20.04
- TYPE=normal OS=ubuntu OS_VER=20.04 COVERAGE=1
- TYPE=valgrind OS=ubuntu OS_VER=20.04
Expand Down
5 changes: 4 additions & 1 deletion utils/docker/images/Dockerfile.fedora-32
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ RUN dnf update -y \
pandoc \
passwd \
perl-Text-Diff \
rapidjson-devel \
rpm-build \
sudo \
tbb-devel \
Expand All @@ -58,6 +57,10 @@ RUN dnf update -y \
# Install glibc-debuginfo
RUN dnf debuginfo-install -y glibc

# Install rapidjson from sources
COPY install-rapidjson.sh install-rapidjson.sh
RUN ./install-rapidjson.sh

# Install valgrind
COPY install-valgrind.sh install-valgrind.sh
RUN ./install-valgrind.sh
Expand Down
76 changes: 76 additions & 0 deletions utils/docker/images/Dockerfile.ubuntu-19.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2020, Intel Corporation

#
# Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based
# environment prepared for running pmemkv build and tests.
#

# Pull base image
FROM ubuntu:19.10
MAINTAINER [email protected]

# Set required environment variables
ENV OS ubuntu
ENV OS_VER 19.10
ENV PACKAGE_MANAGER deb
ENV NOTTY 1

# Additional parameters to build docker without building components
ARG SKIP_VALGRIND_BUILD
ARG SKIP_PMDK_BUILD
ARG SKIP_LIBPMEMOBJCPP_BUILD

# Update the Apt cache and install basic tools
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
autoconf \
automake \
build-essential \
clang \
clang-format-9 \
cmake \
curl \
debhelper \
devscripts \
doxygen \
fakeroot \
git \
graphviz \
libc6-dbg \
libdaxctl-dev \
libndctl-dev \
libmemkind-dev \
libnode-dev \
libnuma-dev \
libtbb-dev \
libtext-diff-perl \
libtool \
libunwind8-dev \
numactl \
pandoc \
pkg-config \
rapidjson-dev \
ruby \
sudo \
wget \
whois \
&& rm -rf /var/lib/apt/lists/*

# Install valgrind
COPY install-valgrind.sh install-valgrind.sh
RUN ./install-valgrind.sh

# Install pmdk
COPY install-pmdk.sh install-pmdk.sh
RUN ./install-pmdk.sh dpkg

# Install pmdk c++ bindings
COPY install-libpmemobj-cpp.sh install-libpmemobj-cpp.sh
RUN ./install-libpmemobj-cpp.sh DEB

# Add user
ENV USER user
ENV USERPASS pass
RUN useradd -m $USER -g sudo -p `mkpasswd $USERPASS`
USER $USER
5 changes: 4 additions & 1 deletion utils/docker/images/Dockerfile.ubuntu-20.04
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
numactl \
pandoc \
pkg-config \
rapidjson-dev \
ruby \
sudo \
wget \
whois \
&& rm -rf /var/lib/apt/lists/*

# Install rapidjson from sources
COPY install-rapidjson.sh install-rapidjson.sh
RUN ./install-rapidjson.sh

# Install valgrind
COPY install-valgrind.sh install-valgrind.sh
RUN ./install-valgrind.sh
Expand Down
5 changes: 4 additions & 1 deletion utils/docker/images/Dockerfile.ubuntu-20.04_bindings
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,16 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-dev \
python3-distutils \
python3-pip \
rapidjson-dev \
ruby-dev \
sudo \
wget \
whois \
&& rm -rf /var/lib/apt/lists/*

# Install rapidjson from sources
COPY install-rapidjson.sh install-rapidjson.sh
RUN ./install-rapidjson.sh

# Install valgrind
COPY install-valgrind.sh install-valgrind.sh
RUN ./install-valgrind.sh
Expand Down
23 changes: 23 additions & 0 deletions utils/docker/images/install-rapidjson.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2020, Intel Corporation

#
# install-rapidjson.sh - installs rapidjson from sources
#

set -e

git clone https://github.com/Tencent/rapidjson
cd rapidjson
# master: Merge pull request #1720 from madeso/master, 18.05.2020
git checkout 1a803826f1197b5e30703afe4b9c0e7dd48074f5

mkdir build
cd build
cmake ..
make -j$(nproc)
sudo make -j$(nproc) install

cd ../..
rm -r rapidjson

0 comments on commit b1e39e3

Please sign in to comment.