diff --git a/.github/workflows/test-library.yml b/.github/workflows/test-library.yml index 5bb20daf6..482ebb917 100644 --- a/.github/workflows/test-library.yml +++ b/.github/workflows/test-library.yml @@ -159,6 +159,43 @@ jobs: uses: github/codeql-action/analyze@v2 +static-analyser: + name: Clang Static Analyser + runs-on: ubuntu-latest + needs: basicchecks + + steps: + - uses: actions/checkout@v3 + + - name: Install build dependencies for library + run: | + sudo apt-get -y install tcl8.6-dev \ + sudo apt-get -y install + + - name: Checkout OpenMM (for Lepton library) + uses: actions/checkout@v3 + with: + repository: 'openmm/openmm' + ref: 'master' + path: 'openmm-source' + + - name: Perform Clang Static Analyser + env: + CMAKE_BUILD_DIR: build-clang + CCACHE: ccache + CXX: clang++ + CC: clang + run: scan-build-11 --use-cc=clang --use-c++=clang++ cmake -P devel-tools/build_test_library.cmake 2>&1 | tee build_analyser.log \ + # Retrieve warnings generated but not the ones of OpenMM + awk '/warning/,/warning.*generated|^$/' buildLogFile.log | awk '!/openmm.*warning/,/warning.*generated|^$/ | tee warnings_analyser.log + + - name: Archive warnings artifacts + uses: actions/upload-artifact@v3 + with: + name: warnings_analyser + path: warnings_analyser.log + + build-linux-x86_64-many: name: Linux x86_64 (many compilers) runs-on: ubuntu-latest