core: compiler changed to cl.exe #63
Workflow file for this run
This file contains hidden or 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: 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 | |
$headerFiles = Get-ChildItem -Recurse -Path include -Include *.h,*.hpp -File | |
$sourceFiles = Get-ChildItem -Recurse -Path source -Include *.cpp,*.cc,*.cxx -File | |
# Process header files with explicit header treatment | |
foreach ($file in $headerFiles) { | |
Write-Host "Running clang-tidy on header $($file.FullName)" | |
clang-tidy -p build "$($file.FullName)" --warnings-as-errors=* --extra-arg=-xc++-header | |
} | |
# Process source files normally | |
foreach ($file in $sourceFiles) { | |
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 |