diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index aaa6cb85a..debe5b067 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -6,46 +6,39 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: cvmfs-contrib/github-action-cvmfs@v3 + - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + with: + repository: AIDASoft/podio + path: podio + - uses: cvmfs-contrib/github-action-cvmfs@v4 - uses: aidasoft/run-lcg-view@v4 with: release-platform: LCG_104/x86_64-el9-clang16-opt run: | STARTDIR=$(pwd) echo "::group::Build podio" - echo "Building podio @"$(git log -1 --format=%H) - git clone --depth 1 https://github.com/AIDASoft/podio cd podio - mkdir build install - cd build + echo "Building podio @"$(git log -1 --format=%H) cmake .. -DCMAKE_CXX_STANDARD=20 \ -DENABLE_SIO=ON \ -DBUILD_TESTING=OFF \ - -DCMAKE_INSTALL_PREFIX=$(pwd)/../install \ - -G Ninja - ninja -k0 - ninja install - cd .. - export ROOT_INCLUDE_PATH=$(pwd)/install/include:$ROOT_INCLUDE_PATH:$CPATH - unset CPATH - export CMAKE_PREFIX_PATH=$(pwd)/install:$CMAKE_PREFIX_PATH - export LD_LIBRARY_PATH=$(pwd)/install/lib:$(pwd)/install/lib64:$LD_LIBRARY_PATH + -DCMAKE_INSTALL_PREFIX=$(pwd)/install \ + -G Ninja -B build + cmake --build build --target install + source init.sh && env.sh echo "::endgroup::" echo "::group::Run pre-commit" cd $STARTDIR export PYTHONPATH=$(python -m site --user-site):$PYTHONPATH export PATH=/root/.local/bin:$PATH pip install argparse --user - mkdir build - cd build cmake .. -DENABLE_SIO=ON \ -DCMAKE_CXX_STANDARD=20 \ -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always -Werror "\ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - -DUSE_EXTERNAL_CATCH2=OFF - ln -s $(pwd)/compile_commands.json ../ - cd .. + -DUSE_EXTERNAL_CATCH2=OFF -B build + ln -s $(pwd)/build/compile_commands.json ./compile_commands.json pip install pre-commit --user pre-commit run --show-diff-on-failure \ --color=always \