-
Notifications
You must be signed in to change notification settings - Fork 53
167 lines (146 loc) · 6.87 KB
/
Build ThunderNanoServices on Windows.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: Build ThunderNanoServices on Windows
on:
workflow_dispatch:
push:
branches: ["master"]
pull_request:
branches: ["master"]
env:
commander: ThunderNanoServices\Commander\Commander.vcxproj
devEnv: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.com
DHCPServer: ThunderNanoServices\DHCPServer\DHCPServer.vcxproj
DIALServer: ThunderNanoServices\DIALServer\DIALServer.vcxproj
dictionary: ThunderNanoServices\Dictionary\Dictionary.vcxproj
JSONRPCPlugin: ThunderNanoServices\examples\JSONRPCPlugin\JSONRPCPlugin.vcxproj
networkControl: ThunderNanoServices\NetworkControl\NetworkControl.vcxproj
outOfProcessPlugin: ThunderNanoServices\examples\OutOfProcessPlugin\OutOfProcessPlugin.vcxproj
remoteControl: ThunderNanoServices\RemoteControl\RemoteControl.vcxproj
solution: Thunder.sln
subsystemController: ThunderNanoServices\SubsystemController\SubsystemControl.vcxproj
svalbard: ThunderNanoServices\Svalbard\Svalbard.vcxproj
timeSync: ThunderNanoServices\TimeSync\TimeSync.vcxproj
webServer: ThunderNanoServices\WebServer\WebServer.vcxproj
jobs:
ThunderNanoServices:
runs-on: windows-latest
strategy:
matrix:
type: [Debug, Release]
version: [64, 86]
# ----- Checkout & DependsOn Regex -----
name: Build type - ${{matrix.type}}${{matrix.version}}
steps:
- name: Checkout ThunderOnWindows
uses: actions/checkout@v4
with:
path: ThunderOnWindows
repository: WebPlatformForEmbedded/ThunderOnWindows
# ----- Thunder -----
- name: Checkout Thunder - default
if: ${{ !contains(github.event.pull_request.body, '[DependsOn=Thunder:') }}
uses: actions/checkout@v4
with:
path: ThunderOnWindows/Thunder
repository: ${{github.repository_owner}}/Thunder
- name: Regex Thunder
if: contains(github.event.pull_request.body, '[DependsOn=Thunder:')
id: thunder
uses: AsasInnab/regex-action@v1
with:
regex_pattern: '(?<=\[DependsOn=Thunder:).*(?=\])'
regex_flags: 'gim'
search_string: ${{github.event.pull_request.body}}
- name: Checkout Thunder - ${{steps.thunder.outputs.first_match}}
if: contains(github.event.pull_request.body, '[DependsOn=Thunder:')
uses: actions/checkout@v4
with:
path: ThunderOnWindows/Thunder
repository: ${{github.repository_owner}}/Thunder
ref: ${{steps.thunder.outputs.first_match}}
# ----- ThunderTools -----
- name: Checkout ThunderTools - default
if: ${{ !contains(github.event.pull_request.body, '[DependsOn=ThunderTools:') }}
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderTools
repository: ${{github.repository_owner}}/ThunderTools
- name: Regex ThunderTools
if: contains(github.event.pull_request.body, '[DependsOn=ThunderTools:')
id: tools
uses: AsasInnab/regex-action@v1
with:
regex_pattern: '(?<=\[DependsOn=ThunderTools:).*(?=\])'
regex_flags: 'gim'
search_string: ${{github.event.pull_request.body}}
- name: Checkout ThunderTools - ${{steps.tools.outputs.first_match}}
if: contains(github.event.pull_request.body, '[DependsOn=ThunderTools:')
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderTools
repository: ${{github.repository_owner}}/ThunderTools
ref: ${{steps.tools.outputs.first_match}}
# ----- ThunderInterfaces -----
- name: Checkout ThunderInterfaces - default
if: ${{ !contains(github.event.pull_request.body, '[DependsOn=ThunderInterfaces:') }}
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderInterfaces
repository: ${{github.repository_owner}}/ThunderInterfaces
- name: Regex ThunderInterfaces
if: contains(github.event.pull_request.body, '[DependsOn=ThunderInterfaces:')
id: thunderinterfaces
uses: AsasInnab/regex-action@v1
with:
regex_pattern: '(?<=\[DependsOn=ThunderInterfaces:).*(?=\])'
regex_flags: 'gim'
search_string: ${{github.event.pull_request.body}}
- name: Checkout ThunderInterfaces - ${{steps.thunderinterfaces.outputs.first_match}}
if: contains(github.event.pull_request.body, '[DependsOn=ThunderInterfaces:')
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderInterfaces
repository: ${{github.repository_owner}}/ThunderInterfaces
ref: ${{steps.thunderinterfaces.outputs.first_match}}
# ----- Other checkouts -----
- name: Checkout ThunderClientLibraries
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderClientLibraries
repository: ${{github.repository_owner}}/ThunderClientLibraries
- name: Checkout ThunderNanoServices
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderNanoServices
repository: ${{github.repository_owner}}/ThunderNanoServices
- name: Checkout ThunderNanoServicesRDK
uses: actions/checkout@v4
with:
path: ThunderOnWindows/ThunderNanoServicesRDK
repository: WebPlatformForEmbedded/ThunderNanoServicesRDK
# ----- Install & Build -----
- name: Install jsonref
run: pip install jsonref
- name: Build ThunderNanoServices
shell: cmd
run: >
cd ThunderOnWindows
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%commander%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%DHCPServer%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%DIALServer%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%dictionary%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%JSONRPCPlugin%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%networkControl%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%outOfProcessPlugin%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%remoteControl%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%subsystemController%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%svalbard%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%timeSync%" "%solution%"
&& "%devEnv%" /Build "${{matrix.type}}|x${{matrix.version}}" /Project "%webServer%" "%solution%"
# ----- Upload artifacts -----
- name: Tar files
run: tar -czvf ${{matrix.type}}${{matrix.version}}.tar.gz artifacts
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ThunderNanoServices-${{matrix.type}}${{matrix.version}}-artifact
path: ${{matrix.type}}${{matrix.version}}.tar.gz