mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
169 lines
9.0 KiB
169 lines
9.0 KiB
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-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
|
|
|