-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
.appveyor.yml
88 lines (68 loc) · 2.7 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
version: '{branch}-{build}'
clone_depth: 1
environment:
PREMAKE_VERSION: 5.0.0-beta1
SDL_VERSION: 2.0.16
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
TOOLSET: vs2019
platform: x64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
TOOLSET: vs2019
platform: Win32
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: vs2017
platform: x64
SKIP_DEPLOY: skip
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: vs2017
platform: Win32
SKIP_DEPLOY: skip
# TODO: Move to PowerShell script
before_build:
- git submodule update --init --recursive
# premake
- ps: Start-FileDownload "https://github.com/premake/premake-core/releases/download/v$($env:PREMAKE_VERSION)/premake-$($env:PREMAKE_VERSION)-windows.zip" "premake.zip"
- 7z x premake.zip
# generate solution
- premake5.exe %TOOLSET%
configuration:
- release
build:
project: avocado.sln
# TODO: Move to PowerShell script
after_build:
- ps: if ($env:platform -eq "Win32") { $env:OS = "windows32" }
- ps: if ($env:platform -eq "x64") { $env:OS = "windows64" }
- ps: $env:DATE=date +%Y%m%d
- ps: $env:COMMIT=git rev-parse --short=7 HEAD
- ps: $env:ARTIFACT="avocado-$($env:OS)-$($env:DATE)-$($env:COMMIT).zip"
- mkdir artifact
# Premake renames x86 to Win32 - undo that
- ps: if ($env:platform -eq "Win32") { $env:platform = "x86" }
# copy avocado.exe and data directory
- ps: $env:TARGETDIR = "build\$($env:CONFIGURATION)"
- ps: if ($env:platform -ne "x86") { $env:TARGETDIR = $env:TARGETDIR + "_" + $env:platform }
- ps: Copy-Item $env:TARGETDIR\avocado.exe artifact\avocado.exe
- ps: Copy-Item data artifact\ -recurse
# remove .gitignore
- ps: Get-ChildItem -Path artifact\data -Include *.gitignore -Recurse | foreach { $_.Delete()}
# make zip archive
- 7z a avocado.zip %APPVEYOR_BUILD_FOLDER%\artifact\.
- mkdir upload
- ps: Copy-Item avocado.zip -Destination upload/$env:ARTIFACT
test_script:
- .\%TARGETDIR%\avocado_test.exe --success -r junit > test-result.xml || ver > nul
- ps: Start-FileDownload 'https://gist.github.com/JaCzekanski/d7a6e06295729a3f81bd9bd488e9d37d/raw/d5bc41278fd198ef5e4afceb35e0587aca7f2f60/gte_valid_0xc0ffee_50.log'
- .\%TARGETDIR%\avocado_autotest.exe gte_valid_0xc0ffee_50.log || ver > nul
after_test:
- ps: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test-result.xml))
on_success:
- ps: .ci/windows/notify-discord.ps1 success $env:WEBHOOK_URL
on_failure:
- ps: .ci/windows/notify-discord.ps1 failure $env:WEBHOOK_URL
artifacts:
- path: avocado.zip
name: avocado
deploy_script:
- bash ./.ci/deploy.sh %DEPLOY_KEY% upload/