Skip to content

Rearchitect and Reinstate GPU #1

Rearchitect and Reinstate GPU

Rearchitect and Reinstate GPU #1

Workflow file for this run

name: Code Analysis
on: [pull_request]
jobs:
Code-Analysis:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update && sudo apt install cppcheck -y
pip3 install --upgrade setuptools
pip3 install pygithub
- name: Install CUDA Toolkit
uses: Jimver/[email protected]
with:
method: network
use-github-cache: false
use-local-cache: false
- name: Configure NiftyReg
run: |
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_ALL_DEP=ON \
-DCHECK_GPU=OFF \
-DUSE_CUDA=ON \
-DUSE_OPENCL=ON \
-DUSE_SSE=ON \
-DUSE_OPENMP=ON \
-DBUILD_TESTING=OFF \
-DWITH_COVERAGE=OFF \
..
- name: Code Analysis
env:
COMMENT_TITLE: Code Analysis Results
PR_NUMBER: ${{ github.event.pull_request.number }}
REPORT_PR_CHANGES_ONLY: false
GITHUB_TOKEN: ${{ github.token }}
run: |
cppcheck -j 4 --enable=warning,style,performance,portability --project=build/compile_commands.json --output-file=analysis.txt
python3 ${{ github.workspace }}/.github/code_analysis.py -cc analysis.txt