Vss modeling #379
Workflow file for this run
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
name: cpp-linter | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
cpp-linter: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: download-gurobi-linux | |
shell: bash | |
run: | | |
wget https://packages.gurobi.com/10.0/gurobi10.0.2_linux64.tar.gz | |
tar -xvzf gurobi10.0.2_linux64.tar.gz | |
- name: Generate compilation database | |
run: | | |
CC=clang-14 CXX=clang++-14 \ | |
cmake -S . -B build \ | |
-DBUILD_TESTS=ON \ | |
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
- name: Run cpp-linter | |
id: linter | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
pipx run cpp-linter \ | |
--version=14 \ | |
--style="" \ | |
--tidy-checks="" \ | |
--thread-comments=true \ | |
--files-changed-only=true \ | |
--ignore="build" \ | |
--database=build | |
- name: Fail if linter found errors | |
if: steps.linter.outputs.checks-failed > 0 | |
run: echo "Linter found errors" && exit 1 |