Skip to content
Snippets Groups Projects
Commit 71ab7e41 authored by Izzard, Robert Dr (Maths & Physics)'s avatar Izzard, Robert Dr (Maths & Physics)
Browse files

Merge branch 'master' of gitlab.eps.surrey.ac.uk:ri0005/binary_c

parents 4fa7b4b5 479ac27e
No related branches found
No related tags found
No related merge requests found
# Dockerfile for binary_c (2.1.4) and binary_grid2 (2.1.4) # Dockerfile for binary_c (2.1.5) and binary_grid2 (2.1.5)
# based on Ubuntu 18.04 # based on Ubuntu 18.04
FROM ubuntu:18.04 FROM ubuntu:18.04
...@@ -25,7 +25,8 @@ RUN apt-get -y --no-install-recommends install valgrind ...@@ -25,7 +25,8 @@ RUN apt-get -y --no-install-recommends install valgrind
RUN apt-get -y --no-install-recommends install git RUN apt-get -y --no-install-recommends install git
RUN apt-get -y --no-install-recommends install libgsl-dev RUN apt-get -y --no-install-recommends install libgsl-dev
RUN apt-get -y --no-install-recommends install libbsd-dev RUN apt-get -y --no-install-recommends install libbsd-dev
RUN apt-get -y --no-install-recommends install binutils-dev RUN apt-get -y --no-install-recommends install binutils-dev
RUN apt-get -y --no-install-recommends install libiberty-dev
RUN apt-get -y --no-install-recommends install unzip RUN apt-get -y --no-install-recommends install unzip
RUN apt-get -y --no-install-recommends install tar RUN apt-get -y --no-install-recommends install tar
RUN apt-get -y --no-install-recommends install file RUN apt-get -y --no-install-recommends install file
...@@ -44,7 +45,9 @@ RUN apt-get -y --no-install-recommends install meson ...@@ -44,7 +45,9 @@ RUN apt-get -y --no-install-recommends install meson
RUN apt-get -y --no-install-recommends install ninja-build RUN apt-get -y --no-install-recommends install ninja-build
RUN pip3 install wheel RUN pip3 install wheel
RUN pip3 install meson RUN pip3 install meson
RUN pip3 install ninja RUN pip3 install 'ninja'
#RUN pip3 install 'ninja==1.8.2'
############################################################ ############################################################
# apt cleanup # apt cleanup
...@@ -173,12 +176,7 @@ COPY --chown=binary_c ./binary_c_master /home/binary_c/progs/stars/binary_c ...@@ -173,12 +176,7 @@ COPY --chown=binary_c ./binary_c_master /home/binary_c/progs/stars/binary_c
WORKDIR /home/binary_c/progs/stars/binary_c WORKDIR /home/binary_c/progs/stars/binary_c
###### old configure/make # meson/ninja
#RUN export LD_LIBRARY_PATH=$HOME/lib LIBRARY_PATH=$HOME/lib && wc -c LICENCE |gawk "{print \$1}" > .lread && ./configure generic
#RUN export LD_LIBRARY_PATH=$HOME/lib LIBRARY_PATH=$HOME/lib && ./make
#RUN export LD_LIBRARY_PATH=$HOME/lib LIBRARY_PATH=$HOME/lib && ./make libbinary_c.so || true
###### new meson/ninja
RUN export LD_LIBRARY_PATH=$HOME/lib LIBRARY_PATH=$HOME/lib && wc -c LICENCE |gawk "{print \$1}" > .lread RUN export LD_LIBRARY_PATH=$HOME/lib LIBRARY_PATH=$HOME/lib && wc -c LICENCE |gawk "{print \$1}" > .lread
RUN export LD_LIBRARY_PATH=$HOME/lib LIBRARY_PATH=$HOME/lib && meson builddir -Dgeneric=true --buildtype release RUN export LD_LIBRARY_PATH=$HOME/lib LIBRARY_PATH=$HOME/lib && meson builddir -Dgeneric=true --buildtype release
WORKDIR /home/binary_c/progs/stars/binary_c/builddir WORKDIR /home/binary_c/progs/stars/binary_c/builddir
...@@ -212,7 +210,7 @@ RUN cpanm Sort::Key ...@@ -212,7 +210,7 @@ RUN cpanm Sort::Key
RUN perl ./install_all.pl RUN perl ./install_all.pl
RUN cpanm Proc::ProcessTable RUN cpanm Proc::ProcessTable
RUN cpanm Cpanel::JSON::XS RUN cpanm Cpanel::JSON::XS
RUN cpanm -v ./binary_grid-v2.1.4.tar.gz RUN cpanm -v ./binary_grid-v2.1.5.tar.gz
############################################################ ############################################################
# cleanup: cpanm and build directories # cleanup: cpanm and build directories
......
This diff is collapsed.
...@@ -9,10 +9,13 @@ ...@@ -9,10 +9,13 @@
# initial working directory # initial working directory
WD=$PWD WD=$PWD
echo "binary_c docker build script"
# set cache date to 'date ...' for a unique (non-cached build) # set cache date to 'date ...' for a unique (non-cached build)
CACHE_DATE=$(date +%Y-%m-%d:%H:%M:%S) # default CACHE_DATE=$(date +%Y-%m-%d:%H:%M:%S) # default
# or today to use the cache # or today to use the cache
#CACHE_DATE=today #CACHE_DATE=today
echo "CACHE_DATE=$CACHE_DATE"
# which git branch do we want? # which git branch do we want?
GIT_BRANCH=master # default GIT_BRANCH=master # default
...@@ -21,6 +24,7 @@ GIT_BRANCH=master # default ...@@ -21,6 +24,7 @@ GIT_BRANCH=master # default
# TMPDIR is our temporary space : usually mktemp is good enough # TMPDIR is our temporary space : usually mktemp is good enough
# but you may want to change this location manually # but you may want to change this location manually
TMPDIR=$(mktemp -d -t ci-XXXXXXXXXX) # default TMPDIR=$(mktemp -d -t ci-XXXXXXXXXX) # default
echo "TMPDIR=$TMPDIR"
############################################################ ############################################################
# get binary_c version string # get binary_c version string
...@@ -41,6 +45,7 @@ echo "TMPDIR is $TMPDIR" ...@@ -41,6 +45,7 @@ echo "TMPDIR is $TMPDIR"
# git clone binary_c (master) to $TMP, but only a # git clone binary_c (master) to $TMP, but only a
# depth=1 "shallow clone" # depth=1 "shallow clone"
git clone --depth 1 --branch $GIT_BRANCH gitlab@gitlab.eps.surrey.ac.uk:ri0005/binary_c.git git clone --depth 1 --branch $GIT_BRANCH gitlab@gitlab.eps.surrey.ac.uk:ri0005/binary_c.git
echo "Git cloned"
############################################################ ############################################################
# bind the temporary directory, $TMP/binary_c, here using # bind the temporary directory, $TMP/binary_c, here using
...@@ -48,22 +53,27 @@ git clone --depth 1 --branch $GIT_BRANCH gitlab@gitlab.eps.surrey.ac.uk:ri0005/b ...@@ -48,22 +53,27 @@ git clone --depth 1 --branch $GIT_BRANCH gitlab@gitlab.eps.surrey.ac.uk:ri0005/b
# see/use it # see/use it
############################################################ ############################################################
cd $WD cd $WD
echo "bindfs git master"
mkdir -p ./binary_c_master mkdir -p ./binary_c_master
bindfs --no-allow-other $TMPDIR/binary_c ./binary_c_master bindfs --no-allow-other $TMPDIR/binary_c ./binary_c_master
echo "bindfs done"
############################################################ ############################################################
# merge docker lines to reduce image size # merge docker lines to reduce image size
############################################################ ############################################################
merge.pl Dockerfile > Dockerfile.merged merge.pl Dockerfile > Dockerfile.merged
echo "Merged Dockerfile"
############################################################ ############################################################
# build docker container (this takes a while...) # build docker container (this takes a while...)
############################################################ ############################################################
echo "Call docker for build"
docker --log-level=debug build --build-arg CACHE_DATE=$CACHE_DATE -t binary_c -f Dockerfile.merged . |& tee build.log docker --log-level=debug build --build-arg CACHE_DATE=$CACHE_DATE -t binary_c -f Dockerfile.merged . |& tee build.log
############################################################ ############################################################
# unbind binary_c git master # unbind binary_c git master
############################################################ ############################################################
echo "fusermount binary_c git master"
fusermount -u ./binary_c_master fusermount -u ./binary_c_master
rmdir binary_c_master rmdir binary_c_master
......
...@@ -1000,7 +1000,9 @@ binary_c_executable = executable( ...@@ -1000,7 +1000,9 @@ binary_c_executable = executable(
quoted_cflags_list, quoted_cflags_list,
executable_build_flags, executable_build_flags,
], ],
objects : data_objects, objects : [
data_objects,
],
link_args : [ link_args : [
libs, libs,
], ],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment