CI based on GitHub Actions only (#317)

This commit is contained in:
Dima Pasechnik
2021-09-29 09:57:06 +02:00
committed by GitHub
parent 0a655d918d
commit 5c28eac0b3
6 changed files with 250 additions and 303 deletions
+218
View File
@@ -0,0 +1,218 @@
name: arpack-ng
on: [push]
jobs:
ubuntu_latest_cmake:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: sudo apt-get update
- name: Install apt-get dependencies
run: sudo apt-get install -y gfortran gcc g++ openmpi-bin libopenmpi-dev libblas-dev liblapack-dev cmake
- name: Run job
run: |
mkdir build
cd build
cmake -DEXAMPLES=ON -DMPI=ON -DICB=ON ..
make all
make test
make package_source
ubuntu_latest_autotools:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: sudo apt-get update
- name: Install apt-get dependencies
run: sudo apt-get install -y gfortran gcc g++ openmpi-bin libopenmpi-dev libblas-dev liblapack-dev automake autoconf pkg-config libtool
- name: Run job
run: |
./bootstrap
./configure --enable-mpi --enable-icb
make all
make check
make distcheck
ubuntu_latest_cmake_python:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: sudo apt-get update
- name: Install apt-get dependencies
run: sudo apt-get install -y gfortran gcc g++ openmpi-bin libopenmpi-dev libblas-dev liblapack-dev cmake libeigen3-dev
- name: Install python dependencies
run: sudo apt-get -y install python3-minimal python3-pip python3-numpy
- name: Build boost-python for python3 (not provided by apt-cache)
run : |
sudo apt-get -y install wget
wget https://sourceforge.net/projects/boost/files/boost/1.77.0/boost_1_77_0.tar.gz
tar -xf boost_1_77_0.tar.gz
cd boost_1_77_0
./bootstrap.sh --with-libraries=python --with-python=/usr/bin/python3 --with-toolset=gcc
sudo ./b2 toolset=gcc install
sudo apt-get install locate
sudo updatedb
- name: Run job
run: mkdir build; cd build; cmake -DEXAMPLES=ON -DMPI=ON -DICB=ON -DICBEXMM=ON -DPYTHON3=ON .. && make all test
ubuntu_latest_autotools_ilp64:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: sudo apt-get update
- name: Install apt-get dependencies
run: sudo apt-get install -y gfortran gcc g++ openmpi-bin libopenmpi-dev libblas-dev liblapack-dev automake autoconf pkg-config libtool libeigen3-dev
- name: Install Intel MKL (ILP64 blas/lapack)
run: echo yes | sudo apt-get -y install intel-mkl libmkl-dev
- name: Run job
run: |
./bootstrap
./configure --enable-mpi --enable-icb --with-blas=mkl_gf_ilp64 --with-lapack=mkl_gf_ilp64
make all
make check
env:
FFLAGS: "-DMKL_ILP64 -I/usr/include/mkl"
FCFLAGS: "-DMKL_ILP64 -I/usr/include/mkl"
LIBS: "-Wl,--no-as-needed -L/usr/lib/x86_64-linux-gnu -lmkl_sequential -lmkl_core -lpthread -lm -ldl"
INTERFACE64: "1"
ubuntu_latest_coverage:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: sudo apt-get update
- name: Install apt-get dependencies
run: sudo apt-get install -y gfortran gcc g++ openmpi-bin libopenmpi-dev libblas-dev liblapack-dev cmake
- name: Run job
run: |
mkdir build
cd build
cmake -DEXAMPLES=ON -DMPI=ON -DICB=ON -DCOVERALLS=ON ..
make all
make test
make coveralls
docker_centos:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: sudo apt-get update
- name: Login to Docker Hub
run: sudo docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_TOKEN }}"
- name: Run job
run: ./scripts/travis_centos.sh
docker_fedora:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: sudo apt-get update
- name: Login to Docker Hub
run: sudo docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_TOKEN }}"
- name: Run job
run: ./scripts/travis_fedora.sh setup mpich
docker_debian:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: sudo apt-get update
- name: Login to Docker Hub
run: sudo docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_TOKEN }}"
- name: Run job
run: ./scripts/travis_ubuntu.sh debian
macos_latest_cmake:
runs-on: macos-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: |
brew rm gcc
brew update
softwareupdate --install --all
- name: Install brew dependencies
run: |
brew list --formula -1 | while read line; do brew unlink $line; done
brew install gcc cmake mpich
brew list --formula -1 | while read line; do brew link --overwrite $line; done
- name: Run job
run: |
mkdir -p build
cd build
LIBS="-framework Accelerate" FFLAGS="-ff2c -fno-second-underscore" FCFLAGS="-ff2c -fno-second-underscore" cmake -DBLA_VENDOR=Generic -DEXAMPLES=ON -DICB=ON -DMPI=ON ..
make all
make test
macos_latest_autotools:
runs-on: macos-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: |
brew rm gcc
brew update
softwareupdate --install --all
- name: Install brew dependencies
run: |
brew list --formula -1 | while read line; do brew unlink $line; done
brew install gcc autoconf automake libtool pkg-config mpich
brew list --formula -1 | while read line; do brew link --overwrite $line; done
- name: Run job
run: |
./bootstrap
LIBS="-framework Accelerate" FFLAGS="-ff2c -fno-second-underscore" FCFLAGS="-ff2c -fno-second-underscore" ./configure --enable-icb --enable-mpi
make all
make check
windows_latest_cmake:
runs-on: windows-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: |
choco install -y msys2
choco upgrade --no-progress -y msys2
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -here -c \$\* -- pacman --sync --noconfirm mingw-w64-x86_64-toolchain
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -here -c \$\* -- pacman --sync --noconfirm mingw-w64-x86_64-cmake
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -here -c \$\* -- pacman --sync --noconfirm mingw-w64-x86_64-toolchain
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -here -c \$\* -- pacman --sync --noconfirm mingw-w64-x86_64-make
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -here -c \$\* -- pacman --sync --noconfirm mingw-w64-x86_64-ninja
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -here -c \$\* -- pacman --sync --noconfirm mingw-w64-x86_64-openblas
- name: Run job
run: |
echo "C:\\tools\\msys64\\mingw64\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
mkdir build
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -where build -c \$\* -- cmake -G 'Ninja' -DICB=ON .. # -DEXAMPLES=ON KO
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -where build -c \$\* -- ninja all
C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start -msys2 -mingw64 -full-path -where build -c \$\* -- ninja test
-281
View File
@@ -1,281 +0,0 @@
sudo: true
language: c
compiler:
- gcc
addons:
apt:
packages:
- gfortran
- gcc
- g++
- openmpi-bin
- libopenmpi-dev
- cmake
- automake
- autoconf
- pkg-config
- libtool
- libblas-dev
- liblapack-dev
- diffutils
- findutils
- libeigen3-dev
services:
- docker
stages:
# order stages
- name: osx
- name: opensuse
- name: centos
- name: fedora
- name: ubuntu_precise
- name: ubuntu_trusty
- name: ubuntu_xenial
- name: ubuntu_bionic
- name: ubuntu_eoan
- name: ubuntu_focal
- name: ubuntu_groovy
- name: coverage
- name: debian_interface64
jobs:
include:
# opensuse: "recent" systems with ICB
# 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: opensuse
dist: bionic
script: |
sudo docker pull opensuse/tumbleweed \
&& \
sudo docker create --security-opt seccomp:unconfined --name mobydick opensuse/tumbleweed /bin/bash -c \
"zypper install -y git gcc gcc-fortran gcc-c++ openmpi2-devel && \
zypper install -y cmake && \
zypper install -y blas-devel lapack-devel && \
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 PATH=/usr/lib64/mpi/gcc/openmpi2/bin:/usr/lib/mpi/gcc/openmpi2/bin/:$PATH && \
make all && make test" \
&& \
sudo docker cp -a ${TRAVIS_BUILD_DIR} mobydick:/tmp \
&& \
sudo docker start -a mobydick
# centos: "stable" systems with ICB and MPICH
- stage: centos
dist: bionic
script: ./scripts/travis_centos.sh :7
# centos: "latest" systems with ICB and MPICH
- stage: centos
dist: bionic
script: ./scripts/travis_centos.sh :latest
# fedora (released fedora with openmpi)
- stage: fedora
name: "Fedora latest with openmpi"
dist: bionic
script: ./scripts/travis_fedora.sh setup openmpi latest
# fedora (with gcc 10 and mpich)
- stage: fedora
name: "Fedora rawhide with mpich"
dist: bionic
script: ./scripts/travis_fedora.sh setup mpich rawhide
# osx
- stage: osx
os: osx
osx_image: xcode12
before_install:
- brew list --formula -1 | while read line; do brew unlink $line; done;
- brew list gcc || brew install gcc
- brew list autoconf || brew install autoconf
- brew list automake || brew install automake
- brew list mpich || brew install mpich
- brew list --formula -1 | while read line; do brew link --overwrite $line; done;
# full build and testing with Accelerate framework (xcode provides vecLib which stands for BLAS/LAPACK)
# note: -ff2c to convert fortran code to C, -fno-second-underscore to force underscoring of external symbols to link
script: |
./bootstrap && LIBS="-framework Accelerate" FFLAGS="-ff2c -fno-second-underscore" FCFLAGS="-ff2c -fno-second-underscore" ./configure --enable-icb --enable-mpi && make VERBOSE=1 && make check
- stage: osx
os: osx
osx_image: xcode12
before_install:
- brew list --formula -1 | while read line; do brew unlink $line; done;
- brew list gcc || brew install gcc@10
- brew list cmake || brew install cmake
- brew list lapack || brew install lapack
# note: mpich not working due to a cmake bug
- brew list open-mpi || brew install open-mpi
- brew list --formula -1 | while read line; do brew link --overwrite $line; done;
- export CC=gcc-10
- export CXX=g++-10
- mpicc -show
# full build and testing with blas and lapack
# note: -ff2c and -fno-second-underscore are NOT needed when using generic
# blas/lapack
script: |
mkdir -p build && cd build && cmake -DBLA_VENDOR=Generic -DCMAKE_PREFIX_PATH=$(brew --prefix lapack) -DEXAMPLES=ON -DICB=ON -DMPI=ON .. && make VERBOSE=1 && make test
- stage: osx
os: osx
osx_image: xcode11
# note: in xcode11 image, brew list only lists all formulae
before_install:
- brew list -1 | while read line; do brew unlink $line; done;
- brew list arpack || brew install arpack # Test osx formula
# note: brew has updated itself so we must add --formula to only list formulae
- brew list --formula -1 | while read line; do brew link --overwrite $line; done;
script: ls # Need fake script.
- stage: osx
os: osx
osx_image: xcode12
before_install:
- brew list --formula -1 | while read line; do brew unlink $line; done;
- brew list arpack || brew install arpack # Test osx formula
- brew list --formula -1 | while read line; do brew link --overwrite $line; done;
script: ls # Need fake script.
# ubuntu_precise <=> test "older" systems, without ICB, without cmake (too old to be supported)
- stage: ubuntu_precise
dist: precise
script: ./bootstrap && ./configure && make VERBOSE=1 && make check && make distcheck;
- stage: ubuntu_precise
dist: precise
script: ./bootstrap && ./configure --enable-mpi && make VERBOSE=1 && make check && make distcheck;
# ubuntu_trusty <=> test "older" systems, without ICB
- stage: ubuntu_trusty
dist: trusty
script: mkdir -p build && cd build && cmake -D EXAMPLES=ON -D MPI=ON -D ICB=OFF .. && make VERBOSE=1 && make test && make package_source;
- stage: ubuntu_trusty
dist: trusty
script: ./bootstrap && ./configure --enable-mpi && make VERBOSE=1 && make check && make distcheck;
# ubuntu_xenial <=> test "recent" systems, with ICB
- stage: ubuntu_xenial
dist: xenial
script: mkdir -p build && cd build && cmake -D EXAMPLES=ON -D MPI=ON -D ICB=ON .. && make VERBOSE=1 && make test && make package_source;
- stage: ubuntu_xenial
dist: xenial
script: ./bootstrap && ./configure --enable-mpi --enable-icb && make VERBOSE=1 && make check && make distcheck;
# ubuntu_bionic <=> test "recent" systems, with ICB
- stage: ubuntu_bionic
dist: bionic
script: ./bootstrap && ./configure --enable-icb --enable-icb-exmm --enable-mpi && export VERBOSE=1 && make all && make check
- stage: ubuntu_bionic
dist: bionic
before_install:
- sudo apt-get -y install python3-minimal python3-pip python3-numpy
- sudo pip3 install --system numpy
# need to build boost-python from source for python 3 (repository package is built for python 2)
- sudo apt-get -y install wget
- wget https://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.gz
- tar -xf boost_1_67_0.tar.gz && cd boost_1_67_0
- ./bootstrap.sh --with-libraries=python --with-python=/usr/bin/python3
- sudo ./b2 install
- sudo apt-get install locate
- sudo updatedb
script: |
cd $TRAVIS_BUILD_DIR && mkdir -p build && cd build && \
cmake -DEXAMPLES=ON -DICB=ON -DICBEXMM=ON -DMPI=ON -DPYTHON3=ON -DBOOST_PYTHON_LIBSUFFIX='36' .. && \
export VERBOSE=1 && make all && make test
# ubuntu_eoan <=> test "recent EOL" systems, with ICB
- stage: ubuntu_eoan
dist: bionic
script: ./scripts/travis_ubuntu.sh ubuntu :eoan
# ubuntu_focal <=> test "recent" systems, with ICB
- stage: ubuntu_focal
dist: bionic
script: ./scripts/travis_ubuntu.sh ubuntu :focal
# ubuntu_groovy <=> test "recent non-LTS" systems, with ICB
- stage: ubuntu_groovy
dist: bionic
script: ./scripts/travis_ubuntu.sh ubuntu :groovy
# coverage: "recent" systems with ICB
- stage: coverage
dist: bionic
script: |
mkdir -p build && cd build \
&& \
cmake -DEXAMPLES=ON -DMPI=ON -DICB=ON -DCOVERALLS=ON .. &> cmake.log \
&& \
tail -n 50 cmake.log \
&& \
make all &> compil.log \
&& \
tail -n 50 compil.log \
&& \
make test &> test.log \
&& \
tail -n 50 test.log \
&& \
make coveralls &> coveralls.log \
&& \
head -n 50 coveralls.log && tail -n 50 coveralls.log \
&& \
head -n 50 coveralls.json && tail -n 50 coveralls.json
# debian_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
# 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: debian_interface64
dist: xenial
script: |
sudo docker pull debian \
&& \
sudo docker create --name mobydick debian /bin/bash -c \
"cat /etc/os-release && \
cat /etc/apt/sources.list && \
sed -e 's/stretch/testing/' -i /etc/apt/sources.list && \
sed -e 's/main/main non-free contrib/' -i /etc/apt/sources.list && \
sed -e '/security.debian.org/d' -i /etc/apt/sources.list && \
cat /etc/apt/sources.list && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get -y update && \
apt-get -y --allow-unauthenticated -o Dpkg::Options::=--force-confdef upgrade && \
apt-get -y --allow-unauthenticated -o Dpkg::Options::=--force-confdef dist-upgrade && \
cat /etc/os-release && \
apt-get -y install dialog && \
echo yes | apt-get -y install intel-mkl libmkl-dev && \
apt-get -y install build-essential && \
apt-get -y install git gfortran gcc g++ openmpi-bin libopenmpi-dev automake autoconf libtool pkg-config && \
apt-get -y install libeigen3-dev && \
cd /tmp && \
cd arpack-ng && \
git status && \
git log -2 && \
sed -e 's/LOG_FLAGS = /LOG_FLAGS = --allow-run-as-root --oversubscribe /' -i PARPACK/EXAMPLES/MPI/Makefile.am && \
sed -e 's/LOG_FLAGS = /LOG_FLAGS = --allow-run-as-root --oversubscribe /' -i PARPACK/TESTS/MPI/Makefile.am && \
./bootstrap && \
export FFLAGS='-DMKL_ILP64 -I/usr/include/mkl' && \
export FCFLAGS='-DMKL_ILP64 -I/usr/include/mkl' && \
export LIBS='-Wl,--no-as-needed -L/usr/lib/x86_64-linux-gnu -lmkl_sequential -lmkl_core -lpthread -lm -ldl' && \
export INTERFACE64=1 && \
./configure --with-blas=mkl_gf_ilp64 --with-lapack=mkl_gf_ilp64 --enable-mpi --enable-icb-exmm \
--disable-dependency-tracking && \
export VERBOSE=1 && \
make all && \
make check && \
find . -name test-suite.log | xargs tail -n 300" \
&& \
sudo docker cp -a ${TRAVIS_BUILD_DIR} mobydick:/tmp \
&& \
sudo docker start -a mobydick
after_failure:
# show build error or test log to know what is wrong if errors occured.
- if [[ -f $TRAVIS_BUILD_DIR/build/Testing/Temporary/LastTest.log ]]; then tail -n 300 $TRAVIS_BUILD_DIR/build/Testing/Temporary/LastTest.log; fi
- find . -name test-suite.log | xargs tail -n 300
- find . -name arpackmm.run.log | xargs tail -n 300
- find . -name CMakeOutput.log | xargs cat
- find . -name CMakeError.log | xargs cat
+25 -11
View File
@@ -77,6 +77,9 @@ function(pexamples list_name)
endfunction(pexamples)
if (PYTHON3)
enable_language(C CXX) # Boost requirement.
set(CMAKE_CXX_STANDARD 14) # Boost requirement.
find_package(PythonInterp 3 REQUIRED)
find_package(PythonLibs 3 REQUIRED)
find_package(Boost COMPONENTS python${BOOST_PYTHON_LIBSUFFIX} numpy${BOOST_PYTHON_LIBSUFFIX} REQUIRED)
@@ -222,7 +225,7 @@ get_target_property(BLAS_LIBRARIES BLAS::BLAS INTERFACE_LINK_LIBRARIES) # Get va
if (MPI)
if (NOT TARGET MPI::MPI_Fortran) # Search only if not already found by upper CMakeLists.txt
include(FindMPI)
find_package(MPI REQUIRED)
find_package(MPI REQUIRED COMPONENTS Fortran)
# MPI::MPI_* target was already created at this point by FindMPI.cmake if cmake version >= 3.9
if (NOT TARGET MPI::MPI_Fortran) # Create target "at hand" to ensure compatibility if cmake version < 3.9
@@ -230,16 +233,6 @@ if (MPI)
set_target_properties(MPI::MPI_Fortran PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MPI_Fortran_INCLUDE_DIRS}")
set_target_properties(MPI::MPI_Fortran PROPERTIES INTERFACE_LINK_LIBRARIES "${MPI_Fortran_LIBRARIES}")
endif()
if (NOT TARGET MPI::MPI_C) # Create target "at hand" to ensure compatibility if cmake version < 3.9
add_library(MPI::MPI_C INTERFACE IMPORTED)
set_target_properties(MPI::MPI_C PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MPI_C_INCLUDE_DIRS}")
set_target_properties(MPI::MPI_C PROPERTIES INTERFACE_LINK_LIBRARIES "${MPI_C_LIBRARIES}")
endif()
if (NOT TARGET MPI::MPI_CXX) # Create target "at hand" to ensure compatibility if cmake version < 3.9
add_library(MPI::MPI_CXX INTERFACE IMPORTED)
set_target_properties(MPI::MPI_CXX PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MPI_CXX_INCLUDE_DIRS}")
set_target_properties(MPI::MPI_CXX PROPERTIES INTERFACE_LINK_LIBRARIES "${MPI_CXX_LIBRARIES}")
endif()
endif()
get_target_property(MPI_Fortran_INCLUDE_DIRS MPI::MPI_Fortran INTERFACE_INCLUDE_DIRECTORIES) # Get variables from target (*.pc/cmake, msg).
get_target_property(MPI_Fortran_LIBRARIES MPI::MPI_Fortran INTERFACE_LINK_LIBRARIES) # Get variables from target (*.pc/cmake, msg).
@@ -247,8 +240,29 @@ if (MPI)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${MPI_Fortran_COMPILE_FLAG}")
if(ICB)
if (NOT TARGET MPI::MPI_C) # Search only if not already found by upper CMakeLists.txt
include(FindMPI)
find_package(MPI REQUIRED COMPONENTS C)
if (NOT TARGET MPI::MPI_C) # Create target "at hand" to ensure compatibility if cmake version < 3.9
add_library(MPI::MPI_C INTERFACE IMPORTED)
set_target_properties(MPI::MPI_C PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MPI_C_INCLUDE_DIRS}")
set_target_properties(MPI::MPI_C PROPERTIES INTERFACE_LINK_LIBRARIES "${MPI_C_LIBRARIES}")
endif()
endif()
get_target_property(MPI_C_INCLUDE_DIRS MPI::MPI_C INTERFACE_INCLUDE_DIRECTORIES) # Get variables from target (*.pc/cmake, msg).
get_target_property(MPI_C_LIBRARIES MPI::MPI_C INTERFACE_LINK_LIBRARIES) # Get variables from target (*.pc/cmake, msg).
if (NOT TARGET MPI::MPI_CXX) # Search only if not already found by upper CMakeLists.txt
include(FindMPI)
find_package(MPI REQUIRED COMPONENTS CXX)
if (NOT TARGET MPI::MPI_CXX) # Create target "at hand" to ensure compatibility if cmake version < 3.9
add_library(MPI::MPI_CXX INTERFACE IMPORTED)
set_target_properties(MPI::MPI_CXX PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MPI_CXX_INCLUDE_DIRS}")
set_target_properties(MPI::MPI_CXX PROPERTIES INTERFACE_LINK_LIBRARIES "${MPI_CXX_LIBRARIES}")
endif()
endif()
get_target_property(MPI_CXX_INCLUDE_DIRS MPI::MPI_CXX INTERFACE_INCLUDE_DIRECTORIES) # Get variables from target (*.pc/cmake, msg).
get_target_property(MPI_CXX_LIBRARIES MPI::MPI_CXX INTERFACE_LINK_LIBRARIES) # Get variables from target (*.pc/cmake, msg).
+1 -1
View File
@@ -41,7 +41,7 @@ sudo docker create --name mobydick ${prefix}centos$1 /bin/bash -c \
$cmake -DEXAMPLES=ON -DMPI=ON -DICB=ON .. && \
make all && make test" \
&& \
sudo docker cp -a ${TRAVIS_BUILD_DIR} mobydick:/tmp \
sudo docker cp -a ${GITHUB_WORKSPACE} mobydick:/tmp \
&& \
sudo docker start -a mobydick
+5 -9
View File
@@ -8,16 +8,13 @@ then
# 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
# 2. docker cp -a ${GITHUB_WORKSPACE} 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)
test . != ".$2" && mpi="$2" || mpi=openmpi
test . != ".$3" && version="$3" || version=latest
time sudo docker pull registry.fedoraproject.org/fedora:$version ||
sudo docker pull fedora:$version
time sudo docker create --name mobydick fedora:$version \
/tmp/arpack-ng/scripts/travis_fedora.sh $mpi
time sudo docker cp -a ${TRAVIS_BUILD_DIR} mobydick:/tmp
time sudo docker pull fedora
time sudo docker create --name mobydick fedora /tmp/arpack-ng/scripts/travis_fedora.sh $mpi
time sudo docker cp -a ${GITHUB_WORKSPACE} mobydick:/tmp
time sudo docker start -a mobydick ; e=$?
exit $e
fi
@@ -31,8 +28,7 @@ then
# Ignore weak depencies
echo "install_weak_deps=False" >> /etc/dnf/dnf.conf
time dnf -y upgrade
time dnf -y install environment-modules git \
gfortran openblas-devel cmake ${mpi}-devel make gcc-c++
time dnf -y install environment-modules git gfortran openblas-devel cmake ${mpi}-devel make gcc-c++
useradd test
chown -R test /tmp
sudo -u test $0 $mpi
+1 -1
View File
@@ -37,6 +37,6 @@ sudo docker create --name mobydick "$1$2" /bin/bash -c
make all && \
make test; tail -n 50 ./Testing/Temporary/LastTest.log" \
&& \
sudo docker cp -a ${TRAVIS_BUILD_DIR} mobydick:/tmp \
sudo docker cp -a ${GITHUB_WORKSPACE} mobydick:/tmp \
&& \
sudo docker start -a mobydick