Skip to content

Chore/clang tidy ci #52

Chore/clang tidy ci

Chore/clang tidy ci #52

Workflow file for this run

name: Test and Lint
on:
push:
branches: ["main", "dev"]
pull_request:
branches: ["main", "dev"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y cmake g++
- name: Configure CMake
run: cmake -S . -B build
- name: Build
run: cmake --build build
- uses: actions/upload-artifact@v4
with:
name: built
path: ./build
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: built
path: ./build
- name: run-tests
run: ctest --test-dir build --output-on-failure
lint:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/download-artifact@v4
with:
name: built
path: ./build
- name: Get clang-tidy
run: sudo apt-get update && sudo apt-get install -y cmake clang clang-tidy g++
- name: lint
run: ./run-clang-tidy.py -p build -source-filter '^(?!.*_deps/googletest-src/).*'