Skip to content

Commit b1df317

Browse files
committed
Update datastructures-algorithms-ci-cd.yaml
1 parent 6875ac1 commit b1df317

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed
Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: datastructures-algorithms-ci-cd
1+
name: datastructures-algorithms-ci-cd-windows
22

33
on:
44
push:
@@ -8,39 +8,34 @@ on:
88

99
jobs:
1010
lint-build-test:
11-
runs-on: windows-2022
11+
runs-on: windows-latest
1212

1313
steps:
1414
- name: Checkout code
1515
uses: actions/checkout@v3
1616

1717
- name: Setup MSVC
1818
uses: ilammy/msvc-dev-cmd@v1
19+
with:
20+
arch: x64
1921

2022
- name: Install dependencies
2123
run: |
22-
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
24+
choco install cmake -y
2325
choco install ninja -y
2426
choco install llvm -y
2527
26-
- name: Add LLVM to PATH
27-
run: echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
28-
2928
- name: Configure CMake
30-
run: cmake -S . -B build -G "Ninja" -DCMAKE_CXX_CLANG_TIDY=clang-tidy -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
29+
run: cmake -S . -B build -G "Ninja" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
3130

3231
- name: Run clang-tidy
33-
shell: pwsh
3432
run: |
35-
clang-tidy --version
36-
$files = Get-ChildItem -Recurse -Path include, source -Include *.cpp,*.cc,*.cxx,*.h,*.hpp -File
37-
foreach ($file in $files) {
38-
Write-Host "Running clang-tidy on $($file.FullName)"
39-
clang-tidy -p build "$($file.FullName)" --warnings-as-errors=*
40-
}
33+
(Get-ChildItem -Path include -Recurse -Include *.h,*.hpp).FullName +
34+
(Get-ChildItem -Path source -Recurse -Include *.cpp,*.cc,*.cxx).FullName |
35+
ForEach-Object { clang-tidy -p build --warnings-as-errors=* $_ }
4136
4237
- name: Build
4338
run: cmake --build build
4439

4540
- name: Run tests
46-
run: ctest --test-dir build --output-on-failure
41+
run: ctest --test-dir build --output-on-failure

0 commit comments

Comments
 (0)