Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: replace travis with github actions #247

Merged
merged 4 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: coverity

on:
schedule:
- cron: '0 0 * * *'

jobs:
run-coverity:
runs-on: ubuntu-latest
if: github.repository == 'iLCSoft/Lcgeo'
steps:
- uses: actions/checkout@v2
- uses: cvmfs-contrib/github-action-cvmfs@v2
- uses: aidasoft/run-lcg-view@v3
with:
coverity-cmake-command: 'cmake -C $ILCSOFT/ILCSoft.cmake ..'
coverity-project: 'iLCSoft%2FLcgeo'
coverity-project-token: ${{ secrets.LCGEO_COVERITY_TOKEN }}
github-pat: ${{ secrets.READ_COVERITY_IMAGE }}
view-path: "/cvmfs/clicdp.cern.ch/iLCSoft/lcg/100/nightly/x86_64-centos7-gcc10-opt"
setup-script: "init_ilcsoft.sh"
29 changes: 29 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: linux
on: [push, pull_request]

jobs:
centos7:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
COMPILER: [gcc10, clang11]
LCG: [100]
include:
- COMPILER: gcc8
LCG: 99python2

steps:
- uses: actions/checkout@v2
- uses: cvmfs-contrib/github-action-cvmfs@v2
- uses: aidasoft/run-lcg-view@v3
with:
view-path: "/cvmfs/clicdp.cern.ch/iLCSoft/lcg/${{ matrix.LCG }}/nightly/x86_64-centos7-${{ matrix.COMPILER }}-opt"
setup-script: "init_ilcsoft.sh"
run: |
mkdir build
cd build
cmake -GNinja -C ${ILCSOFT}/ILCSoft.cmake -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " ..
ninja -k0
ninja install
ctest --output-on-failure
12 changes: 0 additions & 12 deletions .travis-ci.d/compile_and_test.sh

This file was deleted.

12 changes: 0 additions & 12 deletions .travis-ci.d/coverity_scan.sh

This file was deleted.

72 changes: 0 additions & 72 deletions .travis.yml

This file was deleted.

36 changes: 7 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,12 @@ option(INSTALL_COMPACT_FILES "Copy compact files to install area" OFF)
find_package(DD4hep REQUIRED COMPONENTS DDRec DDG4 DDParsers)
dd4hep_set_compiler_flags()

SET( DD4hep_REDUCED_COMPONENT ${DD4hep_COMPONENT_LIBRARIES} )
## Drop DDG4 from components for normal geometry plugins
LIST( REMOVE_AT DD4hep_REDUCED_COMPONENT -2 )

find_package ( ROOT REQUIRED COMPONENTS Geom GenVector)
include(${ROOT_USE_FILE})
message ( STATUS "ROOT_VERSION: ${ROOT_VERSION}" )

find_package( Boost REQUIRED )
include_directories( SYSTEM ${Boost_INCLUDE_DIRS} )

find_package( Geant4 REQUIRED )
include(${Geant4_USE_FILE})

find_package( LCIO REQUIRED)
#find_package( GEAR REQUIRED)

include_directories( ${CMAKE_SOURCE_DIR}/detector/include )
include_directories( SYSTEM
${DD4hep_INCLUDE_DIRS}
${DD4hep_COMPONENTS_INCLUDE_DIRS}
${ROOT_INCLUDE_DIR}
${ROOT_INCLUDE_DIRS}
${LCIO_INCLUDE_DIRS}
)
# ${GEAR_INCLUDE_DIRS}


file(GLOB sources
./detector/tracker/*.cpp
Expand All @@ -83,24 +63,22 @@ file(GLOB G4sources
./plugins/CaloPreShowerSDAction.cpp
)


#file(GLOB headers ./ILD/include/*.h)

if(DD4HEP_USE_PYROOT)
ROOT_GENERATE_DICTIONARY(G__ILDEx ${headers} LINKDEF include/ROOT/LinkDef.h)
list(APPEND sources G__ILDEx.cxx)
endif()

#Create target, library, rootmap, install

add_dd4hep_plugin(${PackageName} SHARED ${sources})

add_dd4hep_plugin(${PackageName}G4 SHARED ${G4sources})

target_link_libraries(${PackageName} ${DD4hep_LIBRARIES} ${DD4hep_REDUCED_COMPONENT} ${ROOT_LIBRARIES} ${LCIO_LIBRARIES})
target_include_directories(${PackageName} PRIVATE ${CMAKE_SOURCE_DIR}/detector/include )
target_include_directories(${PackageName}G4 PRIVATE ${CMAKE_SOURCE_DIR}/detector/include )

target_link_libraries(${PackageName}G4 ${DD4hep_LIBRARIES} ${DD4hep_COMPONENT_LIBRARIES} ${ROOT_LIBRARIES} ${Geant4_LIBRARIES} ${LCIO_LIBRARIES})
target_include_directories(${PackageName} SYSTEM PUBLIC ${LCIO_INCLUDE_DIRS})
target_include_directories(${PackageName}G4 SYSTEM PUBLIC ${LCIO_INCLUDE_DIRS})

target_link_libraries(${PackageName} DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers ${ROOT_LIBRARIES} ${LCIO_LIBRARIES})
target_link_libraries(${PackageName}G4 DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers DD4hep::DDG4 ${ROOT_LIBRARIES} ${Geant4_LIBRARIES} ${LCIO_LIBRARIES})

#Create this_package.sh file, and install
dd4hep_instantiate_package(${PackageName})
Expand Down
2 changes: 1 addition & 1 deletion detector/calorimeter/GenericCalEndcap_o1_v01_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s

Layering layering(x_det);
double totalThickness = layering.totalThickness();
sens.setType("calorimeter");
Readout readout = sens.readout();
Segmentation seg = readout.segmentation();

Expand Down Expand Up @@ -164,7 +165,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
thickness_sum += slice_thickness/2;

if ( x_slice.isSensitive() ) {
sens.setType("calorimeter");
slice_vol.setSensitiveDetector(sens);

#if DD4HEP_VERSION_GE( 0, 15 )
Expand Down
4 changes: 0 additions & 4 deletions detector/other/FieldMapBrBz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
#include <DD4hep/DetFactoryHelper.h>
#include <XML/Utilities.h>

//Thanks stackoverflow
#include <boost/algorithm/string.hpp>


#include <TFile.h>
#include <TTree.h>

Expand Down