Commit 5db8805f authored by EVPath Upstream's avatar EVPath Upstream Committed by Brad King
Browse files

EVPath 2020-03-13 (a596e381)

Code extracted from:

    https://github.com/GTkorvo/EVPath.git

at commit a596e3816203c8215575beb3ddabf87f9413fd73 (master).

Upstream Shortlog
-----------------

Chuck Atkins (5):
      8dcd9fcf Use an interface library to remove evpath link dependencies from tranports.
      7b15215e Remove superferlous ATL header and link dependencies
      a0be0a74 Revert "Remove superferlous ATL header and link dependencies"
      b2cf5d1b Add missing atl dependencies from transport modules
      9fb03cda Add GitHub Actions CI
parent 502b06dc
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
ci:
runs-on: ${{ matrix.os-image }}
strategy:
fail-fast: false
matrix:
os-image: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup
run: ci/gh-actions/setup.sh
- name: Configure
run: ci/gh-actions/run.sh configure
- name: Build
run: ci/gh-actions/run.sh build
- name: Test
run: ci/gh-actions/run.sh test
- name: Install
run: ci/gh-actions/run.sh install
......@@ -216,6 +216,15 @@ if (HAVE_SYS_EPOLL_H)
set(CM_DEFAULT_SELECT "epoll")
endif()
set(CM_DEFAULT_TRANSPORT "sockets")
# This is a dummy interace library to allow the transport modules to depend on
# the EVPath headers without causing an unnecessary link dependency
add_library(evpath_headers INTERFACE)
set_target_properties(evpath_headers PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES
"${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR};$<TARGET_PROPERTY:ffs::ffs,INTERFACE_INCLUDE_DIRECTORIES>;$<TARGET_PROPERTY:atl::atl,INTERACE_INCLUDE_DIRECTORIES>"
)
set(EVPATH_TRANSPORT_TARGETS)
if(EVPATH_TRANSPORT_MODULES)
target_link_libraries(EVPath PRIVATE ${CMAKE_DL_LIBS})
......@@ -230,10 +239,10 @@ if(EVPATH_TRANSPORT_MODULES)
OUTPUT_NAME ${EVPATH_LIBRARY_PREFIX}${M})
endforeach()
target_link_libraries(cmselect evpath atl::atl)
target_link_libraries(cmsockets evpath atl::atl)
target_link_libraries(cmudp evpath atl::atl)
target_link_libraries(cmmulticast evpath atl::atl)
target_link_libraries(cmselect PRIVATE evpath_headers atl::atl)
target_link_libraries(cmsockets PRIVATE evpath_headers atl::atl)
target_link_libraries(cmudp PRIVATE evpath_headers atl::atl)
target_link_libraries(cmmulticast PRIVATE evpath_headers atl::atl)
list(APPEND EVPATH_TRANSPORT_TARGETS cmselect cmsockets cmudp cmmulticast)
......@@ -241,7 +250,7 @@ if(EVPATH_TRANSPORT_MODULES)
add_library(cmepoll MODULE cmepoll.c)
set_target_properties(cmepoll PROPERTIES
OUTPUT_NAME ${EVPATH_LIBRARY_PREFIX}cmepoll)
target_link_libraries(cmepoll evpath atl::atl)
target_link_libraries(cmepoll PRIVATE evpath_headers atl::atl)
list(APPEND EVPATH_TRANSPORT_TARGETS cmepoll)
endif()
else()
......@@ -277,7 +286,7 @@ if(ENET_FOUND)
set_target_properties(cmenet PROPERTIES
OUTPUT_NAME ${EVPATH_LIBRARY_PREFIX}cmenet)
target_link_libraries(cmenet evpath enet::enet)
target_link_libraries(cmenet PRIVATE evpath_headers atl::atl enet::enet)
list(APPEND EVPATH_TRANSPORT_TARGETS cmenet)
else()
target_sources(EVPath PRIVATE cmenet.c)
......@@ -303,7 +312,7 @@ if(EVPATH_USE_ZPL_ENET)
set_target_properties(cmzplenet PROPERTIES
OUTPUT_NAME ${EVPATH_LIBRARY_PREFIX}cmzplenet)
target_link_libraries(cmzplenet evpath)
target_link_libraries(cmzplenet PRIVATE evpath_headers atl::atl)
list(APPEND EVPATH_TRANSPORT_TARGETS cmzplenet)
else()
target_sources(EVPath PRIVATE cmzplenet.c)
......@@ -335,7 +344,7 @@ if(UDT4_FOUND)
set_target_properties(cmudt4 PROPERTIES
OUTPUT_NAME ${EVPATH_LIBRARY_PREFIX}cmudt4)
target_link_libraries(cmudt4 evpath udt4::udt4)
target_link_libraries(cmudt4 PRIVATE evpath_headers atl::atl udt4::udt4)
list(APPEND EVPATH_TRANSPORT_TARGETS cmudt4)
else()
target_sources(EVPath PRIVATE cmudt4.cpp)
......@@ -363,7 +372,8 @@ if(LIBFABRIC_FOUND)
add_library(cmfabric MODULE cmfabric.c ip_config.c)
set_target_properties(cmfabric PROPERTIES
OUTPUT_NAME ${EVPATH_LIBRARY_PREFIX}cmfabric)
target_link_libraries(cmfabric evpath atl::atl libfabric::libfabric)
target_link_libraries(cmfabric PRIVATE
evpath_headers atl::atl libfabric::libfabric)
list(APPEND EVPATH_TRANSPORT_TARGETS cmfabric)
else()
if(NOT BUILD_SHARED_LIBS)
......@@ -419,7 +429,8 @@ if(IBVERBS_FOUND)
add_library(cmib MODULE cmib.c)
set_target_properties(cmib PROPERTIES
OUTPUT_NAME ${EVPATH_LIBRARY_PREFIX}cmib)
target_link_libraries(cmib evpath ${IBVERBS_LIBRARIES})
target_link_libraries(cmib PRIVATE
evpath_headers atl::atl ${IBVERBS_LIBRARIES})
list(APPEND EVPATH_TRANSPORT_TARGETS cmib)
else()
target_sources(EVPath PRIVATE cmib.c)
......@@ -457,7 +468,8 @@ if(IBVERBS_FOUND)
add_library(cmnnti MODULE cmnnti.c)
set_target_properties(cmnnti PROPERTIES
OUTPUT_NAME ${EVPATH_LIBRARY_PREFIX}cmnnti)
target_link_libraries(cmnnti evpath nnti::nnti enet::enet atl::atl)
target_link_libraries(cmnnti PRIVATE
evpath_headers atl::atl nnti::nnti enet::enet)
list(APPEND EVPATH_TRANSPORT_TARGETS cmnnti)
else()
if(NOT BUILD_SHARED_LIBS)
......
#!/bin/bash
export CI_ROOT_DIR="${GITHUB_WORKSPACE//\\//}/.."
export CI_SOURCE_DIR="${GITHUB_WORKSPACE//\\//}"
export CI_DEP_DIR="${CI_ROOT_DIR}/dependencies"
export CI_BIN_DIR="${CI_ROOT_DIR}/build"
export CMAKE_PREFIX_PATH=${CI_DEP_DIR}/install
export PATH=${CI_DEP_DIR}/tools/bin:${CI_DEP_DIR}/install/bin:${PATH}
case "$(uname -s)" in
Linux)
export LD_LIBRARY_PATH=${CI_DEP_DIR}/install/lib:${LD_LIBRARY_PATH}
;;
Darwin)
export DYLD_LIBRARY_PATH=${CI_DEP_DIR}/install/lib:${DYLD_LIBRARY_PATH}
;;
esac
mkdir -p ${CI_BIN_DIR}
cd ${CI_BIN_DIR}
case "$1" in
configure)
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${CI_ROOT_DIR}/install ${CI_SOURCE_DIR}
;;
build)
ninja
;;
test)
if [ "$(uname -s)" = "Darwin" ]
then
# Disable the firewall
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
# Force the use of the loopback interface
#export CM_IP="127.0.0.1"
export CM_HOSTNAME="localhost"
CTEST_EXCLUDES="mtests_non_blocking_bulk"
fi
ctest --timeout 300 -j2 -VV -E "${CTEST_EXCLUDES}"
;;
install)
ninja install
;;
esac
#!/bin/bash
echo
echo "Installing ninja"
mkdir -p ${CI_DEP_DIR}/tools/bin
cd ${CI_DEP_DIR}/tools/bin
curl -O -L https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
unzip ninja-linux.zip
echo
echo "Installing libfabric"
mkdir -p ${CI_DEP_DIR}/libfabric
cd ${CI_DEP_DIR}/libfabric
curl -L https://github.com/ofiwg/libfabric/releases/download/v1.9.1/libfabric-1.9.1.tar.bz2 | tar -xj
cd libfabric-1.9.1
./configure --prefix=${CI_DEP_DIR}/install --disable-static --enable-shared --enable-{shm,sockets,tcp,udp} --disable-{bgq,efa,gni,mrail,psm,psm2,rstream,rxd,rxm,usnic,verbs}
make -j2 install
# Install cmake
echo
echo "Installing CMake"
mkdir -p ${CI_DEP_DIR}/tools
cd ${CI_DEP_DIR}/tools
curl -L https://github.com/Kitware/CMake/releases/download/v3.3.2/cmake-3.3.2-Linux-x86_64.tar.gz | tar --strip-components=1 -xz
export PATH=${CI_DEP_DIR}/tools/bin:${PATH}
#!/bin/bash
echo
echo "Installing ninja"
brew install ninja
echo
echo "Installing libfabric"
brew install pkg-config
brew install libfabric
# Install cmake
echo
echo "Installing CMake"
mkdir -p ${CI_DEP_DIR}/tools
cd ${CI_DEP_DIR}/tools
curl -L https://github.com/Kitware/CMake/releases/download/v3.3.2/cmake-3.3.2-Darwin-x86_64.tar.gz | tar --strip-components=3 -xz
export PATH=${CI_DEP_DIR}/tools/bin:${PATH}
#!/bin/bash
export CI_ROOT_DIR="${GITHUB_WORKSPACE//\\//}/.."
export CI_SOURCE_DIR="${GITHUB_WORKSPACE//\\//}"
export CI_DEP_DIR="${CI_ROOT_DIR}/dependencies"
# Install ninja, pkgconfig, and libfabric
case "$(uname -s)" in
Linux)
. $(dirname ${BASH_SOURCE[0]})/setup-linux.sh
;;
Darwin)
. $(dirname ${BASH_SOURCE[0]})/setup-macos.sh
;;
esac
export CMAKE_PREFIX_PATH=${CI_DEP_DIR}/install
# Install atl
echo
echo "Installing atl"
mkdir -p ${CI_DEP_DIR}/atl
cd ${CI_DEP_DIR}/atl
git clone https://github.com/GTKorvo/atl.git source
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${CI_DEP_DIR}/install ../source
ninja install
# Install dill
echo
echo "Installing dill"
mkdir -p ${CI_DEP_DIR}/dill
cd ${CI_DEP_DIR}/dill
git clone https://github.com/GTKorvo/dill.git source
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${CI_DEP_DIR}/install ../source
ninja install
# Install ffs
echo
echo "Installing ffs"
mkdir -p ${CI_DEP_DIR}/ffs
cd ${CI_DEP_DIR}/ffs
git clone https://github.com/GTKorvo/ffs.git source
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${CI_DEP_DIR}/install ../source
ninja install
# Install enet
echo
echo "Installing enet"
mkdir -p ${CI_DEP_DIR}/enet
cd ${CI_DEP_DIR}/enet
git clone https://github.com/GTKorvo/enet.git source
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${CI_DEP_DIR}/install ../source
ninja install
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment