-
Notifications
You must be signed in to change notification settings - Fork 11
/
appveyor.yml
468 lines (424 loc) · 20.4 KB
/
appveyor.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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
version: '{branch}-{build}'
# Secure variables are not available during PRs
environment:
CL: /MP
generator: Visual Studio 16 2019
ifw_location: C:\Qt\Tools\QtInstallerFramework\2.0
iric_access_token:
secure: TtnZWgikg+nDp24nYOfER/4OD1+HfXGWze/RvBpYVYsY996oWo9F3/jtX1TGuGri
kskinoue0612_access_token:
secure: GzdhhFKWjeLDM22U4ZcrMkAGEEnZLMVbfBR9W8uRQ/LqOtvX2qjPXvC3nvxxWeUc
scharlton2_access_token:
secure: 3mXPZnI89IUSgBnFS4uVNiz69PVY7KG4jw+wPTj0ubg9iAjjw9oKacWVZvoxulyy
iric_json_pw:
secure: CVCXzASqkq3przUfkNlvcw==
kskinoue0612_json_pw:
secure: B7Si+LaJhWCM2tIioKzBCg==
scharlton2_json_pw:
secure: AOPP/aIpAdcXyiczRqovDQ==
# Skipping commits affecting specific files (GitHub only).
# also can use [skip appveyor] in message to skip building
skip_commits:
files:
- .gitignore
- README.md
- manuals/*
- sdks/*
- tools/*
image:
- Visual Studio 2019
# called before clone
# Note that environment variables don't seem to transfer correctly from cmd to ps when
# they contain spaces
#
# Neither env nor powershell variables are passed when using pwsh. Now $CommitAndPush
# must be re-evaluated everytime. env vars CAN be passed from ps: to pwsh: but not the
# other way around (see develop_v4-363)
init:
- if "%Configuration%"=="Debug" (set config=debug)
- if "%Configuration%"=="Release" (set config=release)
- ps: |
# Sometimes the plaintext of secure variables is displayed so filter out secure vars
Get-ChildItem env: | Where-Object { $_.Name -NotMatch "access_token" -and $_.Name -notmatch 'json_pw'}
# Only commit and push to master branch or debug-appveyor branch (for testing)
$CommitAndPush = (($env:Configuration -eq "Release") -AND (($env:APPVEYOR_REPO_BRANCH -eq "master_v4") -OR ($env:APPVEYOR_REPO_BRANCH -eq "develop_v4")) -AND (!$env:APPVEYOR_PULL_REQUEST_NUMBER))
$env:CommitAndPush = $CommitAndPush
configuration:
- Debug
- Release
matrix:
fast_finish: true
# too big to cache (just install everytime)
# cache:
# - C:\Qt\5.14.2 -> tools\install_qt_fast_windows.ps1, tools\install_qt_module.ps1
install:
- ps: .\tools\install_qt_fast_windows.ps1
- ps: Get-ChildItem C:\Qt\5.14.2
# Note mkdir is from Git (C:\Program Files\Git\usr\bin\mkdir.exe)
# It might give unexpected results (use md instead)
#
# Neither env nor powershell variables are passed when using pwsh shell
before_build:
- pwsh: |
####################################################################################
# *_json_pw env vars contain encrypted password
####################################################################################
if ($env:Configuration -eq "Release" -AND (!$env:APPVEYOR_PULL_REQUEST_NUMBER)) {
git checkout $env:APPVEYOR_REPO_BRANCH
if ($env:APPVEYOR_REPO_NAME -eq "i-RIC/prepost-gui") {
$pw = $env:iric_json_pw
}
if ($env:APPVEYOR_REPO_NAME -eq "scharlton2/prepost-gui") {
$pw = $env:scharlton2_json_pw
}
if ($env:APPVEYOR_REPO_NAME -eq "kskinoue0612/prepost-gui") {
$pw = $env:kskinoue0612_json_pw
}
if ($pw -eq $null) {
throw "Password not set"
}
7z x -p"$($pw*10)" iric-ts-translation-4761fe6f85d6.json.7z
Write-Output "Should be EE6EA1115B3C696A88BA2F1E89BD6F88C8E50DE2E7D25B21488F5B4BAFCCD205"
Get-FileHash "iric-ts-translation-4761fe6f85d6.json"
}
- pwsh: |
####################################################################################
# Run tools\translate_ts.py on all but the top languages directories
####################################################################################
if ($env:Configuration -eq "Release" -AND (!$env:APPVEYOR_PULL_REQUEST_NUMBER)) {
$topdir = Get-Location
$env:GOOGLE_APPLICATION_CREDENTIALS = "$topdir\iric-ts-translation-4761fe6f85d6.json"
Write-Output "Should be EE6EA1115B3C696A88BA2F1E89BD6F88C8E50DE2E7D25B21488F5B4BAFCCD205"
Get-FileHash $env:GOOGLE_APPLICATION_CREDENTIALS
C:\Python311-x64\python.exe -m pip install --upgrade pip
C:\Python311-x64\python.exe -m pip install google-cloud-translate
$dirs = Get-ChildItem -Attributes Directory | Where-Object { $_.Name -notmatch 'languages' }
foreach ($dir in $dirs) {
$langs = Get-ChildItem -Recurse -Attributes Directory $dir | Where-Object { $_.Name -like 'languages' }
foreach ($lang in $langs) {
Set-Location $lang.Parent
mkdir output
Rename-Item .\languages .\input
C:\Python311-x64\python.exe "$topdir\tools\translate_ts.py"
Rename-Item .\output .\languages
Remove-Item -Recurse -Force .\input
}
}
Set-Location $topdir
rm .\iric-ts-translation-4761fe6f85d6.json
# log date
Get-Date -Format FileDateTimeUniversal >> tools\translate_ts.log
git status
}
- pwsh: |
####################################################################################
# Commit the languages changes
# from https://www.appveyor.com/docs/how-to/git-push/
####################################################################################
if ($env:Configuration -eq "Release" -AND (!$env:APPVEYOR_PULL_REQUEST_NUMBER)) {
# determine whether to push to current or new branch and which
# access_token to use (the branch is for testing)
$branch = $True
if ($env:APPVEYOR_REPO_NAME -eq "i-RIC/prepost-gui") {
$access_token = $env:iric_access_token
if ($env:APPVEYOR_REPO_BRANCH -eq "develop_v4") {
$branch = $False
}
}
if ($env:APPVEYOR_REPO_NAME -eq "scharlton2/prepost-gui") {
$access_token = $env:scharlton2_access_token
}
if ($env:APPVEYOR_REPO_NAME -eq "kskinoue0612/prepost-gui") {
$access_token = $env:kskinoue0612_access_token
}
if ($access_token -eq $null) {
throw "Access token not set"
}
echo "branch = $branch"
# Enabling Git credential store
echo "calling git config"
git config --global credential.helper store
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# Adding access token to credential store
echo "calling Add-Content"
Add-Content "$HOME\.git-credentials" "https://$($access_token):[email protected]`n" -ErrorAction Stop
# Indicate git user name and mail
echo "setting git user name and mail"
git config --global user.email "[email protected]"
git config --global user.name "iric.appveyor"
git config --global core.safecrlf false
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# Create branch if necessary
if ($branch) {
# create branch
echo "creating new branch"
git switch --quiet -c "__$env:APPVEYOR_BUILD_VERSION"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
# add and commit language files (shouldn't be any new files)
echo "committing translate_ts.py update"
git commit -am "[skip ci] translate_ts.py by iric.appveyor $env:APPVEYOR_BUILD_VERSION"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# push
echo "pushing commits"
if ($branch) {
git push --set-upstream origin "__$env:APPVEYOR_BUILD_VERSION"
} else {
git push origin $env:APPVEYOR_REPO_BRANCH
}
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
# These lines are necessary to avoid appveyor considering the output
# from git push to be an error
Write-Output "Status:"
git status
- call C:\Qt\5.14.2\msvc2017_64\bin\qtenv2.bat
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
- cd %APPVEYOR_BUILD_FOLDER%
- curl -L -O https://github.com/i-RIC/iricdev-2019/archive/2019.zip
- cd \
- 7z x %APPVEYOR_BUILD_FOLDER%\2019.zip
- del %APPVEYOR_BUILD_FOLDER%\2019.zip
- ren c:\iricdev-2019-2019 iricdev-2019
- cd \iricdev-2019
- ps: |
if (!$env:APPVEYOR_PULL_REQUEST_NUMBER) {
if ($env:APPVEYOR_REPO_NAME -eq "i-RIC/prepost-gui") {
$t = $env:iric_access_token
}
if ($env:APPVEYOR_REPO_NAME -eq "scharlton2/prepost-gui") {
$t = $env:scharlton2_access_token
}
if ($env:APPVEYOR_REPO_NAME -eq "kskinoue0612/prepost-gui") {
$t = $env:kskinoue0612_access_token
}
} else {
# use read-only token
$b = ""
$b = $b + "Z2l0aHViX3BhdF8xMUFCWlFRRVkwNnB"
$b = $b + "hZklhZkRIZGcxX1BSR3BlcEFEU1JzNV"
$b = $b + "dnS002UFBqTWJ5aENtNFdudmlwZ09SY"
$b = $b + "zAzVTJYWHBISUxRUkhNTHRHRzdtOFpq"
$t = [System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($b))
}
# create headers dictionary
$h = @{"Authorization" = "token $t"}
$releases_url = "https://api.github.com/repos/i-RIC/iricdev-2019/releases"
$latest_response = Invoke-WebRequest -Uri $releases_url/latest -Headers $h -Method GET -UseBasicParsing
$latest = $latest_response.Content | ConvertFrom-Json
$url = $latest.assets.browser_download_url
(New-Object Net.WebClient).DownloadFile($url, "\iricdev-2019\install.7z")
7z x install.7z
rm install.7z
- ps: |
# download and install ifw 2.0
$url = "https://github.com/scharlton2/ifw/releases/download/v1/ifw-2.0.7z"
$7zfile = "c:\iricdev-2019\ifw.7z"
(New-Object Net.WebClient).DownloadFile($url, $7zfile)
7z x -oc:\Qt\Tools\QtInstallerFramework $7zfile
rm $7zfile
if (! (Test-Path ${env:ifw_location}\bin\repogen.exe)) { throw 'repogen.exe not found (check $env:ifw_location' }
- call create-files.cmd
- cd %APPVEYOR_BUILD_FOLDER%
- if not exist libdlls (md libdlls)
- if not exist libdlls\Debug (md libdlls\Debug)
- if not exist libdlls\Release (md libdlls\Release)
- copy /y \iricdev-2019\paths.pri .
- copy /y \iricdev-2019\dirExt.prop .\tools\data\.
- ps: 'Get-Command qmake'
build_script:
- qmake -recursive -tp vc
- msbuild /nologo /verbosity:minimal /maxCpuCount /target:iricGdPolyline /p:Configuration=%Configuration% src.sln
- msbuild /nologo /verbosity:minimal /maxCpuCount /p:Configuration=%Configuration% src.sln
after_build:
- cd %APPVEYOR_BUILD_FOLDER%\tools
- set SAVE_PATH=%PATH%
- set PATH=C:\Python37-x64;%PATH%
- python copydllsExt-2019.py
- python lrelease.py
- set PATH=%SAVE_PATH%
- cd %APPVEYOR_BUILD_FOLDER%
- ps: |
if ($CommitAndPush) {
mkdir $env:APPVEYOR_BUILD_FOLDER\dist\_build
Set-Location $env:APPVEYOR_BUILD_FOLDER\dist\_build -ErrorAction Stop
cmake --version
Get-Content C:\iricdev-2019\versions.cmd | ForEach-Object {
if ($_ -match '^set IRICLIB_VER=(.*)$') {
$iriclib_DIR="c:/iricdev-2019/lib/install/iriclib-" + $matches[1] + "/lib/cmake/iriclib"
}
}
Get-Content C:\iricdev-2019\versions.cmd | ForEach-Object {
if ($_ -match '^set HDF5_VER=(.*)$') {
$hdf5_DIR="c:/iricdev-2019/lib/install/hdf5-" + $matches[1] + "/share/cmake/hdf5"
}
}
Get-Content C:\iricdev-2019\versions.cmd | ForEach-Object {
if ($_ -match '^set POCO_VER=(.*)$') {
$PocoFoundation_DIR="c:/iricdev-2019/lib/install/poco-" + $matches[1] + "/lib/cmake/Poco"
}
}
$env:CMAKE_PREFIX_PATH="$iriclib_DIR;$hdf5_DIR;$PocoFoundation_DIR"
if ($env:APPVEYOR_REPO_BRANCH -eq "master_v4") {
cmake -DPREPOST_GUI:PATH=$env:APPVEYOR_BUILD_FOLDER -DSRC_FOLDER:STRING=prod_v4_src -G $env:generator ..
} else {
cmake -DPREPOST_GUI:PATH=$env:APPVEYOR_BUILD_FOLDER -DSRC_FOLDER:STRING=dev_v4_src -G $env:generator ..
}
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
artifacts:
# - path: libdlls\$(Configuration)
# name: libdlls-$(Configuration)
# - path: apps\iricgui\$(config)
# name: iricgui-$(Configuration)
- path: apps\rivmaker\$(config)\Rivmaker.exe
name: rivmaker-$(Configuration)
on_success:
- ps: |
if ($CommitAndPush) {
# online_update_v4 urls
$remote_url_iric = "https://github.com/i-RIC/online_update_v4.git"
$remote_url_scharlton2 = "https://github.com/scharlton2/online_update_v4.git"
$remote_url_kskinoue0612 = "https://github.com/kskinoue0612/online_update_v4.git"
$branch = $True
if ($env:APPVEYOR_REPO_NAME -eq "i-RIC/prepost-gui") {
$remote_url = $remote_url_iric
$access_token = $env:iric_access_token
$branch = $False
}
if ($env:APPVEYOR_REPO_NAME -eq "scharlton2/prepost-gui") {
$remote_url = $remote_url_scharlton2
# online_update_2020_05_17 expires after a year if not used
$access_token = $env:scharlton2_access_token
}
if ($env:APPVEYOR_REPO_NAME -eq "kskinoue0612/prepost-gui") {
$remote_url = $remote_url_kskinoue0612
$access_token = $env:kskinoue0612_access_token
}
Set-Location \ -ErrorAction Stop
git clone -q --branch=main --depth 1 $remote_url online_update_v4 2>&1 | Out-Null
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
Set-Location .\online_update_v4 -ErrorAction Stop
if ($branch) {
# create branch when remote is not "i-RIC/prepost-gui"
git checkout -qb $env:APPVEYOR_JOB_ID
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
# update data\definition.xml and meta\package.xml from dev_v4_src\packages\gui.prepost
# set properties
if ($env:APPVEYOR_REPO_BRANCH -eq "master_v4") {
$v=(Select-String -Path prod_v4_src\packages\gui.prepost\meta\package.xml -Pattern "(?<=<Version>)(.*)(?=</Version>)").Matches.Value -split "\."
} else {
$v=(Select-String -Path dev_v4_src\packages\gui.prepost\meta\package.xml -Pattern "(?<=<Version>)(.*)(?=</Version>)").Matches.Value -split "\."
}
$v[3] = 1 + $v[3]
$env:VERSION = $v -join "."
$tokyo_tz = [System.TimeZoneInfo]::FindSystemTimeZoneById("Tokyo Standard Time")
$tokyo_date = [System.TimeZoneInfo]::ConvertTimeFromUtc((Get-Date).ToUniversalTime(), $tokyo_tz)
$env:RELEASE_DATE = $(Get-Date $tokyo_date -Format s).Substring(0,10)
$env:RELEASE = $env:RELEASE_DATE -replace '-', '.'
$env:CAPTION = "iRIC GUI " + $v[0] + "." + $v[1] + "." + $v[2]
# The parentheses around the Get-Content commands below are required
# to avoid file access errors
if ($env:APPVEYOR_REPO_BRANCH -eq "master_v4") {
$files=@('prod_v4_src\packages\gui.prepost\data\definition.xml', `
'prod_v4_src\packages\gui.prepost\meta\package.xml')
} else {
$files=@('dev_v4_src\packages\gui.prepost\data\definition.xml', `
'dev_v4_src\packages\gui.prepost\meta\package.xml')
}
foreach ($file in $files) {
(Get-Content $file) | Foreach-Object {
$_ -replace "(?<=<Version>)(.*)(?=</Version>)", "$env:VERSION" `
-replace "`" version=`"([^`"]*)`"", "`" version=`"$env:VERSION`"" `
-replace "(?<=<ReleaseDate>)(.*)(?=</ReleaseDate>)", "$env:RELEASE_DATE" `
-replace "release=`"([^`"]*)`"", "release=`"$env:RELEASE`"" `
-replace "github-sha1=`"([^`"]*)`"", "github-sha1=`"$env:APPVEYOR_REPO_COMMIT`""
} | Set-Content $file
}
# distribute files built by prepost-gui
cmake --install $env:APPVEYOR_BUILD_FOLDER\dist\_build --config release
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# read iriclib Version from $in
# get iriclib ReleaseDate from github releases
# see https://docs.github.com/en/rest/reference/releases#get-the-latest-release
# and write them both to $out
if ($env:APPVEYOR_REPO_BRANCH -eq "master_v4") {
$in = 'prod_v4_src\packages\sdk\data\c\lib\cmake\iriclib\iriclibConfigVersion.cmake'
$outs=@('prod_v4_src\packages\sdk\meta\package.xml', `
'prod_v4_src\packages\miniconda.iriclib\meta\package.xml')
} else {
$in = 'dev_v4_src\packages\sdk\data\c\lib\cmake\iriclib\iriclibConfigVersion.cmake'
$outs=@('dev_v4_src\packages\sdk\meta\package.xml', `
'dev_v4_src\packages\miniconda.iriclib\meta\package.xml')
}
$iriclib_ver = (Select-String -Path $in -Pattern '^set\(PACKAGE_VERSION "(?<ver>.*)"\)$').Matches[0].Groups['ver'].Value
$releases_url="https://api.github.com/repos/i-RIC/iriclib_v4/releases"
# create headers dictionary
$h = @{"Authorization" = "token $access_token"}
$latest_json = Invoke-WebRequest -Uri $releases_url/latest -Headers $h -Method GET -UseBasicParsing
$latest = $latest_json.Content | ConvertFrom-Json
$iriclib_rel = Get-Date $latest.created_at -Format "yyyy-MM-dd"
# verify versions agree
if ($latest.tag_name -ne "v$iriclib_ver") {
throw "iriclib version/release mismatch " + $latest.tag_name + " -ne " + "v$iriclib_ver"
}
foreach ($out in $outs) {
(Get-Content $out) | Foreach-Object {
$_ -replace "(?<=<Version>)(.*)(?=</Version>)", $iriclib_ver `
-replace "(?<=<ReleaseDate>)(.*)(?=</ReleaseDate>)", $iriclib_rel
} | Set-Content $out
}
if ($env:APPVEYOR_REPO_BRANCH -eq "master_v4") {
# run repogen to build packages and Updates.xml
Set-Location \online_update_v4\prod_v4_src -ErrorAction Stop
# run repogen
& ${env:ifw_location}\bin\repogen.exe -p packages --update --include gui.prepost,miniconda,sdk ..\prod_v4
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
} else {
# run repogen to build packages and Updates.xml
Set-Location \online_update_v4\dev_v4_src -ErrorAction Stop
# run repogen
& ${env:ifw_location}\bin\repogen.exe -p packages --update --include gui.prepost,miniconda,sdk ..\dev_v4
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
# run normalize_updatexml.py to normalize Updates.xml.
Set-Location \online_update_v4 -ErrorAction Stop
py normalize_updatexml.py
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# commit and push to https://github.com/i-RIC/online_update_v4.git
git config --global credential.helper store
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# configure git for commit and push
Add-Content "$HOME\.git-credentials" "https://$($access_token):[email protected]`n" -ErrorAction Stop
git config --global user.email "[email protected]"
git config --global user.name "iric.appveyor"
git config --global core.safecrlf false
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# git add -A *.7z *.sha1 *.xml *.dll *.exe *.qm
git add -A
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# Qt dictionaries are now included in gui.runtime package.
git reset **/qt_*.qm
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
git commit -m "built by iric.appveyor $env:APPVEYOR_BUILD_VERSION"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
if ($branch) {
git push --set-upstream origin $env:APPVEYOR_JOB_ID 2>&1 | Out-Null
} else {
git push --set-upstream origin main 2>&1 | Out-Null
}
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
git status
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
on_failure:
- dir C:\Qt\Tools\QtInstallerFramework
- echo '-----------------------------------'
- git diff
- echo '-----------------------------------'
# the following doesn't work (never finishes):
# - ps: |
# Get-ChildItem -Recurse c:\ | 7z a -si $env:APPVEYOR_BUILD_FOLDER\dir_c.7z
# Push-AppveyorArtifact $env:APPVEYOR_BUILD_FOLDER\dir_c.7z
# Write-Output "Finished on_failure"