forked from svaarala/duktape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
170 lines (136 loc) · 9.07 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
version: "{build}"
clone_depth: 5
platform:
- x64
- x86
configuration:
- Release
matrix:
fast_finish: true
install:
- cmd: python -m pip install PyYAML
build_script:
# C:\projects\duktape
# https://en.wikipedia.org/wiki/Microsoft_Visual_Studio#History
#- cmd: set
#- cmd: dir "C:\Program Files\"
#- cmd: dir "C:\Program Files (x86)\"
# Make dist, ensure it works on Windows too.
- cmd: cd C:\projects\duktape
- cmd: python util\dist.py
# Prep a few variants of headers and sources.
- cmd: python tools\configure.py --line-directives --output-directory prep-nondll --source-directory src-input --config-metadata config
- cmd: dir prep-nondll
- cmd: python tools\configure.py --line-directives --output-directory prep-dll --source-directory src-input --config-metadata config --dll
- cmd: dir prep-dll
- cmd: python tools\configure.py --line-directives --output-directory prep-cpp --source-directory src-input --config-metadata config -DDUK_USE_CPP_EXCEPTIONS
- cmd: dir prep-cpp
# --- Visual Studio 2015 ---
# PATH doesn't include any 'cl' by default, not sure how to do this correctly.
# https://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx
# Multi-line commands are run line-by-line (?).
- cmd: set VCPATH="\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
- cmd: set VCPLATFORM=NONE
- cmd: set VCNAME=vs2015
- cmd: if "%PLATFORM%"=="x86" ( set VCPLATFORM=x86 )
- cmd: if "%PLATFORM%"=="x64" ( set VCPLATFORM=x86_amd64 )
- cmd: echo PLATFORM=%PLATFORM%, VCPLATFORM=%VCPLATFORM%
- cmd: "%VCPATH%\\vcvarsall %VCPLATFORM%"
- cmd: cl
# Normal build.
- cmd: cl /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-nondll /Iexamples\cmdline /Iextras\print-alert prep-nondll\duktape.c examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-%VCNAME%-%PLATFORM%.exe
# DLL build.
- cmd: cl /W3 /O2 /Iprep-dll /LD /Feduktape-%VCNAME%-%PLATFORM% prep-dll\duktape.c
- cmd: cl /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-dll /Iexamples\cmdline /Iextras\print-alert examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-dll-%VCNAME%-%PLATFORM%.exe duktape-%VCNAME%-%PLATFORM%.lib
# Build as C++, catches some static variable issues specific to C++.
# Also test C++ exceptions on Windows.
# /TP forces files to be interpreted as C++ despite their extension.
# /EHsc enables exception unwind support.
- cmd: cl /TP /EHsc /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-cpp /Iexamples\cmdline /Iextras\print-alert prep-cpp\duktape.c examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-cxx-%VCNAME%-%PLATFORM%.exe
# --- Visual Studio 2013 ---
- cmd: set VCPATH="\Program Files (x86)\Microsoft Visual Studio 12.0\VC"
- cmd: set VCPLATFORM=NONE
- cmd: set VCNAME=vs2013
- cmd: if "%PLATFORM%"=="x86" ( set VCPLATFORM=x86 )
- cmd: if "%PLATFORM%"=="x64" ( set VCPLATFORM=x86_amd64 )
- cmd: echo PLATFORM=%PLATFORM%, VCPLATFORM=%VCPLATFORM%
- cmd: "%VCPATH%\\vcvarsall %VCPLATFORM%"
- cmd: cl
- cmd: cl /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-nondll /Iexamples\cmdline /Iextras\print-alert prep-nondll\duktape.c examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-%VCNAME%-%PLATFORM%.exe
- cmd: cl /W3 /O2 /Iprep-dll /LD /Feduktape-%VCNAME%-%PLATFORM% prep-dll\duktape.c
- cmd: cl /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-dll /Iexamples\cmdline /Iextras\print-alert examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-dll-%VCNAME%-%PLATFORM%.exe duktape-%VCNAME%-%PLATFORM%.lib
- cmd: cl /TP /EHsc /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-cpp /Iexamples\cmdline /Iextras\print-alert prep-cpp\duktape.c examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-cxx-%VCNAME%-%PLATFORM%.exe
# --- Visual Studio 2012 ---
# Use VS2012 (11.0) to catch https://github.com/svaarala/duktape/pull/595.
- cmd: set VCPATH="\Program Files (x86)\Microsoft Visual Studio 11.0\VC"
- cmd: set VCPLATFORM=NONE
- cmd: set VCNAME=vs2012
- cmd: if "%PLATFORM%"=="x86" ( set VCPLATFORM=x86 )
- cmd: if "%PLATFORM%"=="x64" ( set VCPLATFORM=x86_amd64 )
- cmd: echo PLATFORM=%PLATFORM%, VCPLATFORM=%VCPLATFORM%
- cmd: "%VCPATH%\\vcvarsall %VCPLATFORM%"
- cmd: cl
- cmd: cl /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-nondll /Iexamples\cmdline /Iextras\print-alert prep-nondll\duktape.c examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-%VCNAME%-%PLATFORM%.exe
- cmd: cl /W3 /O2 /Iprep-dll /LD /Feduktape-%VCNAME%-%PLATFORM% prep-dll\duktape.c
- cmd: cl /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-dll /Iexamples\cmdline /Iextras\print-alert examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-dll-%VCNAME%-%PLATFORM%.exe duktape-%VCNAME%-%PLATFORM%.lib
- cmd: cl /TP /EHsc /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-cpp /Iexamples\cmdline /Iextras\print-alert prep-cpp\duktape.c examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-cxx-%VCNAME%-%PLATFORM%.exe
# --- Visual Studio 2010 ---
- cmd: set VCPATH="\Program Files (x86)\Microsoft Visual Studio 10.0\VC"
- cmd: set VCPLATFORM=NONE
- cmd: set VCNAME=vs2010
- cmd: if "%PLATFORM%"=="x86" ( set VCPLATFORM=x86 )
- cmd: if "%PLATFORM%"=="x64" ( set VCPLATFORM=x86_amd64 )
- cmd: echo PLATFORM=%PLATFORM%, VCPLATFORM=%VCPLATFORM%
- cmd: "%VCPATH%\\vcvarsall %VCPLATFORM%"
- cmd: cl
- cmd: cl /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-nondll /Iexamples\cmdline /Iextras\print-alert prep-nondll\duktape.c examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-%VCNAME%-%PLATFORM%.exe
- cmd: cl /W3 /O2 /Iprep-dll /LD /Feduktape-%VCNAME%-%PLATFORM% prep-dll\duktape.c
- cmd: cl /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-dll /Iexamples\cmdline /Iextras\print-alert examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-dll-%VCNAME%-%PLATFORM%.exe duktape-%VCNAME%-%PLATFORM%.lib
- cmd: cl /TP /EHsc /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-cpp /Iexamples\cmdline /Iextras\print-alert prep-cpp\duktape.c examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-cxx-%VCNAME%-%PLATFORM%.exe
# --- Visual Studio 2008 ---
- cmd: set VCPATH="\Program Files (x86)\Microsoft Visual Studio 9.0\VC"
- cmd: set VCPLATFORM=NONE
- cmd: set VCNAME=vs2008
- cmd: if "%PLATFORM%"=="x86" ( set VCPLATFORM=x86 )
- cmd: if "%PLATFORM%"=="x64" ( set VCPLATFORM=x86_amd64 )
- cmd: echo PLATFORM=%PLATFORM%, VCPLATFORM=%VCPLATFORM%
- cmd: "%VCPATH%\\vcvarsall %VCPLATFORM%"
- cmd: cl
- cmd: cl /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-nondll /Iexamples\cmdline /Iextras\print-alert prep-nondll\duktape.c examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-%VCNAME%-%PLATFORM%.exe
- cmd: cl /W3 /O2 /Iprep-dll /LD /Feduktape-%VCNAME%-%PLATFORM% prep-dll\duktape.c
- cmd: cl /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-dll /Iexamples\cmdline /Iextras\print-alert examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-dll-%VCNAME%-%PLATFORM%.exe duktape-%VCNAME%-%PLATFORM%.lib
- cmd: cl /TP /EHsc /W3 /O2 /DDUK_CMDLINE_PRINTALERT_SUPPORT /Iprep-cpp /Iexamples\cmdline /Iextras\print-alert prep-cpp\duktape.c examples\cmdline\duk_cmdline.c extras\print-alert\duk_print_alert.c /Feduk-cxx-%VCNAME%-%PLATFORM%.exe
test_script:
- cmd: echo --- VS2015
- cmd: duk-vs2015-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: duk-vs2015-%PLATFORM%.exe -e "print(Date.now(), performance.now(), performance.now());"
- cmd: duk-dll-vs2015-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: duk-cxx-vs2015-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: echo --- VS2013
- cmd: duk-vs2013-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: duk-dll-vs2013-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: duk-cxx-vs2013-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: echo --- VS2012
- cmd: duk-vs2012-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: duk-dll-vs2012-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: duk-cxx-vs2012-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: echo --- VS2010
- cmd: duk-vs2010-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: duk-dll-vs2010-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: duk-cxx-vs2010-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: echo --- VS2008
- cmd: duk-vs2008-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: duk-dll-vs2008-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
- cmd: duk-cxx-vs2008-%PLATFORM%.exe -e "print(Duktape.env); print('Hello world!');"
after_build:
# Show what was built.
- cmd: dir
artifacts:
- path: duk-*.exe
name: Duk command line binary
- path: duktape-*.dll
name: Duktape DLL
- path: duktape-*.exp
name: Duktape EXP
- path: duktape-*.lib
name: Duktape LIB