-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (74 loc) · 3.81 KB
/
package-dev-win.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Package Dev Win
on:
workflow_dispatch:
jobs:
package_dev_win:
runs-on: windows-latest
steps:
# Prepare Visual Studio
- name: Set up Visual Studio
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64
# --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Xerces-C - setup
- name: Xerces-C - prepare
run: |
mkdir xerces-c
cd xerces-c
curl -o xerces-c.zip https://dlcdn.apache.org//xerces/c/3/sources/xerces-c-3.2.5.zip
tar -xf xerces-c.zip --strip-components=1
del xerces-c.zip
# Xerces-C - build MD
- name: Xerces-C - configure
working-directory: xerces-c
run: |
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -A x64 -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
# --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Boost - setup and build
- name: Boost - prepare
run: |
mkdir boost
cd boost
curl -o boost.zip https://archives.boost.io/release/1.86.0/source/boost_1_86_0.zip
tar -xf boost.zip --strip-components=1
del boost.zip
# --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# libMVRGdtf - setup
- name: libMVRGdtf - checkout repository
uses: actions/checkout@v4
with:
path: libMvrGdtf
# --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- name: libMVRGdtf [MD] - configure
working-directory: libMvrGdtf
run: |
mkdir build_MD
cd build_MD
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=libs -DWIN_RUNTIME_LIB=-MD -DXERCES_INCLUDE_PATH="..\xerces-c\build\libs\include;..\xerces\src" -DXERCES_LIB_PATH="..\xerces\build\libs\lib" -DXERCES_ROOT_PATH="..\xerces-c\build"
ren MvrGdtf.vcxproj MvrGdtf_ORG.vcxproj
# libMVRGdtf - build Debug
- name: libMVRGdtf [MD] - Debug - add lib dependencies
working-directory: libMvrGdtf/build_MD
run: |
$xml = [xml](Get-Content MvrGdtf_ORG.vcxproj)
$xml.Project.ItemDefinitionGroup | ForEach-Object {
$node = $xml.CreateElement("AdditionalDependencies", "http://schemas.microsoft.com/developer/msbuild/2003")
$node.InnerText = 'iphlpapi.lib;..\..\xerces-c\build\libs\lib\xerces-c_3D.lib;mdns_cpp\lib\Debug\mdns_cpp.lib;%(AdditionalDependencies)'
$_.Lib.AppendChild($node) | Out-Null
}
Set-Content -Path "MvrGdtf.vcxproj" -Value $xml.OuterXml
shell: pwsh
# --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- name: Collect Artifact
run: |
dir
Compress-Archive -Path xerces-c,libMvrGdtf,boost -DestinationPath libMVRgdtf-dev.zip
shell: pwsh
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: libMVRgdtf-dev
path: libMVRgdtf-dev.zip