Skip to content

core: compiler changed to cl.exe #55

core: compiler changed to cl.exe

core: compiler changed to cl.exe #55

name: datastructures-algorithms-ci-cd-windows
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
run: |
choco install cmake -y
choco install ninja -y
choco install llvm -y
- name: Configure CMake
run: cmake -S . -B build -G "Ninja" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Run clang-tidy
run: |
(Get-ChildItem -Path include -Recurse -Include *.h,*.hpp).FullName +
(Get-ChildItem -Path source -Recurse -Include *.cpp,*.cc,*.cxx).FullName |
ForEach-Object { clang-tidy -p build --warnings-as-errors=* $_ }
- name: Build
run: cmake --build build
- name: Run tests
run: ctest --test-dir build --output-on-failure