1- name : datastructures-algorithms-tag-and-release
1+ name : datastructures-algorithms-deploy
22
33# Triggers only when a PR to 'main' is closed
44on :
@@ -13,57 +13,9 @@ permissions:
1313 pull-requests : read # To read the PR body
1414
1515jobs :
16- # --- Job 1: Lint, Build, and Test ---
17- lint-build-test :
18- # This job only runs if the PR was actually merged
19- if : github.event.pull_request.merged == true
20- runs-on : windows-latest
21-
22- steps :
23- - name : Checkout code
24- uses : actions/checkout@v4 # Use v4
25-
26- - name : Setup MSVC
27- uses : ilammy/msvc-dev-cmd@v1
28- with :
29- arch : x64
30-
31- - name : Install dependencies
32- shell : pwsh
33- run : |
34- choco install cmake -y
35- choco install ninja -y
36- choco install llvm -y
37-
38- - name : Configure CMake
39- shell : pwsh
40- run : cmake -S . -B build -G "Ninja" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
41-
42- - name : Run clang-tidy
43- shell : pwsh
44- run : |
45- clang-tidy --version
46- $files = Get-ChildItem -Recurse -Path source -Include *.cpp,*.cc,*.cxx -File
47-
48- # These source/.* files would be checked using .clang-tidy maintained at projectroot
49- foreach ($file in $files) {
50- Write-Host "Running clang-tidy on source $($file.FullName)"
51- clang-tidy -p build "$($file.FullName)" --warnings-as-errors=*
52- }
53-
54- - name : Build
55- shell : pwsh
56- run : cmake --build build
57-
58- - name : Run tests
59- shell : pwsh
60- run : ctest --test-dir build --output-on-failure
61-
62- # --- Job 2: Create Tag and Release ---
16+ # --- Job 1: Create Tag and Release ---
6317 create-tag-and-release :
64- # This job MUST wait for the 'lint-build-test' job to succeed
65- needs : lint-build-test
66-
18+
6719 # This job only runs if:
6820 # 1. The PR was actually merged (implicit from 'needs', but good to be explicit).
6921 # 2. The PR was from a branch named exactly 'release'.
0 commit comments