99 with :
1010 msbuild-architecture : x64
1111
12- # Cache Xerces-C to avoid rebuilding (saves ~8-12 minutes on cache hit)
13- - name : Cache Xerces-C Debug build
14- uses : actions/cache@v4
15- id : cache-xerces-debug
16- with :
17- path : xerces-c/build/libs
18- key : xerces-c-3.3.0-windows-debug-asan-${{ runner.os }}-v1
19- restore-keys : |
20- xerces-c-3.3.0-windows-debug-asan-${{ runner.os }}-
21-
12+ # --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2213 # Xerces-C - setup
2314 - name : Xerces-C - prepare
24- if : steps.cache-xerces-debug.outputs.cache-hit != 'true'
2515 shell : cmd
2616 run : |
2717 mkdir xerces-c
2818 cd xerces-c
29- curl -sL - o xerces-c.zip https://dlcdn.apache.org//xerces/c/3/sources/xerces-c-3.3.0.zip
19+ curl -o xerces-c.zip https://dlcdn.apache.org//xerces/c/3/sources/xerces-c-3.3.0.zip
3020 tar -xf xerces-c.zip --strip-components=1
3121
32- # Xerces-C - build Debug (without ASAN - only libMVRgdtf will have ASAN)
33- - name : Xerces-C - configure Debug
34- if : steps.cache-xerces-debug.outputs.cache-hit != 'true'
22+ # Xerces-C - build MD
23+ - name : Xerces-C - configure
3524 working-directory : xerces-c
3625 shell : cmd
3726 run : |
3827 mkdir build
3928 cd build
40- cmake .. -G "Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX:PATH=libs -DCMAKE_CXX_FLAGS_DEBUG="/MTd /Zi /Ob0 /Od /RTC1" -DCMAKE_C_FLAGS_DEBUG="/MTd /Zi /Ob0 /Od /RTC1" -DCMAKE_C_FLAGS="/DWIN32 /D_WINDOWS /W3" -DBUILD_SHARED_LIBS:BOOL=FALSE -Dxmlch-type=wchar_t
29+ cmake .. -G "Visual Studio 17 2022" -A x64 -T v142,version=14.29 -DCMAKE_INSTALL_PREFIX:PATH=libs -DCMAKE_CXX_FLAGS="/DWIN32 /D_WINDOWS -O2 -Ob2 -DNDEBUG" -DCMAKE_C_FLAGS="/DWIN32 /D_WINDOWS /W3" -DBUILD_SHARED_LIBS:BOOL=FALSE -Dxmlch-type=wchar_t
30+
31+ - name : Xerces-C - build MinSizeRel
32+ working-directory : xerces-c/build
33+ shell : cmd
34+ run : |
35+ msbuild /m ALL_BUILD.vcxproj /p:Configuration=MinSizeRel
36+ msbuild /m INSTALL.vcxproj /p:Configuration=MinSizeRel
4137
4238 - name : Xerces-C - build Debug
43- if : steps.cache-xerces-debug.outputs.cache-hit != 'true'
4439 working-directory : xerces-c/build
4540 shell : cmd
4641 run : |
47- msbuild /m /maxcpucount ALL_BUILD.vcxproj /p:Configuration=Debug
48- msbuild /m /maxcpucount INSTALL.vcxproj /p:Configuration=Debug
42+ msbuild /m ALL_BUILD.vcxproj /p:Configuration=Debug
43+ msbuild /m INSTALL.vcxproj /p:Configuration=Debug
44+
45+ # Xerces-C - build MT
46+ - name : Xerces-C - configure [MT]
47+ working-directory : xerces-c
48+ shell : cmd
49+ run : |
50+ mkdir build_mt
51+ cd build_mt
52+ cmake .. -G "Visual Studio 17 2022" -A x64 -T v142,version=14.29 -DCMAKE_INSTALL_PREFIX:PATH=libs -DCMAKE_CXX_FLAGS_DEBUG="/MTd /Zi /Ob0 /Od /RTC1" -DCMAKE_CXX_FLAGS_MINSIZEREL="/MT /O1 /Ob1 /DNDEBUG" -DCMAKE_C_FLAGS_DEBUG="/MTd /Zi /Ob0 /Od /RTC1" -DCMAKE_C_FLAGS_MINSIZEREL="/MT /O1 /Ob1 /DNDEBUG" -DCMAKE_C_FLAGS="/DWIN32 /D_WINDOWS /W3" -DBUILD_SHARED_LIBS:BOOL=FALSE -Dxmlch-type=wchar_t
4953
54+ - name : Xerces-C - build MinSizeRel [MT]
55+ working-directory : xerces-c/build_mt
56+ shell : cmd
57+ run : |
58+ msbuild /m ALL_BUILD.vcxproj /p:Configuration=MinSizeRel
59+ msbuild /m INSTALL.vcxproj /p:Configuration=MinSizeRel
60+
61+ - name : Xerces-C - build Debug [MT]
62+ working-directory : xerces-c/build_mt
63+ shell : cmd
64+ run : |
65+ msbuild /m ALL_BUILD.vcxproj /p:Configuration=Debug
66+ msbuild /m INSTALL.vcxproj /p:Configuration=Debug
67+
68+ # --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
5069 # Boost - setup and build
5170 - name : Boost - prepare
5271 shell : cmd
@@ -56,26 +75,26 @@ runs:
5675 curl -o boost.zip https://archives.boost.io/release/1.86.0/source/boost_1_86_0.zip
5776 tar -xf boost.zip --strip-components=1
5877
59- # Note: BUILD_MVR_XCHANGE is disabled - Boost not needed for ASAN builds
60-
78+ # --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6179 # libMVRGdtf - setup
6280 - name : libMVRGdtf - checkout repository
6381 uses : actions/checkout@v4
6482 with :
6583 path : libMvrGdtf
6684
67- # libMVRGdtf [ASAN] - Debug build (uses default VS 2022 toolset for ASAN support)
68- - name : libMVRGdtf [ASAN ] - configure Debug
85+ # --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
86+ - name : libMVRGdtf [MD_NO_MZ ] - configure
6987 working-directory : libMvrGdtf
7088 shell : cmd
7189 run : |
72- mkdir build_ASAN
73- cd build_ASAN
74- cmake .. -G "Visual Studio 17 2022" -A x64 - T v142,version=14.29 -DCMAKE_INSTALL_PREFIX:PATH=libs - DWIN_RUNTIME_LIB=-MT -DENABLE_ASAN=TRUE -DXERCES_INCLUDE_PATH="..\xerces-c\build\libs\include;..\xerces\src" -DXERCES_LIB_PATH="..\xerces-c \build\libs\lib" -DXERCES_ROOT_PATH="..\xerces-c" -DLIB_OUTPUT_NAME="MvrGdtf_ASAN"
90+ mkdir build_MD_NO_MZ
91+ cd build_MD_NO_MZ
92+ cmake .. -DCMAKE_INSTALL_PREFIX:PATH=libs - T v142,version=14.29 -DWIN_RUNTIME_LIB=-MD -DENABLE_ASAN=TRUE -DXERCES_INCLUDE_PATH="..\xerces-c\build\libs\include;..\xerces\src" -DXERCES_LIB_PATH="..\xerces\build\libs\lib" -DXERCES_ROOT_PATH="..\xerces-c" -DDO_NOT_INCLUDE_MINI_ZIP=TRUE
7593 ren MvrGdtf.vcxproj MvrGdtf_ORG.vcxproj
7694
77- - name : libMVRGdtf [ASAN] - Debug - add lib dependencies
78- working-directory : libMvrGdtf/build_ASAN
95+ # libMVRGdtf - build Debug
96+ - name : libMVRGdtf [MD_NO_MZ] - Debug - add lib dependencies
97+ working-directory : libMvrGdtf/build_MD_NO_MZ
7998 shell : pwsh
8099 run : |
81100 $xml = [xml](Get-Content MvrGdtf_ORG.vcxproj)
@@ -86,25 +105,46 @@ runs:
86105 }
87106 Set-Content -Path "MvrGdtf.vcxproj" -Value $xml.OuterXml
88107
89- - name : libMVRGdtf [ASAN] - compile Debug
90- working-directory : libMvrGdtf/build_ASAN
108+ - name : libMVRGdtf [MD_NO_MZ] - compile Debug
109+ working-directory : libMvrGdtf/build_MD_NO_MZ
110+ shell : cmd
111+ run : |
112+ msbuild /m ALL_BUILD.vcxproj /p:Configuration=Debug
113+ msbuild /m INSTALL.vcxproj /p:Configuration=Debug
114+
115+ # libMVRGdtf - build MinSizeRel
116+ - name : libMVRGdtf [MD_NO_MZ] - MinSizeRel - add lib dependencies
117+ working-directory : libMvrGdtf/build_MD_NO_MZ
118+ shell : pwsh
119+ run : |
120+ $xml = [xml](Get-Content MvrGdtf_ORG.vcxproj)
121+ $xml.Project.ItemDefinitionGroup | ForEach-Object {
122+ $node = $xml.CreateElement("AdditionalDependencies", "http://schemas.microsoft.com/developer/msbuild/2003")
123+ $node.InnerText = 'iphlpapi.lib;..\..\xerces-c\build\libs\lib\xerces-c_3.lib;mdns_cpp\lib\MinSizeRel\mdns_cpp.lib;%(AdditionalDependencies)'
124+ $_.Lib.AppendChild($node) | Out-Null
125+ }
126+ Set-Content -Path "MvrGdtf.vcxproj" -Value $xml.OuterXml
127+
128+ - name : libMVRGdtf [MD_NO_MZ] - compile MinSizeRel
129+ working-directory : libMvrGdtf/build_MD_NO_MZ
91130 shell : cmd
92131 run : |
93- msbuild /m /maxcpucount ALL_BUILD.vcxproj /p:Configuration=Debug
94- msbuild /m /maxcpucount INSTALL.vcxproj /p:Configuration=Debug
132+ msbuild /m ALL_BUILD.vcxproj /p:Configuration=MinSizeRel
133+ msbuild /m INSTALL.vcxproj /p:Configuration=MinSizeRel
95134
96- # libMVRGdtf [ASAN_NO_MZ] - Debug build without MiniZip (uses default VS 2022 toolset)
97- - name : libMVRGdtf [ASAN_NO_MZ ] - configure Debug
135+ # --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
136+ - name : libMVRGdtf [MD ] - configure
98137 working-directory : libMvrGdtf
99138 shell : cmd
100139 run : |
101- mkdir build_ASAN_NO_MZ
102- cd build_ASAN_NO_MZ
103- cmake .. -G "Visual Studio 17 2022" -A x64 - T v142,version=14.29 -DCMAKE_INSTALL_PREFIX:PATH=libs - DWIN_RUNTIME_LIB=-MT -DENABLE_ASAN=TRUE -DDO_NOT_INCLUDE_MINI_ZIP=TRUE - DXERCES_INCLUDE_PATH="..\xerces-c\build\libs\include;..\xerces\src" -DXERCES_LIB_PATH="..\xerces-c \build\libs\lib" -DXERCES_ROOT_PATH="..\xerces-c" -DLIB_OUTPUT_NAME="MvrGdtf_ASAN "
140+ mkdir build_MD
141+ cd build_MD
142+ cmake .. -DCMAKE_INSTALL_PREFIX:PATH=libs - T v142,version=14.29 -DWIN_RUNTIME_LIB=-MD -DENABLE_ASAN=TRUE -DXERCES_INCLUDE_PATH="..\xerces-c\build\libs\include;..\xerces\src" -DXERCES_LIB_PATH="..\xerces\build\libs\lib" -DXERCES_ROOT_PATH="..\xerces-c\build "
104143 ren MvrGdtf.vcxproj MvrGdtf_ORG.vcxproj
105144
106- - name : libMVRGdtf [ASAN_NO_MZ] - Debug - add lib dependencies
107- working-directory : libMvrGdtf/build_ASAN_NO_MZ
145+ # libMVRGdtf - build Debug
146+ - name : libMVRGdtf [MD] - Debug - add lib dependencies
147+ working-directory : libMvrGdtf/build_MD
108148 shell : pwsh
109149 run : |
110150 $xml = [xml](Get-Content MvrGdtf_ORG.vcxproj)
@@ -115,14 +155,84 @@ runs:
115155 }
116156 Set-Content -Path "MvrGdtf.vcxproj" -Value $xml.OuterXml
117157
118- - name : libMVRGdtf [ASAN_NO_MZ ] - compile Debug
119- working-directory : libMvrGdtf/build_ASAN_NO_MZ
158+ - name : libMVRGdtf [MD ] - compile Debug
159+ working-directory : libMvrGdtf/build_MD
120160 shell : cmd
121161 run : |
122- msbuild /m /maxcpucount ALL_BUILD.vcxproj /p:Configuration=Debug
123- msbuild /m /maxcpucount INSTALL.vcxproj /p:Configuration=Debug
162+ msbuild /m ALL_BUILD.vcxproj /p:Configuration=Debug
163+ msbuild /m INSTALL.vcxproj /p:Configuration=Debug
124164
125- # Generate output
165+ # libMVRGdtf - build MinSizeRel
166+ - name : libMVRGdtf [MD] - MinSizeRel - add lib dependencies
167+ working-directory : libMvrGdtf/build_MD
168+ shell : pwsh
169+ run : |
170+ $xml = [xml](Get-Content MvrGdtf_ORG.vcxproj)
171+ $xml.Project.ItemDefinitionGroup | ForEach-Object {
172+ $node = $xml.CreateElement("AdditionalDependencies", "http://schemas.microsoft.com/developer/msbuild/2003")
173+ $node.InnerText = 'iphlpapi.lib;..\..\xerces-c\build\libs\lib\xerces-c_3.lib;mdns_cpp\lib\MinSizeRel\mdns_cpp.lib;%(AdditionalDependencies)'
174+ $_.Lib.AppendChild($node) | Out-Null
175+ }
176+ Set-Content -Path "MvrGdtf.vcxproj" -Value $xml.OuterXml
177+
178+ - name : libMVRGdtf [MD] - compile MinSizeRel
179+ working-directory : libMvrGdtf/build_MD
180+ shell : cmd
181+ run : |
182+ msbuild /m ALL_BUILD.vcxproj /p:Configuration=MinSizeRel
183+ msbuild /m INSTALL.vcxproj /p:Configuration=MinSizeRel
184+
185+ # --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
186+ - name : libMVRGdtf [MT] - configure
187+ working-directory : libMvrGdtf
188+ shell : cmd
189+ run : |
190+ mkdir build_MT
191+ cd build_MT
192+ cmake .. -DCMAKE_INSTALL_PREFIX:PATH=libs -T v142,version=14.29 -DWIN_RUNTIME_LIB=-MT -DENABLE_ASAN=TRUE -DXERCES_INCLUDE_PATH="..\xerces-c\build_mt\libs\include;..\xerces\src" -DXERCES_LIB_PATH="..\xerces\build_mt\libs\lib" -DXERCES_ROOT_PATH="..\xerces-c\build_mt"
193+ ren MvrGdtf.vcxproj MvrGdtf_ORG.vcxproj
194+
195+ # libMVRGdtf - build Debug
196+ - name : libMVRGdtf [MT] - Debug - add lib dependencies
197+ working-directory : libMvrGdtf/build_MT
198+ shell : pwsh
199+ run : |
200+ $xml = [xml](Get-Content MvrGdtf_ORG.vcxproj)
201+ $xml.Project.ItemDefinitionGroup | ForEach-Object {
202+ $node = $xml.CreateElement("AdditionalDependencies", "http://schemas.microsoft.com/developer/msbuild/2003")
203+ $node.InnerText = 'iphlpapi.lib;..\..\xerces-c\build_mt\libs\lib\xerces-c_3D.lib;mdns_cpp\lib\Debug\mdns_cpp.lib;%(AdditionalDependencies)'
204+ $_.Lib.AppendChild($node) | Out-Null
205+ }
206+ Set-Content -Path "MvrGdtf.vcxproj" -Value $xml.OuterXml
207+
208+ - name : libMVRGdtf [MT] - compile Debug
209+ working-directory : libMvrGdtf/build_MT
210+ shell : cmd
211+ run : |
212+ msbuild /m ALL_BUILD.vcxproj /p:Configuration=Debug
213+ msbuild /m INSTALL.vcxproj /p:Configuration=Debug
214+
215+ # libMVRGdtf - build MinSizeRel
216+ - name : libMVRGdtf [MT] - MinSizeRel - add lib dependencies
217+ working-directory : libMvrGdtf/build_MT
218+ shell : pwsh
219+ run : |
220+ $xml = [xml](Get-Content MvrGdtf_ORG.vcxproj)
221+ $xml.Project.ItemDefinitionGroup | ForEach-Object {
222+ $node = $xml.CreateElement("AdditionalDependencies", "http://schemas.microsoft.com/developer/msbuild/2003")
223+ $node.InnerText = 'iphlpapi.lib;..\..\xerces-c\build_mt\libs\lib\xerces-c_3.lib;mdns_cpp\lib\MinSizeRel\mdns_cpp.lib;%(AdditionalDependencies)'
224+ $_.Lib.AppendChild($node) | Out-Null
225+ }
226+ Set-Content -Path "MvrGdtf.vcxproj" -Value $xml.OuterXml
227+
228+ - name : libMVRGdtf [MT] - compile MinSizeRel
229+ working-directory : libMvrGdtf/build_MT
230+ shell : cmd
231+ run : |
232+ msbuild /m ALL_BUILD.vcxproj /p:Configuration=MinSizeRel
233+ msbuild /m INSTALL.vcxproj /p:Configuration=MinSizeRel
234+
235+ # --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
126236 - name : libMVRGdtf - Generate output library
127237 working-directory : libMvrGdtf
128238 shell : pwsh
@@ -131,11 +241,16 @@ runs:
131241 Remove-Item -Path "output" -Recurse -Force
132242 }
133243 New-Item -Path "output\libMvrGdtf\lib" -ItemType Directory -Force
244+ Copy-Item -Path "libs\MinSizeRel\*" -Destination "output\libMvrGdtf\lib" -Recurse
134245 Copy-Item -Path "libs\Debug\*" -Destination "output\libMvrGdtf\lib" -Recurse
135246
136247 New-Item -Path "output\libMvrGdtf\include" -ItemType Directory -Force
137248 Copy-Item -Path "src\Include\*" -Destination "output\libMvrGdtf\include" -Recurse
138249
250+ if (Test-Path -Path "libs\MinSizeRel") {
251+ Remove-Item -Path "libs\MinSizeRel" -Recurse -Force
252+ }
253+
139254 if (Test-Path -Path "libs\Debug") {
140255 Remove-Item -Path "libs\Debug" -Recurse -Force
141256 }
0 commit comments