Skip to content

Syncing .gitignore; previous commit: Author: Juan Miguel Carceller <2… #374

Syncing .gitignore; previous commit: Author: Juan Miguel Carceller <2…

Syncing .gitignore; previous commit: Author: Juan Miguel Carceller <2… #374

name: lcg_linux_with_podio
on: [push, pull_request]
jobs:
build-and-test-with-podio:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
LCG: ["LCG_99/x86_64-centos7-gcc10-opt",
"dev3/x86_64-centos7-clang12-opt",
"dev4/x86_64-centos7-gcc11-opt",
"dev4/x86_64-centos7-clang12-opt"]
steps:
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v3
- uses: aidasoft/run-lcg-view@v4
with:
release-platform: ${{ matrix.LCG }}
run: |
STARTDIR=$(pwd)
echo "::group::Build podio"
echo "Building podio @"$(git log -1 --format=%H)
git clone --depth 1 https://github.com/AIDASoft/podio
cd podio
mkdir build install
cd build
cmake .. -DCMAKE_CXX_STANDARD=17 \
-DENABLE_SIO=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_INSTALL_PREFIX=$(pwd)/../install \
-G Ninja
ninja -k0
ninja install
cd ..
export ROOT_INCLUDE_PATH=$(pwd)/install/include:$ROOT_INCLUDE_PATH:$CPATH
unset CPATH
export CMAKE_PREFIX_PATH=$(pwd)/install:$CMAKE_PREFIX_PATH
export LD_LIBRARY_PATH=$(pwd)/install/lib:$(pwd)/install/lib64:$LD_LIBRARY_PATH
echo "::endgroup::"
echo "::group::Build edm4hep"
cd $STARTDIR
echo "Building edm4hep"
mkdir build install
cd build
cmake .. -DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=../install \
-DUSE_EXTERNAL_CATCH2=OFF \
-G Ninja
ninja -k0
ctest --output-on-failure
ninja install
cd -
echo "::endgroup::"
echo "::group::Test downstream usage"
export CMAKE_PREFIX_PATH=$PWD/install:$CMAKE_PREFIX_PATH
cd test/downstream-project-cmake-test
mkdir build
cd build
cmake .. -DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=../install \
-G Ninja
ninja -k0
echo "::endgroup::"