-
Notifications
You must be signed in to change notification settings - Fork 7
158 lines (155 loc) · 8.91 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
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
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 Server
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/README.txt
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-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