Merge pull request #3949 from Yi-FanLi/pimd_langevin_fix_t_prim #125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub action to run static code analysis on C++ and Python code | |
name: "CodeQL Code Analysis" | |
on: | |
push: | |
branches: [develop] | |
workflow_dispatch: | |
jobs: | |
analyze: | |
name: Analyze | |
if: ${{ github.repository == 'lammps/lammps' }} | |
runs-on: ubuntu-latest | |
permissions: | |
security-events: write | |
actions: read | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ['cpp', 'python'] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
config-file: ./.github/codeql/${{ matrix.language }}.yml | |
- name: Create Build Environment | |
if: ${{ matrix.language == 'cpp' }} | |
run: mkdir build | |
- name: Building LAMMPS via CMake | |
if: ${{ matrix.language == 'cpp' }} | |
shell: bash | |
working-directory: build | |
run: | | |
cmake -C ../cmake/presets/most.cmake \ | |
-D DOWNLOAD_POTENTIALS=off \ | |
../cmake | |
cmake --build . --parallel 2 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |