Skip to content

Commit

Permalink
nlopt
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Nov 15, 2024
1 parent 1ad45e0 commit 3798249
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
20 changes: 3 additions & 17 deletions archlinux-python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,11 @@ MAINTAINER jschueller

WORKDIR /tmp

RUN sudo pacman -Syu swig lapack libxml2 mold ceres-solver nlopt boost eigen --noconfirm


RUN sudo pacman -Syu swig python-numpy --noconfirm
RUN sudo pacman -Syu perl perl-capture-tiny perl-datetime perl-devel-cover perl-memory-process perl-gd perl-json-xs --noconfirm
RUN git clone --depth 150 https://github.com/linux-test-project/lcov.git && cd lcov && sudo make PREFIX="/usr" CFG_DIR=/etc install
RUN genhtml --version

RUN git clone --depth 1 https://github.com/openturns/openturns.git
RUN cd openturns && cmake -DCMAKE_INSTALL_PREFIX=~/.local \
-DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=32 \
-DCMAKE_C_FLAGS="--coverage" -DCMAKE_CXX_FLAGS="--coverage -fuse-ld=mold" \
-DSWIG_COMPILE_FLAGS="-O1" -DUSE_TBB=OFF .
RUN cd openturns && make OT -j16 && make install -j12
RUN cd openturns && ctest -E "cppcheck|Factory" -R "Distribution" --output-on-failure -j12 --repeat after-timeout:2 --schedule-random
RUN cd openturns && gcov `find lib/src/ -name "*.gcno"`
RUN echo "gcov OK"
RUN cd openturns && lcov --capture --directory . --output-file coverage.info --include "*_wrap.cxx"
#--exclude "*_wrap.cxx"
RUN echo "lcov OK"
RUN cd openturns && ulimit -Sv 10000000 && genhtml --profile --output-directory coverage coverage.info
RUN echo "genhtml OK"
ADD run.sh /tmp
RUN /tmp/run.sh

19 changes: 19 additions & 0 deletions archlinux-python/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh
set -xe
cd /tmp
rm -rf nlopt
git clone --depth 1 https://github.com/stevengj/nlopt.git
cd nlopt
cmake -DCMAKE_INSTALL_PREFIX=$PWD/install \
-DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=32 \
-DCMAKE_C_FLAGS="--coverage" -DCMAKE_CXX_FLAGS="--coverage" \
-DSWIG_COMPILE_FLAGS="-O1" -DNLOPT_TESTS=ON -DNLOPT_GUILE=OFF -DNLOPT_OCTAVE=OFF .
make install -j8
ctest -R "memoize|python" --output-on-failure -j12 --repeat after-timeout:2 --schedule-random
gcov `find src/ -name "*.gcno"`
echo "gcov OK"
lcov --capture --directory . --output-file coverage.info --include "*_wrap.cxx"
echo "lcov OK"
ulimit -Sv 100000
genhtml --profile --output-directory coverage coverage.info
echo "genhtml OK"

0 comments on commit 3798249

Please sign in to comment.