Skip to content

Heuristic route generation #856

Heuristic route generation

Heuristic route generation #856

Workflow file for this run

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: Read current gurobi Version
uses: zlatko-ms/varfiletoenv@v3
with:
paths: ./.github/gurobi_version.json
- name: download-gurobi-linux
env:
GUROBI_VERSION_SHORT: ${{ env.gurobiShortVersion }}
GUROBI_VERSION: ${{ env.gurobiVersion }}
GUROBI_VERSION_FOLDER: ${{ env.gurobiFolder }}
GUROBI_FILE: gurobi${{ env.gurobiVersion }}_linux64.tar.gz
run: |
wget https://packages.gurobi.com/${{ env.GUROBI_VERSION_SHORT }}/${{ env.GUROBI_FILE }}
tar -xvzf ${{ env.GUROBI_FILE }}
- 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 \
--ignore="build | test/example-networks | test/example-networks-gen-po | gurobi*" \
--database=build
- name: Fail if linter found errors
if: steps.linter.outputs.checks-failed > 0
run: echo "Linter found errors" && exit 1