Skip to content
Snippets Groups Projects
Commit f9542432 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

workaround ld library path on centos7

parent 07c89cbb
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,9 @@ ADD build.sh build.py /
ADD dist/${DIST}.sh /dist.sh
RUN bash /dist.sh
ARG PARALLEL=1
ENV CTEST_PARALLEL_LEVEL=${PARALLEL}
ADD https://api.github.com/repos/nim65s/eigenpy/commits/topic/multipy2 /
RUN /build.sh eigenpy
......
......@@ -4,21 +4,26 @@ Build all Dockerfiles and check the build result
"""
import asyncio
from asyncio.subprocess import PIPE, DEVNULL
import sys
from asyncio.subprocess import DEVNULL, PIPE
DISTRIBUTIONS = '16.04 18.04 20.04 fedora28 fedora31 archlinux stretch buster centos7'.split()
async def build_run(dist):
async def build_run(dist, verbose=False, parallel=1):
"""Build and run a dockerfile."""
cmd = f'docker build --build-arg DIST={dist} -t all/{dist} .'.split()
proc = await asyncio.create_subprocess_exec(*cmd, stdout=DEVNULL, stderr=DEVNULL)
cmd = f'docker build --build-arg DIST={dist} --build-arg PARALLEL={parallel} -t all/{dist} .'
if verbose:
print(f'+ {cmd}\r')
proc = await asyncio.create_subprocess_exec(*cmd.split(), stdout=DEVNULL, stderr=DEVNULL)
await proc.wait()
if proc.returncode != 0:
print(f'{dist:10} build failed\r')
return
cmd = f'docker run --rm -it all/{dist}'.split()
proc = await asyncio.create_subprocess_exec(*cmd, stdout=PIPE, stderr=DEVNULL)
cmd = f'docker run --rm -it all/{dist}'
if verbose:
print(f'+ {cmd}\r')
proc = await asyncio.create_subprocess_exec(*cmd.split(), stdout=PIPE, stderr=DEVNULL)
stdout, _ = await proc.communicate()
stdout = stdout.decode().replace('\r\n', ' ')
if proc.returncode == 0:
......@@ -29,5 +34,8 @@ async def build_run(dist):
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.gather(*(build_run(dist) for dist in DISTRIBUTIONS)))
if len(sys.argv) > 1:
loop.run_until_complete(build_run(sys.argv[1], verbose=True, parallel=8))
else:
loop.run_until_complete(asyncio.gather(*(build_run(dist) for dist in DISTRIBUTIONS)))
loop.close()
......@@ -3,7 +3,6 @@
source /dist
export PROJECT=$1
export CTEST_PARALLEL_LEVEL=${2:-1}
DO_TEST=true
if [ "$PROJECT" = "hpp-fcl" ]
......
#!/bin/bash -eux
BOOST_VERSION="1_72_0"
BOOST_VERSION="1_74_0"
yum install -q -y which wget
yum erase -q -y boost-libs boost-devel boost-python36-devel python2-numpy numpy
......
......@@ -5,6 +5,9 @@ source /dist
if [ "$DIST" = "archlinux" ]
then echo /opt/openrobots/lib/python2.7/site-packages/ > /usr/lib/python2.7/site-packages/robotpkg.pth
fi
if [ "$DIST" = "centos7" ]
then export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}
fi
if [ "$DIST" != "20.04" ]
then python2 /run.py
......
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