@@ -17,13 +17,17 @@ jobs:
1717 - uses : actions/checkout@v4
1818 name : Checkout the repository
1919
20- # Step 2: Setup CMake
20+ # Step 2: Setup Visual Studio Build Tools
21+ - name : Setup Visual Studio Build Tools
22+ 23+
24+ # Step 3: Setup CMake
2125 - name : Setup CMake
22262327 with :
2428 cmake-version : 3.28.0
2529
26- # Step 3 : Setup Ninja
30+ # Step 4 : Setup Ninja
2731 - name : Setup Ninja
2832 uses : actions/setup-python@v5
2933 with :
@@ -34,25 +38,28 @@ jobs:
3438 python -m pip install ninja
3539 echo "$env:LOCALAPPDATA\Python\Python311\Scripts" >> $env:GITHUB_PATH
3640
37- # Step 4 : Verify tools availability
41+ # Step 5 : Verify tools availability
3842 - name : Verify tools
3943 run : |
4044 cmake --version
4145 ninja --version
46+ cl
47+ echo "Using Visual Studio compiler:"
48+ cl 2>&1 | Select-String "Microsoft"
4249
43- # Step 5 : Configure CMake
50+ # Step 6 : Configure CMake with Visual Studio
4451 - name : Configure CMake
45- run : cmake -S . -G "Ninja Multi-Config" -B build -DCMAKE_CXX_FLAGS="/W3"
52+ run : cmake -S . -G "Ninja Multi-Config" -B build -DCMAKE_CXX_FLAGS="/W3" -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl
4653
47- # Step 6 : Build with CMake
54+ # Step 7 : Build with CMake
4855 - name : Build with CMake
4956 run : cmake --build build --config Release
5057
51- # Step 7 : Verify if build files are generated
58+ # Step 8 : Verify if build files are generated
5259 - name : List build directory contents
5360 run : Get-ChildItem -Path build -Recurse | Select-Object Name, FullName
5461
55- # Step 8 : Generate Doxygen documentation
62+ # Step 9 : Generate Doxygen documentation
5663 - name : Generate Doxygen documentation
5764 run : |
5865 # Install Doxygen if not available
@@ -61,18 +68,18 @@ jobs:
6168 }
6269 doxygen Doxyfile
6370
64- # Step 9 : Verify if documentation files are generated
71+ # Step 10 : Verify if documentation files are generated
6572 - name : List documentation directory contents
6673 run : Get-ChildItem -Path docs -Recurse | Select-Object Name, FullName
6774
68- # Step 10 : Upload documentation as an artifact (if files exist)
75+ # Step 11 : Upload documentation as an artifact (if files exist)
6976 - name : Upload documentation
7077 uses : actions/upload-artifact@v4
7178 with :
7279 name : cpp_documentation_windows
7380 path : docs
7481
75- # Step 11 : Upload build artifacts as an artifact (if files exist)
82+ # Step 12 : Upload build artifacts as an artifact (if files exist)
7683 - name : Upload build artifacts
7784 uses : actions/upload-artifact@v4
7885 with :
8996 - uses : actions/checkout@v4
9097 name : Checkout the repository
9198
92- # Step 2: Create a GitHub release using the version tag (e.g., v1.0.0, v1.0.1)
99+ # Step 2: Setup Visual Studio Build Tools
100+ - name : Setup Visual Studio Build Tools
101+ 102+
103+ # Step 3: Create a GitHub release using the version tag (e.g., v1.0.0, v1.0.1)
93104 - name : Create Release
94105 id : create_release
95106 uses : actions/create-release@v1
@@ -103,7 +114,7 @@ jobs:
103114 draft : false
104115 prerelease : false
105116
106- # Step 3 : Upload build artifacts to release
117+ # Step 4 : Upload build artifacts to release
107118 - name : Upload build artifacts to release
108119 uses : actions/upload-release-asset@v1
109120 with :
@@ -112,7 +123,7 @@ jobs:
112123 asset_name : main_windows.exe # Adjust this to name the artifact file
113124 asset_content_type : application/octet-stream
114125
115- # Step 4 : Upload documentation to release
126+ # Step 5 : Upload documentation to release
116127 - name : Upload documentation to release
117128 uses : actions/upload-release-asset@v1
118129 with :
0 commit comments