-
Notifications
You must be signed in to change notification settings - Fork 7
219 lines (215 loc) · 11.8 KB
/
b2s-backglass.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
name: b2s-backglass
on:
push:
defaults:
run:
shell: bash
jobs:
build-server:
name: Build B2SServer-${{ matrix.config }}-win-${{ matrix.platform }}
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
include:
- platform: x86
config: Debug
- platform: x86
config: Release
- platform: x64
config: Debug
- platform: x64
config: Release
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: DirectOutput/B2SServerPluginInterface
path: B2SServerPluginInterface
- id: version
name: Update AssemblyInformationalVersion
run: |
SHA7="${GITHUB_SHA::7}"
ASSEMBLY_INFO="B2SServerPluginInterface/B2SServerPluginInterface/Properties/AssemblyInfo.cs"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
echo -e "\n[assembly: AssemblyInformationalVersion(\"${TAG}\")]" >> "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2s_screenresidentifier/b2s_screenresidentifier/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2sbackglassserverexe/b2sbackglassserverexe/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2sbackglassserverregisterapp/b2sbackglassserverregisterapp/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2sbackglassserver/b2sbackglassserver/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
ASSEMBLY_INFO="B2SWindowPunch/B2SWindowPunch/Properties/AssemblyInfo.cs"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
- uses: microsoft/[email protected]
- name: Build B2SServerPluginInterface
run: |
msbuild B2SServerPluginInterface/B2SServerPluginInterface.sln /t:Rebuild /p:Configuration=${{ matrix.config }}
shell: cmd
- run: |
cp B2SServerPluginInterface/B2SServerPluginInterface/bin/${{ matrix.config }}/B2SServerPluginInterface.dll b2sbackglassserver/b2sbackglassserver/Plugin
if [[ "${{ matrix.config }}" == "Debug" ]]; then
cp B2SServerPluginInterface/B2SServerPluginInterface/bin/${{ matrix.config }}/B2SServerPluginInterface.pdb b2sbackglassserver/b2sbackglassserver/Plugin
fi
- name: Build
run: |
msbuild b2s_screenresidentifier/B2S_ScreenResIdentifier.sln /t:Rebuild /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
msbuild b2sbackglassserverexe/B2SBackglassServerEXE.sln /t:Rebuild /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
msbuild b2sbackglassserverregisterapp/B2SBackglassServerRegisterApp.sln /t:Rebuild /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
msbuild b2sbackglassserver/B2SBackglassServer.sln /t:Rebuild /p:Configuration=${{ matrix.config }}
msbuild B2SWindowPunch/B2SWindowPunch.sln /t:Rebuild /p:Configuration=${{ matrix.config }}
shell: cmd
- name: Bundle
run: |
mkdir tmp
cp b2s_screenresidentifier/b2s_screenresidentifier/bin/${{ matrix.platform }}/${{ matrix.config }}/B2S_ScreenResIdentifier.exe tmp
cp b2s_screenresidentifier/b2s_screenresidentifier/bin/${{ matrix.platform }}/${{ matrix.config }}/B2S_ScreenResIdentifier.exe.config tmp
cp b2sbackglassserverexe/b2sbackglassserverexe/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassServerEXE.exe tmp
cp b2sbackglassserverexe/b2sbackglassserverexe/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassServerEXE.exe.config tmp
cp b2sbackglassserverregisterapp/b2sbackglassserverregisterapp/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassServerRegisterApp.exe tmp
cp b2sbackglassserver/b2sbackglassserver/bin/${{ matrix.config }}/B2SServerPluginInterface.dll tmp
cp b2sbackglassserver/b2sbackglassserver/bin/${{ matrix.config }}/B2SBackglassServer.dll tmp
cp b2sbackglassserver/b2sbackglassserver/B2SInit.cmd tmp
cp B2SWindowPunch/B2SWindowPunch/bin/${{ matrix.config }}/B2SWindowPunch.exe tmp
if [[ "${{ matrix.config }}" == "Debug" ]]; then
cp b2s_screenresidentifier/b2s_screenresidentifier/bin/${{ matrix.platform }}/${{ matrix.config }}/B2S_ScreenResIdentifier.pdb tmp
cp b2sbackglassserverexe/b2sbackglassserverexe/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassServerEXE.pdb tmp
cp b2sbackglassserverregisterapp/b2sbackglassserverregisterapp/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassServerRegisterApp.pdb tmp
cp b2sbackglassserver/b2sbackglassserver/bin/${{ matrix.config }}/B2SServerPluginInterface.pdb tmp
cp b2sbackglassserver/b2sbackglassserver/bin/${{ matrix.config }}/B2SBackglassServer.pdb tmp
cp B2SWindowPunch/B2SWindowPunch/bin/${{ matrix.config }}/B2SWindowPunch.pdb tmp
fi
mkdir tmp/Plugins tmp/Plugins64
cp Plugins.txt tmp/Plugins
cp Plugins.txt tmp/Plugins64
cp Changelog.txt tmp
cp license.txt tmp
cp README.md tmp
cp ScreenResTemplate.txt tmp
cp -r ScreenResTemplates tmp
cp -r B2STools tmp
cp b2sbackglassserverregisterapp/ScreenResTemplates.cmd tmp
- uses: actions/upload-artifact@v3
with:
name: B2SServer-${{ steps.version.outputs.tag }}-${{ matrix.config }}-win-${{ matrix.platform }}
path: tmp
build-designer:
if: ${{ false }} # disable for now
name: Build B2SBackglassDesigner-${{ matrix.config }}-win-${{ matrix.platform }}
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
include:
- platform: x86
config: Debug
- platform: x86
config: Release
- platform: x64
config: Debug
- platform: x64
config: Release
steps:
- uses: actions/checkout@v3
- id: version
name: Update AssemblyInformationalVersion
run: |
SHA7="${GITHUB_SHA::7}"
ASSEMBLY_INFO="B2SVPinMAMEStarter/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2sbackglassdesigner/b2sbackglassdesigner/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: microsoft/[email protected]
- name: Build
run: |
msbuild B2SVPinMAMEStarter/B2SVPinMAMEStarter.sln /t:Rebuild /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
msbuild b2sbackglassdesigner/B2SBackglassDesigner.sln /t:Rebuild /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
shell: cmd
- name: Help
run: |
choco install html-help-workshop
"/c/Program Files (x86)/HTML Help Workshop/hhc.exe" "b2sbackglassdesigner/b2sbackglassdesigner/htmlhelp/B2SBackglassDesigner.hhp" || true
- name: Bundle
run: |
mkdir tmp
cp B2SVPinMAMEStarter/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SVPinMAMEStarter.exe tmp
cp b2sbackglassdesigner/b2sbackglassdesigner/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassDesigner.exe tmp
if [[ "${{ matrix.config }}" == "Debug" ]]; then
cp B2SVPinMAMEStarter/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SVPinMAMEStarter.pdb tmp
cp b2sbackglassdesigner/b2sbackglassdesigner/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassDesigner.pdb tmp
fi
cp b2sbackglassdesigner/b2sbackglassdesigner/htmlhelp/B2SBackglassDesigner.chm tmp
cp license.txt tmp
- uses: actions/upload-artifact@v3
with:
name: B2SBackglassDesigner-${{ steps.version.outputs.tag }}-${{ matrix.config }}-win-${{ matrix.platform }}
path: tmp
build-betterled:
if: ${{ false }} # disable for now
name: Build BetterLed # -${{ matrix.config }}-win-${{ matrix.platform }}
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
include:
- platform: x86
config: Debug
- platform: x86
config: Release
- platform: x64
config: Debug
- platform: x64
config: Release
steps:
- uses: actions/checkout@v3
- id: version
name: Update AssemblyInformationalVersion
run: |
SHA7="${GITHUB_SHA::7}"
ASSEMBLY_INFO="leds/dream7segments/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="leds/BetterLed/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: microsoft/[email protected]
- name: Build
run: |
msbuild leds/BetterLed/BetterLed.sln /t:Rebuild /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
shell: cmd
- name: Bundle
run: |
mkdir tmp
cp leds/BetterLed/bin/${{ matrix.platform }}/${{ matrix.config }}/BetterLed.exe tmp
cp leds/BetterLed/bin/${{ matrix.platform }}/${{ matrix.config }}/Dream7Display.dll tmp
if [[ "${{ matrix.config }}" == "Debug" ]]; then
cp leds/BetterLed/bin/${{ matrix.platform }}/${{ matrix.config }}/BetterLed.pdb tmp
cp leds/BetterLed/bin/${{ matrix.platform }}/${{ matrix.config }}/Dream7Display.pdb tmp
fi
cp license.txt tmp
- uses: actions/upload-artifact@v3
with:
name: BetterLed-${{ steps.version.outputs.tag }}-${{ matrix.config }}-win-${{ matrix.platform }}
path: tmp