- Notifications
You must be signed in to change notification settings - Fork147
Update CMAKE of StdEvtMonitor#248
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
name:linux_clang | |
on: | |
push: | |
branches:[ "master" ] | |
pull_request: | |
branches:[ "master" ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE:Release | |
jobs: | |
build: | |
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | |
# You can convert this to a matrix build if you need cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on:ubuntu-latest | |
strategy: | |
matrix: | |
qt_version:[5, 6] | |
compiler:[clang-latest] | |
cpp_standard:[17, 20] | |
name:eudaq_full_build-ubuntu-latest-${{matrix.compiler}}-cxx_standard-${{matrix.cpp_standard}}-qt-${{matrix.qt_version}} | |
steps: | |
-uses:actions/checkout@v4 | |
-name:update repo | |
run:| | |
sudo apt-get update | |
-name:Install C++ compiler | |
id:install_cc | |
uses:rlalik/setup-cpp-compiler@master | |
with: | |
compiler:${{ matrix.compiler }} | |
-name:install qt | |
run:| | |
if [ "${{ matrix.qt_version }}" -eq "5" ]; | |
then | |
sudo apt-get install qtbase5-dev qt5-qmake | |
fi | |
if [ "${{ matrix.qt_version }}" -eq "6" ]; | |
then | |
sudo apt-get install qt6-base-dev | |
fi | |
shell:bash | |
-name:install CERN ROOT dependencies | |
id:root_install_dependencies | |
run:| | |
sudo apt-get install binutils cmake dpkg-dev g++ gcc libssl-dev git libx11-dev libxext-dev libxft-dev libxpm-dev python3 libtbb-dev | |
-name:restore CERN ROOT from cache | |
id:root_restore_from_cache | |
uses:actions/cache/restore@v4 | |
with: | |
path:~/eudaq_dependencies/root | |
key:root-v6.32.02-${{ runner.os }}-${{ steps.install_cc.outputs.cxx }}-${{matrix.cpp_standard}} | |
-name:build CERN ROOT | |
id:root_build | |
if:steps.root_restore_from_cache.outputs.cache-hit != 'true' | |
run:| | |
export CERN_ROOT_DOWNLOAD_NAME=root_v6.32.02.source.tar.gz | |
wget -nv https://root.cern/download/$CERN_ROOT_DOWNLOAD_NAME | |
mkdir root_source | |
tar -xzf $CERN_ROOT_DOWNLOAD_NAME -C ./root_source --strip-components=1 | |
rm -f $CERN_ROOT_DOWNLOAD_NAME | |
mkdir -p ~/eudaq_dependencies/root/ | |
mkdir root_build | |
cd root_build | |
echo "C++ compiler used: ${{ steps.install_cc.outputs.cxx }}" | |
echo "C compiler used: ${{ steps.install_cc.outputs.cc }}" | |
cmake -D CMAKE_CXX_COMPILER=${{ steps.install_cc.outputs.cxx }} -D CMAKE_C_COMPILER=${{ steps.install_cc.outputs.cc }} -DCMAKE_INSTALL_PREFIX=~/eudaq_dependencies/root/ -Dclad=OFF -Dxrootd=OFF -DCMAKE_CXX_STANDARD=${{matrix.cpp_standard}} ../root_source/ | |
make -j12 install | |
cd .. | |
rm -rf root_source | |
rm -rf root_build | |
-name:cache CERN ROOT | |
id:root_save_to_cache | |
uses:actions/cache/save@v4 | |
if:steps.root_restore_from_cache.outputs.cache-hit != 'true' | |
with: | |
path:| | |
~/eudaq_dependencies/root | |
key:root-v6.32.02-${{ runner.os }}-${{ steps.install_cc.outputs.cxx }}-${{matrix.cpp_standard}} | |
-name:install TLU dependencies | |
run:| | |
echo "installing libusb - tlu 1 requirement" | |
sudo apt-get install --force-yes -y libusb-dev | |
sudo apt-get install --force-yes -y libusb-1.0-0 libusb-1.0-0-dev | |
echo "installing ipbus - tlu 2 requirement" | |
sudo apt-get install -y make erlang g++ libboost-all-dev libpugixml-dev rsyslog | |
echo "installing ipbus" | |
mkdir -p ~/eudaq_dependencies/ipbus/ | |
git clone --depth=1 -b v2.8.13 --recurse-submodules https://github.com/ipbus/ipbus-software.git | |
cd ipbus-software | |
mkdir -p $GITHUB_WORKSPACE/extern/ | |
make BUILD_UHAL_PYTHON=0 BUILD_UHAL_TESTS?=0 Set=uhal prefix=$GITHUB_WORKSPACE/extern/ CXXFLAGS="-g -Wall -pedantic -O3 -MMD -MP -fPIC -std=c++${{matrix.cpp_standard}}" | |
make install BUILD_UHAL_PYTHON=0 BUILD_UHAL_TESTS?=0 Set=uhal prefix=$GITHUB_WORKSPACE/extern/ CXXFLAGS="-g -Wall -pedantic -O3 -MMD -MP -fPIC -std=c++${{matrix.cpp_standard}}" | |
-name:install cmspixel dependencies | |
run:| | |
sudo apt-get install --force-yes -y libusb-1.0-0 libusb-1.0-0-dev libftdi1 libftdi-dev | |
mkdir -p $HOME/eudaq_dependencies | |
cd $HOME/eudaq_dependencies | |
git clone https://github.com/simonspa/pxar.git | |
cd pxar | |
git checkout testbeam-2016 | |
mkdir build | |
cd build | |
cmake -DBUILD_pxarui=OFF .. | |
make install | |
ls $HOME/eudaq_dependencies/pxar | |
echo "PXARPATH=$HOME/eudaq_dependencies/pxar" >> "$GITHUB_ENV" | |
-name:install tbscDESY dependencies | |
run:| | |
sudo apt-get install --force-yes -y unixodbc-dev | |
-name:Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run:| | |
source ~/eudaq_dependencies/root/bin/thisroot.sh | |
echo "PXARPATH: $PXARPATH" | |
echo "USER_CALICE_BUILD=OFF on linux clang as compilation fails." | |
echo "USER_CARIBOUS_BUILD=OFF on linux clang as dependency PEARY is missing." | |
echo "USER_PISTAGE_BUILD=OFF on linux clang as dependency GCS lib is missing." | |
echo "USER_TIMEPIX3_BUILD=OFF on linux clang as dependency SPIDR is missing." | |
cmake -D CMAKE_CXX_COMPILER=${{ steps.install_cc.outputs.cxx }} -D EUDAQ_BUILD_ONLINE_ROOT_MONITOR=ON -D EUDAQ_LIBRARY_BUILD_TTREE=ON -D EUDAQ_LIBRARY_BUILD_LCIO=ON -D EUDAQ_BUILD_STDEVENT_MONITOR=ON -D EUDAQ_BUILD_GUI=ON -D USER_ALIBAVA_BUILD=ON -D USER_CMSPHASE2_BUILD=ON -D USER_CMSPIXEL_BUILD=ON -D USER_CMSIT_BUILD=ON -D USER_EUDET_BUILD=ON -D USER_EXPERIMENTAL_BUILD=ON -D USER_ITKSTRIP_BUILD=ON -D USER_ITS3_BUILD=ON -D USER_STCONTROL_BUILD=ON -D USER_TBSCDESY_BUILD=ON -D USER_TLU_BUILD=ON -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
-name:Build | |
# Build your program with the given configuration | |
run:cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose | |
-name:Test | |
working-directory:${{github.workspace}}/build | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run:ctest -C ${{env.BUILD_TYPE}} | |