-
Notifications
You must be signed in to change notification settings - Fork 2
249 lines (205 loc) · 8.37 KB
/
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
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
name: Nightly build Windows
on:
push:
tags:
- 'Nightly'
jobs:
set-revision:
name: set revision
runs-on: windows-2022
outputs:
output1: ${{ steps.out1.outputs.revision }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: detect revision
run: |
$text = gc "$Env:GITHUB_WORKSPACE\src\simutrans\revision.h"
echo $text
$revision=$text.Substring(17,5)
echo "revision=$revision" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
shell: pwsh
- id: out1
run: echo "revision=${{ env.revision }}" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf-8 -Append
makeobj_windows-nightly:
name: makeobj
runs-on: windows-2022
needs: [set-revision]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: compile makeobj
run: |
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\src\makeobj\Makeobj.vcxproj /p:Configuration=Release /p:Platform=x86
cd $Env:GITHUB_WORKSPACE\
- name: zip result
run: Compress-Archive build\makeobj\Makeobj.exe build\makeobj\makeobj_windows-nightly.zip
shell: pwsh
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/makeobj/makeobj_windows-nightly.zip
asset_name: makeobj_windows-nightly_r${{ needs.set-revision.outputs.output1 }}.zip
tag: Nightly
overwrite: true
windows_GDI-nightly:
name: Simutrans Windows GDI x86
runs-on: windows-2022
needs: [set-revision]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: compile simutrans
run: |
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Simutrans-GDI.vcxproj /p:Configuration=Release /p:Platform=x86
cd $Env:GITHUB_WORKSPACE\
copy build\GDI\Simutrans_GDI.exe simutrans\Simutrans.exe
- name: load translate files
run: |
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/base_text/download.php
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/base_text/data/language_pack-Base+texts.zip -OutFile language_pack.zip
- name: extract translate files
run: Expand-Archive language_pack.zip simutrans/text -Force
shell: pwsh
- name: delete ce translate files
run: del simutrans/text/ce.tab
shell: pwsh
- name: zip result
run: Compress-Archive simutrans simuwin_GDI_x86-nightly.zip
shell: pwsh
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: simuwin_GDI_x86-nightly.zip
asset_name: simuwin_GDI_x86-nightly_r${{ needs.set-revision.outputs.output1 }}.zip
tag: Nightly
overwrite: true
windows_GDI_x64-nightly:
name: Simutrans Windows GDI x64
runs-on: windows-2022
needs: [set-revision]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: compile simutrans
run: |
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Simutrans-GDI.vcxproj /p:Configuration=Release /p:Platform=x64 /p:TargetName=Simutrans_GDI_x64
cd $Env:GITHUB_WORKSPACE\
copy build\GDI\Simutrans_GDI_x64.exe simutrans\Simutrans.exe
- name: load translate files
run: |
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/base_text/download.php
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/base_text/data/language_pack-Base+texts.zip -OutFile language_pack.zip
- name: extract translate files
run: Expand-Archive language_pack.zip simutrans/text -Force
shell: pwsh
- name: delete ce translate files
run: del simutrans/text/ce.tab
shell: pwsh
- name: zip result
run: Compress-Archive simutrans simuwin_GDI_x64-nightly.zip
shell: pwsh
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: simuwin_GDI_x64-nightly.zip
asset_name: simuwin_GDI_x64-nightly_r${{ needs.set-revision.outputs.output1 }}.zip
tag: Nightly
overwrite: true
windows_SDL2-nightly:
name: Simutrans Windows SDL2
runs-on: windows-2022
needs: [set-revision]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: compile simutrans
run: |
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Simutrans-SDL2.vcxproj /p:Configuration=Release /p:Platform=x64 /p:TargetName=Simutrans_SDL2_x64
cd $Env:GITHUB_WORKSPACE\
copy build\SDL2\Simutrans_SDL2_x64.exe simutrans\Simutrans.exe
- name: load translate files
run: |
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/base_text/download.php
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/base_text/data/language_pack-Base+texts.zip -OutFile language_pack.zip
- name: extract translate files
run: Expand-Archive language_pack.zip src/simutrans/simutrans/text -Force
shell: pwsh
- name: delete ce translate files
run: del src/simutrans/simutrans/text/ce.tab
shell: pwsh
- name: zip result
run: Compress-Archive simutrans simuwin_SDL2_x64-nightly.zip
shell: pwsh
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: simuwin_SDL2_x64-nightly.zip
asset_name: simuwin_SDL2_x64-nightly_r${{ needs.set-revision.outputs.output1 }}.zip
tag: Nightly
overwrite: true
windows_server-nightly:
name: Simutrans Windows Server
runs-on: windows-2022
needs: [set-revision]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: compile simutrans server
run: |
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Simutrans-Server.vcxproj /p:Configuration=Release /p:Platform=x86
cd $Env:GITHUB_WORKSPACE\
copy build\Server\Simutrans_Server.exe simutrans\Simutrans-Server.exe
- name: load translate files
run: |
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/base_text/download.php
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/base_text/data/language_pack-Base+texts.zip -OutFile language_pack.zip
- name: extract translate files
run: Expand-Archive language_pack.zip simutrans/text -Force
shell: pwsh
- name: delete ce translate files
run: del simutrans/text/ce.tab
shell: pwsh
- name: zip result
run: Compress-Archive simutrans simuwin_server_x86-nightly.zip
shell: pwsh
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: simuwin_server_x86-nightly.zip
asset_name: simuwin_server_x86-nightly_r${{ needs.set-revision.outputs.output1 }}.zip
tag: Nightly
overwrite: true
windows_nettool:
name: Simutrans Nettool
runs-on: windows-2022
needs: [set-revision]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: compile simutrans nettool
run: |
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\src\nettool\Nettool.vcxproj /p:Configuration=release /p:Platform=x86
cd $Env:GITHUB_WORKSPACE\
- name: zip result
run: Compress-Archive build\nettool\Nettool.exe build\nettool\nettool_windows-nightly.zip
shell: pwsh
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/nettool/nettool_windows-nightly.zip
asset_name: nettool_windows-nightly_r${{ needs.set-revision.outputs.output1 }}.zip
tag: Nightly
overwrite: true