diff --git a/.github/workflows/key4hep-build.yaml b/.github/workflows/key4hep-build.yaml new file mode 100644 index 0000000..3f9007f --- /dev/null +++ b/.github/workflows/key4hep-build.yaml @@ -0,0 +1,23 @@ +name: Key4hep build + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + build_type: ["release", "nightly"] + image: ["alma9", "ubuntu22", "centos7"] + fail-fast: false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: key4hep/key4hep-actions/key4hep-build@main + with: + build_type: ${{ matrix.build_type }} + image: ${{ matrix.image }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 73e9415..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: linux - -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - SETUP: ['/cvmfs/sw.hsf.org/key4hep/setup.sh', '/cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh'] - steps: - - uses: actions/checkout@v2 - - uses: cvmfs-contrib/github-action-cvmfs@v2 - - name: Start container - run: | - docker run -it --name CI_container -v ${GITHUB_WORKSPACE}:/Package -v /cvmfs:/cvmfs:shared -d ghcr.io/aidasoft/centos7:latest /bin/bash - - name: CMake Configure - run: | - docker exec CI_container /bin/bash -c 'cd Package;\ - mkdir -p build install;\ - source ${{ matrix.SETUP }};\ - cd build;\ - cmake -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " -G Ninja ..;' - - name: Compile - run: | - docker exec CI_container /bin/bash -c 'cd ./Package;\ - source ${{ matrix.SETUP }};\ - cd build;\ - ninja -k0;' - - name: Install - run: | - docker exec CI_container /bin/bash -c 'cd ./Package;\ - source ${{ matrix.SETUP }};\ - cd build;\ - ninja -k0 install;' - - name: Test - run: | - docker exec CI_container /bin/bash -c 'cd ./Package;\ - source ${{ matrix.SETUP }};\ - cd build;\ - ninja -k0 && ctest --output-on-failure;' -