CI: add fedora build via docker run. (#199)

This commit is contained in:
Franck HOUSSEN
2019-03-10 22:28:52 +01:00
committed by Sylvestre Ledru
parent a26b727bc4
commit f670e731b7
3 changed files with 42 additions and 2 deletions
+37 -1
View File
@@ -32,6 +32,7 @@ stages:
- name: xenial
- name: coverage
- name: interface64
- name: fedora
jobs:
include:
@@ -109,7 +110,6 @@ jobs:
head -n 50 coveralls.log && tail -n 50 coveralls.log \
&& \
head -n 50 coveralls.json && tail -n 50 coveralls.json
# xenial <=> interface64: "recent" systems with ICB + MKL + ILP64 (need debian/testing to get MKL-ILP64)
# note: when you PR, docker-cp provides, in the container, the branch associated with the PR (not master where there's nothing new)
# 1. docker create --name mobydick IMAGE CMD <=> create a container (= instance of image) but container is NOT yet started
@@ -158,6 +158,42 @@ jobs:
sudo docker cp -a ${TRAVIS_BUILD_DIR} mobydick:/tmp \
&& \
sudo docker start -a mobydick
# fedora
# note: when you PR, docker-cp provides, in the container, the branch associated with the PR (not master where there's nothing new)
# 1. docker create --name mobydick IMAGE CMD <=> create a container (= instance of image) but container is NOT yet started
# 2. docker cp -a ${TRAVIS_BUILD_DIR} mobydick:/tmp <=> copy git repository (CI worker, checkout-ed on PR branch) into the container
# note: docker-cp works only if copy from/to containers (not images)
# 3. docker start -a mobydick <=> start to run the container (initialized with docker-cp)
- stage: fedora
dist: xenial
script: |
sudo docker pull fedora \
&& \
sudo docker create --name mobydick fedora /bin/bash -c \
"yum -y update && \
yum -y upgrade && \
yum -y groupinstall \"Development Tools\" \"Development Libraries\" && \
yum -y install environment-modules && \
yum -y install gcc gcc-c++ gcc-gfortran git cmake make && \
yum -y install openmpi openmpi-devel openblas openblas-devel && \
. /etc/profile.d/modules.sh && \
module avail && \
module load mpi/openmpi-x86_64 && \
cd /tmp && \
cd arpack-ng && \
git status && \
git log -2 && \
sed -e 's/mpirun /mpirun --allow-run-as-root --oversubscribe /' -i CMakeLists.txt && \
mkdir -p build && cd build && \
cmake -DEXAMPLES=ON -DMPI=ON -DICB=ON .. && \
export VERBOSE=1 && \
make all && \
make test && \
tail -n 300 ./Testing/Temporary/LastTest.log" \
&& \
sudo docker cp -a ${TRAVIS_BUILD_DIR} mobydick:/tmp \
&& \
sudo docker start -a mobydick
after_failure:
+2 -1
View File
@@ -51,7 +51,7 @@ function(examples list_name)
get_filename_component(lwe ${l} NAME_WE)
add_executable(${lwe} ${arpackexample_DIR}/${l} ${examples_EXTRA_SRCS})
target_link_libraries(${lwe} arpack ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${EXTRA_LDLAGS})
add_test(NAME "${lwe}_ex" COMMAND ${lwe} WORKING_DIRECTORY ${arpackexample_DIR})
add_test(NAME "${lwe}_ex" COMMAND ${lwe} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endforeach()
endfunction(examples)
@@ -60,6 +60,7 @@ function(pexamples list_name)
get_filename_component(lwe ${l} NAME_WE)
add_executable(${lwe} ${parpackexample_DIR}/${l} )
target_link_libraries(${lwe} parpack arpack ${MPI_Fortran_LIBRARIES})
add_test(NAME "${lwe}_ex" COMMAND mpirun -n 2 ${lwe} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endforeach()
endfunction(pexamples)
+3
View File
@@ -296,6 +296,9 @@ CFLAGS : $CFLAGS
CXX : $CXX
CXXFLAGS : $CXXFLAGS
CPPFLAGS : $CPPFLAGS
MPI_Fortran_LIBS : $MPI_Fortran_LIBS
MPI_C_LIBS : $MPI_C_LIBS
MPI_CXX_LIBS : $MPI_CXX_LIBS
BLAS : $BLAS_LIBS
LAPACK : $LAPACK_LIBS
EIGEN : $EIGEN3_CFLAGS