-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappveyor.yml
More file actions
133 lines (89 loc) · 4.21 KB
/
appveyor.yml
File metadata and controls
133 lines (89 loc) · 4.21 KB
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
version: '{branch}.{build}'
skip_tags: true
clone_folder: c:\projects\git
environment:
token:
secure: /VxMVHbl3XzhHfFGCCu81O4JPgI42lbTT+n/opdJ7LW8XMsjgW3ztAPLI3u2TBro
RUST_VERSION: rust-1.7.0
SDL_VERSION: 2.0.4
SDL_IMAGE_VERSION: 2.0.1
matrix:
- TARGET1: x86_64
TARGET2: x64
- TARGET1: i686
TARGET2: x86
install:
- ps: >-
New-Item c:\projects\downloads -type directory
New-Item c:\projects\cargo -type directory
New-Item c:\projects\sdl -type directory
New-Item c:\projects\git\artifacts -type directory
cd c:\Python27\Scripts\
./easy_install pip
./pip install --disable-pip-version-check --pre github3.py
cd c:\projects\downloads
Start-FileDownload "https://static.rust-lang.org/dist/${env:RUST_VERSION}-${env:TARGET1}-pc-windows-gnu.msi"
Start-FileDownload "https://static.rust-lang.org/cargo-dist/cargo-nightly-${env:TARGET1}-pc-windows-gnu.tar.gz"
Start-FileDownload "https://www.libsdl.org/release/SDL2-${env:SDL_VERSION}-win32-${env:TARGET2}.zip"
Start-FileDownload "https://www.libsdl.org/release/SDL2-devel-${env:SDL_VERSION}-mingw.tar.gz"
Start-FileDownload "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-${env:SDL_IMAGE_VERSION}-mingw.tar.gz"
Start-FileDownload "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${env:SDL_IMAGE_VERSION}-win32-${env:TARGET2}.zip"
If (${env:TARGET2} -eq "x86") {
Start-FileDownload "http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.8.1-4/gcc-core-4.8.1-4-mingw32-dll.tar.lzma"
}
Start-Process -FilePath msiexec -ArgumentList /i, ${env:RUST_VERSION}-${env:TARGET1}-pc-windows-gnu.msi, INSTALLDIR="c:\projects\rust", /quiet -Wait
7z x cargo-nightly-${env:TARGET1}-pc-windows-gnu.tar.gz
7z x cargo-nightly-${env:TARGET1}-pc-windows-gnu.tar
7z x SDL2-${env:SDL_VERSION}-win32-${env:TARGET2}.zip
7z x SDL2-devel-${env:SDL_VERSION}-mingw.tar.gz
7z x SDL2-devel-${env:SDL_VERSION}-mingw.tar
7z x SDL2_image-devel-${env:SDL_IMAGE_VERSION}-mingw.tar.gz
7z x SDL2_image-devel-${env:SDL_IMAGE_VERSION}-mingw.tar
7z x SDL2_image-${env:SDL_IMAGE_VERSION}-win32-${env:TARGET2}.zip
If (${env:TARGET2} -eq "x86") {
7z x gcc-core-4.8.1-4-mingw32-dll.tar.lzma
}
If (${env:TARGET2} -eq "x86") {
7z x gcc-core-4.8.1-4-mingw32-dll.tar
}
Copy-Item cargo-nightly-${env:TARGET1}-pc-windows-gnu\cargo\* c:\projects\cargo\ -recurse
Copy-Item SDL2-${env:SDL_VERSION}\${env:TARGET1}-w64-mingw32\lib\libSDL2.dll.a c:\projects\rust\lib\rustlib\${env:TARGET1}-pc-windows-gnu\lib\
Copy-Item SDL2_image-${env:SDL_IMAGE_VERSION}\${env:TARGET1}-w64-mingw32\lib\libSDL2_image.dll.a c:\projects\rust\lib\rustlib\${env:TARGET1}-pc-windows-gnu\lib\
Copy-Item *.dll c:\projects\sdl\
Copy-Item *.dll c:\projects\git\artifacts\
If (${env:TARGET2} -eq "x86") {
Copy-Item bin\libgcc_s_dw2-1.dll c:\projects\git\artifacts\
}
Copy-Item c:\projects\git\media c:\projects\git\artifacts\ -recurse
$env:Path += ";c:\projects\rust\bin"
$env:Path += ";c:\projects\cargo\bin"
$env:Path += ";c:\projects\sdl"
cd c:\projects\git
rustc -V
cargo -V
build_script:
- ps: >-
cargo build --release -v
Copy-Item target\release\rust-software-render.exe artifacts\
test_script:
- ps: cargo test -v
before_deploy:
- ps: python -c"from github3 import login;import os;map(lambda x:x.delete(),[it for it in login(token=os.environ['token']).repository('ReanGD','rust-software-render').releases() if it.tag_name==os.environ['APPVEYOR_REPO_BRANCH']+'-'+os.environ['TARGET2']+'-win'])"
artifacts:
- path: artifacts
name: artifacts
deploy:
- provider: GitHub
tag: $(APPVEYOR_REPO_BRANCH)-$(TARGET2)-win
release: $(APPVEYOR_REPO_BRANCH)-$(TARGET2)-win
description: $(APPVEYOR_REPO_BRANCH)-$(TARGET2) for windows
auth_token:
secure: /VxMVHbl3XzhHfFGCCu81O4JPgI42lbTT+n/opdJ7LW8XMsjgW3ztAPLI3u2TBro
artifact: artifacts.zip
notifications:
- provider: Email
to:
- reangd@yandex.ru
on_build_success: false
on_build_failure: true
on_build_status_changed: false