Skip to content

test

test #3444

# Workflow syntax:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: cpp-linter
on:
push:
paths-ignore: "docs/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
cpp-linter:
runs-on: ubuntu-latest
container:
image: pveleskopglc/chipstar:cpp-linter
options: --user chipStarUser
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Load modules
run: ml StdEnv; . /home/chipStarUser/venv/bin/activate;
echo "CPATH=$CPATH" >> $GITHUB_ENV;
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV;
echo "LIBRARY_PATH=$LIBRARY_PATH" >> $GITHUB_ENV;
echo "PATH=$PATH" >> $GITHUB_ENV;
shell: bash
- name: Add includes
run: touch `pwd`/include/chipStarConfig.hh;
export CPATH=`pwd`/include/:$CPATH;
export CPATH=`pwd`/HIP/include/:$CPATH;
export CPATH=`pwd`/spirv-extractor/SPIRV-Tools/include/:$CPATH;
echo "CPATH=$CPATH" >> $GITHUB_ENV;
shell: bash
- name: show env
run: echo "$CPATH";
echo "$LD_LIBRARY_PATH";
echo "$LIBRARY_PATH";
echo "$PATH";
shell: bash
- name: C/C++ Linter
id: linter
shell: bash
run: |
cpp-linter \
--style="file" \
--extensions=cc,hh \
--tidy-checks="-*,readability-*,modernize-*,clang-analyzer-*" \
--repo-root=. \
--version=15 \
--verbosity=info \
--lines-changed-only="true" \
--files-changed-only="true" \
--thread-comments="false" \
--no-lgtm=true \
--step-summary="false" \
--ignore=".github" \
--database= \
--file-annotations=true \
--extra-arg="-std=c++17" \
--tidy-review="false" \
--format-review="false"
- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
run: exit 1