Skip to content

Commit

Permalink
common: build and install package on travis
Browse files Browse the repository at this point in the history
  • Loading branch information
igchor committed Jun 15, 2018
1 parent 37897b5 commit 2871bcf
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 11 deletions.
1 change: 1 addition & 0 deletions utils/docker/images/Dockerfile.fedora-25
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ RUN dnf update -y \
SFML-devel \
sudo \
tar \
wget \
which \
&& dnf clean all

Expand Down
3 changes: 2 additions & 1 deletion utils/docker/images/Dockerfile.ubuntu-16.04
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ RUN apt-get update \
pkg-config \
# SFML-2.4 (not available in ubuntu 16.04)
sudo \
wget \
whois \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -82,5 +83,5 @@ USER $USER
# Set required environment variables
ENV OS ubuntu
ENV OS_VER 16.04
ENV PACKAGE_MANAGER dpkg
ENV PACKAGE_MANAGER deb
ENV NOTTY 1
22 changes: 13 additions & 9 deletions utils/docker/images/install-pmdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,20 @@

set -e

git clone https://github.com/pmem/pmdk.git
cd pmdk
git checkout stable-1.4
BUILD_PACKAGE_CHECK=n make $1
mkdir pkgs
cd pkgs

if [ "$1" = "dpkg" ]; then
sudo dpkg -i dpkg/libpmem_*.deb dpkg/libpmem-dev_*.deb
sudo dpkg -i dpkg/libpmemobj_*.deb dpkg/libpmemobj-dev_*.deb
wget https://github.com/pmem/pmdk/releases/download/1.4/pmdk-1.4-dpkgs.tar.gz
tar -xzf pmdk-1.4-dpkgs.tar.gz
sudo dpkg -i libpmem_*.deb libpmem-dev_*.deb
sudo dpkg -i libpmemobj_*.deb libpmemobj-dev_*.deb
elif [ "$1" = "rpm" ]; then
sudo rpm -i rpm/*/libpmem-*.rpm
sudo rpm -i rpm/*/libpmemobj-*.rpm
wget https://github.com/pmem/pmdk/releases/download/1.4/pmdk-1.4-rpms.tar.gz
tar -xzf pmdk-1.4-rpms.tar.gz
sudo rpm -i x86_64/libpmem-*.rpm
sudo rpm -i x86_64/libpmemobj-*.rpm
fi

cd ..
rm -rf pmdk
rm -r pkgs
21 changes: 20 additions & 1 deletion utils/docker/run-build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright 2016-2017, Intel Corporation
# Copyright 2016-2018, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -111,4 +111,23 @@ make install
cd ..
rm -r build

mkdir build
cd build

cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
-DCPACK_GENERATOR=$PACKAGE_MANAGER

make -j2 package

if [ $PACKAGE_MANAGER = "deb" ]; then
echo $USERPASS | sudo -S dpkg -i libpmemobj++*.deb
elif [ $PACKAGE_MANAGER = "rpm" ]; then
echo $USERPASS | sudo -S rpm -i libpmemobj++*.rpm
fi

#XXX: verify installed package - try to compile some program/example

cd ..
rm -rf build

rm -r $INSTALL_DIR

0 comments on commit 2871bcf

Please sign in to comment.