Check if the CLHEP target exists before creating it, if it does warn #1143
This file contains 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 | |
on: [push, pull_request] | |
jobs: | |
default: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
LCG: ["LCG_100/x86_64-centos7-gcc10-opt", # g4 10.7 | |
"LCG_101/x86_64-centos7-gcc11-opt", # g4 10.7 | |
"LCG_102/x86_64-centos9-gcc11-opt", # g4 11 | |
"LCG_102/x86_64-centos7-clang12-opt", # g4 11 | |
"LCG_102/x86_64-ubuntu2004-gcc9-opt", # g4 11 | |
"dev3/x86_64-centos7-gcc11-opt", | |
"dev4/x86_64-centos7-gcc11-opt"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: aidasoft/run-lcg-view@v3 | |
with: | |
release-platform: ${{ matrix.LCG }} | |
run: | | |
mkdir build | |
cd build | |
unset CPATH | |
echo "::group::CMakeConfig" | |
cmake -GNinja \ | |
-DDD4HEP_USE_GEANT4=ON \ | |
-DBoost_NO_BOOST_CMAKE=ON \ | |
-DDD4HEP_USE_LCIO=ON \ | |
-DDD4HEP_USE_EDM4HEP=OFF \ | |
-DDD4HEP_USE_TBB=ON \ | |
-DDD4HEP_USE_HEPMC3=ON \ | |
-DDD4HEP_BUILD_DEBUG=OFF \ | |
-DBUILD_TESTING=ON \ | |
-DDD4HEP_DEBUG_CMAKE=ON \ | |
-DDD4HEP_USE_XERCESC=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_CXX_FLAGS="-fdiagnostics-color=always" \ | |
-DCMAKE_CXX_STANDARD=17 .. | |
if [ "${{ matrix.LCG }}" = "dev3/x86_64-centos7-gcc11-opt" ]; then | |
cmake -DDD4HEP_HEPMC3_COMPRESSION_SUPPORT=ON .. | |
fi | |
echo "::group::Compile" | |
ninja install | |
. ../bin/thisdd4hep.sh | |
echo "::group::Test" | |
ctest --output-on-failure -j4 --output-junit TestResults_1.xml | |
echo "::group::CMakeExamples" | |
cd ../examples/ | |
mkdir build | |
cd build | |
cmake -GNinja \ | |
-DBoost_NO_BOOST_CMAKE=ON \ | |
-DDD4HEP_USE_XERCESC=ON \ | |
-DCMAKE_CXX_STANDARD=17 .. | |
echo "::group::CompileExamples" | |
ninja install | |
echo "::group::TestExamples" | |
ctest --output-on-failure -j2 --output-junit TestResults_2.xml | |
- name: Prepare Artifact Name | |
if: success() || failure() | |
run: | | |
artifact_name="${{ matrix.LCG }}" | |
artifact_name=$(echo -n "${artifact_name}" | sed -e 's@/@@g') | |
echo "ARTIFACT_NAME=${artifact_name}" >> $GITHUB_ENV | |
- name: Upload test results | |
if: success() || failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Test Results ${{ env.ARTIFACT_NAME }} | |
path: | | |
/home/runner/work/DD4hep/DD4hep/build/TestResults_1.xml | |
/home/runner/work/DD4hep/DD4hep/examples/build/TestResults_2.xml | |
key4hep: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
view-path: ["/cvmfs/sw-nightlies.hsf.org/key4hep/"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: aidasoft/run-lcg-view@v3 | |
with: | |
container: centos7 | |
view-path: ${{ matrix.view-path }} | |
run: | | |
mkdir build | |
cd build | |
unset CPATH | |
echo "::group::CMakeConfig" | |
cmake -GNinja \ | |
-DDD4HEP_USE_GEANT4=ON \ | |
-DBoost_NO_BOOST_CMAKE=ON \ | |
-DDD4HEP_USE_LCIO=ON \ | |
-DDD4HEP_USE_EDM4HEP=ON \ | |
-DDD4HEP_USE_TBB=OFF \ | |
-DDD4HEP_USE_HEPMC3=ON \ | |
-DDD4HEP_BUILD_DEBUG=OFF \ | |
-DBUILD_TESTING=ON \ | |
-DDD4HEP_DEBUG_CMAKE=ON \ | |
-DDD4HEP_USE_XERCESC=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_CXX_FLAGS="-fdiagnostics-color=always" \ | |
-DCMAKE_CXX_STANDARD=17 .. | |
echo "::group::Compile" | |
ninja install | |
. ../bin/thisdd4hep.sh | |
echo "::group::Test" | |
ctest --output-on-failure -j4 --output-junit TestResults_1.xml | |
echo "::group::CMakeExamples" | |
cd ../examples/ | |
mkdir build | |
cd build | |
cmake -GNinja \ | |
-DBoost_NO_BOOST_CMAKE=ON \ | |
-DDD4HEP_USE_XERCESC=ON \ | |
-DCMAKE_CXX_STANDARD=17 .. | |
echo "::group::CompileExamples" | |
ninja install | |
echo "::group::TestExamples" | |
ctest --output-on-failure -j2 --output-junit TestResults_2.xml | |
- name: Prepare Artifact Name | |
if: success() || failure() | |
run: | | |
artifact_name="${{ matrix.view-path }}" | |
artifact_name=$(echo -n "${artifact_name}" | sed -e 's@/@@g') | |
echo "ARTIFACT_NAME=${artifact_name}" >> $GITHUB_ENV | |
- name: Upload test results | |
if: success() || failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Test Results ${{ env.ARTIFACT_NAME }} | |
path: | | |
/home/runner/work/DD4hep/DD4hep/build/TestResults_1.xml | |
/home/runner/work/DD4hep/DD4hep/examples/build/TestResults_2.xml | |
non-shared: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
LCG: ["LCG_102/x86_64-centos7-gcc11-opt"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: aidasoft/run-lcg-view@v3 | |
with: | |
release-platform: ${{ matrix.LCG }} | |
run: | | |
mkdir build | |
cd build | |
unset CPATH | |
echo "::group::CMakeConfig" | |
cmake -GNinja \ | |
-DDD4HEP_USE_GEANT4=ON \ | |
-DBoost_NO_BOOST_CMAKE=ON \ | |
-DDD4HEP_USE_LCIO=ON \ | |
-DDD4HEP_USE_EDM4HEP=OFF \ | |
-DDD4HEP_USE_TBB=ON \ | |
-DDD4HEP_USE_HEPMC3=ON \ | |
-DDD4HEP_BUILD_DEBUG=OFF \ | |
-DBUILD_TESTING=ON \ | |
-DDD4HEP_DEBUG_CMAKE=ON \ | |
-DBUILD_SHARED_LIBS=OFF \ | |
-DDD4HEP_USE_XERCESC=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_CXX_FLAGS="-fdiagnostics-color=always" \ | |
-DCMAKE_CXX_STANDARD=17 .. | |
echo "::group::Compile" | |
ninja | |
g4units: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
LCG: ["dev3/x86_64-centos7-gcc11-opt"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- uses: aidasoft/run-lcg-view@v3 | |
with: | |
release-platform: ${{ matrix.LCG }} | |
run: | | |
mkdir build | |
cd build | |
unset CPATH | |
echo "::group::CMakeConfig" | |
cmake -GNinja \ | |
-DDD4HEP_USE_GEANT4_UNITS=ON \ | |
-DDD4HEP_USE_GEANT4=ON \ | |
-DBoost_NO_BOOST_CMAKE=ON \ | |
-DDD4HEP_USE_LCIO=ON \ | |
-DDD4HEP_USE_EDM4HEP=OFF \ | |
-DDD4HEP_USE_TBB=ON \ | |
-DDD4HEP_USE_HEPMC3=ON \ | |
-DDD4HEP_BUILD_DEBUG=OFF \ | |
-DBUILD_TESTING=ON \ | |
-DDD4HEP_DEBUG_CMAKE=ON \ | |
-DDD4HEP_USE_XERCESC=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_CXX_FLAGS="-fdiagnostics-color=always" \ | |
-DCMAKE_CXX_STANDARD=17 .. | |
echo "::group::Compile" | |
ninja install | |
. ../bin/thisdd4hep.sh | |
echo "::group::Test" | |
ctest --output-on-failure -j4 --output-junit TestResults_1.xml | |
echo "::group::CMakeExamples" | |
cd ../examples/ | |
mkdir build | |
cd build | |
cmake -GNinja \ | |
-DBoost_NO_BOOST_CMAKE=ON \ | |
-DDD4HEP_USE_XERCESC=ON \ | |
-DCMAKE_CXX_STANDARD=17 .. | |
echo "::group::CompileExamples" | |
ninja install | |
echo "::group::TestExamples" | |
ctest --output-on-failure -j2 --output-junit TestResults_2.xml | |
- name: Prepare Artifact Name | |
if: success() || failure() | |
run: | | |
artifact_name="${{ matrix.LCG }}" | |
artifact_name=$(echo -n "${artifact_name}" | sed -e 's@/@@g') | |
echo "ARTIFACT_NAME=${artifact_name}" >> $GITHUB_ENV | |
- name: Upload test results | |
if: success() || failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Test Results ${{ env.ARTIFACT_NAME }} | |
path: | | |
/home/runner/work/DD4hep/DD4hep/build/TestResults_1.xml | |
/home/runner/work/DD4hep/DD4hep/examples/build/TestResults_2.xml | |
event_file: | |
if: github.repository_owner == 'aidasoft' || github.event_name == 'pull_request' | |
name: "Upload Event Payload" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Event File | |
path: ${{ github.event_path }} |