@@ -17,13 +17,17 @@ jobs:
17
17
- uses : actions/checkout@v4
18
18
name : Checkout the repository
19
19
20
- # Step 2: Setup CMake
20
+ # Step 2: Setup Visual Studio Build Tools
21
+ - name : Setup Visual Studio Build Tools
22
+ uses : microsoft/setup-msbuild@v1.3.1
23
+
24
+ # Step 3: Setup CMake
21
25
- name : Setup CMake
22
26
uses : jwlawson/actions-setup-cmake@v1.14
23
27
with :
24
28
cmake-version : 3.28.0
25
29
26
- # Step 3 : Setup Ninja
30
+ # Step 4 : Setup Ninja
27
31
- name : Setup Ninja
28
32
uses : actions/setup-python@v5
29
33
with :
@@ -34,25 +38,28 @@ jobs:
34
38
python -m pip install ninja
35
39
echo "$env:LOCALAPPDATA\Python\Python311\Scripts" >> $env:GITHUB_PATH
36
40
37
- # Step 4 : Verify tools availability
41
+ # Step 5 : Verify tools availability
38
42
- name : Verify tools
39
43
run : |
40
44
cmake --version
41
45
ninja --version
46
+ cl
47
+ echo "Using Visual Studio compiler:"
48
+ cl 2>&1 | Select-String "Microsoft"
42
49
43
- # Step 5 : Configure CMake
50
+ # Step 6 : Configure CMake with Visual Studio
44
51
- 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
46
53
47
- # Step 6 : Build with CMake
54
+ # Step 7 : Build with CMake
48
55
- name : Build with CMake
49
56
run : cmake --build build --config Release
50
57
51
- # Step 7 : Verify if build files are generated
58
+ # Step 8 : Verify if build files are generated
52
59
- name : List build directory contents
53
60
run : Get-ChildItem -Path build -Recurse | Select-Object Name, FullName
54
61
55
- # Step 8 : Generate Doxygen documentation
62
+ # Step 9 : Generate Doxygen documentation
56
63
- name : Generate Doxygen documentation
57
64
run : |
58
65
# Install Doxygen if not available
@@ -61,18 +68,18 @@ jobs:
61
68
}
62
69
doxygen Doxyfile
63
70
64
- # Step 9 : Verify if documentation files are generated
71
+ # Step 10 : Verify if documentation files are generated
65
72
- name : List documentation directory contents
66
73
run : Get-ChildItem -Path docs -Recurse | Select-Object Name, FullName
67
74
68
- # Step 10 : Upload documentation as an artifact (if files exist)
75
+ # Step 11 : Upload documentation as an artifact (if files exist)
69
76
- name : Upload documentation
70
77
uses : actions/upload-artifact@v4
71
78
with :
72
79
name : cpp_documentation_windows
73
80
path : docs
74
81
75
- # Step 11 : Upload build artifacts as an artifact (if files exist)
82
+ # Step 12 : Upload build artifacts as an artifact (if files exist)
76
83
- name : Upload build artifacts
77
84
uses : actions/upload-artifact@v4
78
85
with :
89
96
- uses : actions/checkout@v4
90
97
name : Checkout the repository
91
98
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
+ uses : microsoft/setup-msbuild@v1.3.1
102
+
103
+ # Step 3: Create a GitHub release using the version tag (e.g., v1.0.0, v1.0.1)
93
104
- name : Create Release
94
105
id : create_release
95
106
uses : actions/create-release@v1
@@ -103,7 +114,7 @@ jobs:
103
114
draft : false
104
115
prerelease : false
105
116
106
- # Step 3 : Upload build artifacts to release
117
+ # Step 4 : Upload build artifacts to release
107
118
- name : Upload build artifacts to release
108
119
uses : actions/upload-release-asset@v1
109
120
with :
@@ -112,7 +123,7 @@ jobs:
112
123
asset_name : main_windows.exe # Adjust this to name the artifact file
113
124
asset_content_type : application/octet-stream
114
125
115
- # Step 4 : Upload documentation to release
126
+ # Step 5 : Upload documentation to release
116
127
- name : Upload documentation to release
117
128
uses : actions/upload-release-asset@v1
118
129
with :
0 commit comments