From 60c80e8c472b59c0e5cc02b62b8bb6830e2ed04a Mon Sep 17 00:00:00 2001 From: tmadlener Date: Fri, 12 Jan 2024 10:06:51 +0100 Subject: [PATCH] Add github actions based CI --- .github/workflows/key4hep.yml | 31 +++++++++++++++++++++++++++++++ .github/workflows/linux.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/key4hep.yml create mode 100644 .github/workflows/linux.yml diff --git a/.github/workflows/key4hep.yml b/.github/workflows/key4hep.yml new file mode 100644 index 0000000..bb4e45b --- /dev/null +++ b/.github/workflows/key4hep.yml @@ -0,0 +1,31 @@ +name: keyh4ep +on: [push, pull_request] + +jobs: + build-and-test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v3 + - uses: cvmfs-contrib/github-action-cvmfs@v3 + - uses: aidasoft/run-lcg-view@v4 + with: + container: centos7 + view-path: /cvmfs/sw-nightlies.hsf.org/key4hep + run: | + mkdir build + cd build + echo "::group::Run CMake" + cmake -GNinja \ + -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_INSTALL_PREFIX=../install \ + .. + echo "::endgroup::" && echo "::group::Build" + ninja -k0 + echo "::endgroup::" && echo "::group::Run Tests" + ctest --output-on-failure + echo "::endgroup::" && echo "::group::Install" + ninja install diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..bc00e7b --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,26 @@ +name: linux +on: [push, pull_request] + +jobs: + centos7: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + COMPILER: [gcc10, clang11] + LCG: [100] + + steps: + - uses: actions/checkout@v3 + - uses: cvmfs-contrib/github-action-cvmfs@v3 + - uses: aidasoft/run-lcg-view@v4 + 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 + ctest --output-on-failure + ninja install