Skip to content

Merge pull request #87 from Debashis08/feature-update-from-main #75

Merge pull request #87 from Debashis08/feature-update-from-main

Merge pull request #87 from Debashis08/feature-update-from-main #75

name: datastructures-algorithms-ci-cd
on:
push:
branches: [ main, release ]
pull_request:
branches: [ main, release ]
jobs:
lint-build-test:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install dependencies
shell: pwsh
run: |
choco install cmake -y
choco install ninja -y
choco install llvm -y
- name: Configure CMake
shell: pwsh
run: cmake -S . -B build -G "Ninja" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Run clang-tidy
shell: pwsh
run: |
clang-tidy --version
$files = Get-ChildItem -Recurse -Path source -Include *.cpp,*.cc,*.cxx -File
# These source/.* files would be checked using .clang-tidy maintained at projectroot
foreach ($file in $files) {
Write-Host "Running clang-tidy on source $($file.FullName)"
clang-tidy -p build "$($file.FullName)" --warnings-as-errors=*
}
- name: Build
shell: pwsh
run: cmake --build build
- name: Run tests
shell: pwsh
run: ctest --test-dir build --output-on-failure