Commit 94f00156 authored by Paul Schütze's avatar Paul Schütze
Browse files

Separate compilation/testing and formatting/lint in github CI

parent c982b08f
Loading
Loading
Loading
Loading
+0 −53
Original line number Diff line number Diff line
@@ -110,56 +110,3 @@ jobs:
          chmod a+x bin/allpix
          cd build
          ctest -R ${{matrix.whichtest}} --output-on-failure -j4

  format:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - uses: cvmfs-contrib/github-action-cvmfs@v2
    - uses: aidasoft/run-lcg-view@v2
      with:
        run_local_checkout: 'false'
        release-platform: "${{env.LCG_VERSION}}/x86_64-centos7-clang10-opt"
        run: |
          mkdir build
          cd build
          cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DBUILD_LCIOWriter=ON -DCMAKE_BUILD_TYPE=RELEASE -DLCIO_DIR=$LCIO_DIR ..
          ninja check-format

  lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - uses: cvmfs-contrib/github-action-cvmfs@v2
    - uses: aidasoft/run-lcg-view@v2
      with:
        run_local_checkout: 'false'
        release-platform: "${{env.LCG_VERSION}}/x86_64-centos7-clang10-opt"
        run: |
          mkdir build
          cd build
          cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DBUILD_LCIOWriter=ON -DCMAKE_BUILD_TYPE=RELEASE -DLCIO_DIR=$LCIO_DIR ..
          ninja check-lint

  cmake-lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - uses: cvmfs-contrib/github-action-cvmfs@v2
    - uses: aidasoft/run-lcg-view@v2
      with:
        run_local_checkout: 'false'
        release-platform: "${{env.LCG_VERSION}}/x86_64-centos7-clang10-opt"
        run: |
          mkdir build
          cd build
          export PATH=$PATH:~/.local/bin
          pip install --trusted-host=pypi.org --user cmakelang
          cmake -GNinja ..
          ninja lint-cmake
+60 −0
Original line number Diff line number Diff line
name: format-and-lint
on:
  pull_request:
    types: [opened, reopened, edited, ready_for_review, synchronize]
env:
  LCG_VERSION: LCG_99
jobs:

  format:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - uses: cvmfs-contrib/github-action-cvmfs@v2
    - uses: aidasoft/run-lcg-view@v2
      with:
        run_local_checkout: 'false'
        release-platform: "${{env.LCG_VERSION}}/x86_64-centos7-clang10-opt"
        run: |
          mkdir build
          cd build
          cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DBUILD_LCIOWriter=ON -DCMAKE_BUILD_TYPE=RELEASE -DLCIO_DIR=$LCIO_DIR ..
          ninja check-format

  lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - uses: cvmfs-contrib/github-action-cvmfs@v2
    - uses: aidasoft/run-lcg-view@v2
      with:
        run_local_checkout: 'false'
        release-platform: "${{env.LCG_VERSION}}/x86_64-centos7-clang10-opt"
        run: |
          mkdir build
          cd build
          cmake -GNinja -DCMAKE_CXX_FLAGS="-Werror" -DBUILD_LCIOWriter=ON -DCMAKE_BUILD_TYPE=RELEASE -DLCIO_DIR=$LCIO_DIR ..
          ninja check-lint

  cmake-lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - uses: cvmfs-contrib/github-action-cvmfs@v2
    - uses: aidasoft/run-lcg-view@v2
      with:
        run_local_checkout: 'false'
        release-platform: "${{env.LCG_VERSION}}/x86_64-centos7-clang10-opt"
        run: |
          mkdir build
          cd build
          export PATH=$PATH:~/.local/bin
          pip install --trusted-host=pypi.org --user cmakelang
          cmake -GNinja ..
          ninja lint-cmake