blob: 75a63c87211222d9a817f9e8e16d2272339b1aac [file] [log] [blame]
Wouter van Oortmerssenf6240652016-07-27 17:34:00 -07001branches:
2 only:
3 - master
4
5os: Visual Studio 2015
6
Wouter van Oortmerssen0c80b3a2017-04-24 10:04:34 -07007environment:
Kevin Rose3282a842017-08-01 10:34:00 -05008
9 global:
10 # Workaround for https://github.com/conda/conda-build/issues/636
11 PYTHONIOENCODING: UTF-8
12 CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
13
Wouter van Oortmerssen0c80b3a2017-04-24 10:04:34 -070014 matrix:
15 - CMAKE_VS_VERSION: "10 2010"
Vladimir Glavnyydd288f72019-01-08 01:04:44 +070016 MONSTER_EXTRA: "skip"
17
Uilian Ries1f03bec2018-08-16 16:17:52 -030018 - CMAKE_VS_VERSION: "12 2013"
Vladimir Glavnyydd288f72019-01-08 01:04:44 +070019 MONSTER_EXTRA: "skip"
20
Wouter van Oortmerssen0c80b3a2017-04-24 10:04:34 -070021 - CMAKE_VS_VERSION: "14 2015"
Vladimir Glavnyydd288f72019-01-08 01:04:44 +070022 MONSTER_EXTRA: ""
Wouter van Oortmerssen0c80b3a2017-04-24 10:04:34 -070023
Wouter van Oortmerssenf6240652016-07-27 17:34:00 -070024platform:
25 - x86
26 - x64
27
28configuration:
29 - Debug
30 - Release
31
32before_build:
Vladimir Glavnyydd288f72019-01-08 01:04:44 +070033 - set MONSTER_EXTRA=%MONSTER_EXTRA%
Wouter van Oortmerssen78c50e32019-02-14 16:20:27 -080034 - cmake -G"Visual Studio %CMAKE_VS_VERSION%" -DFLATBUFFERS_CODE_SANITIZE=1 .
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080035 # This cuts down on a lot of noise generated by xamarin warnings.
36 - del "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
Wouter van Oortmerssenf6240652016-07-27 17:34:00 -070037
38build:
39 project: ALL_BUILD.vcxproj
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080040 verbosity: minimal
Wouter van Oortmerssenf6240652016-07-27 17:34:00 -070041
Uilian Ries1f03bec2018-08-16 16:17:52 -030042after_build:
43 - python conan/appveyor/install.py
44 - python conan/appveyor/build.py
45
Kevin Rose3282a842017-08-01 10:34:00 -050046install:
47 - set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
Robert02a78072018-09-12 11:44:51 -070048 - curl -sSf -o rustup-init.exe https://win.rustup.rs/
49 - rustup-init.exe -y
50 - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
51 - rustc -V
52 - cargo -V
Kevin Rose3282a842017-08-01 10:34:00 -050053
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080054test_script:
Frank Benksteinefbb11e2018-10-22 15:41:12 -070055 - call .appveyor\check-generate-code.bat -b %CONFIGURATION%
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080056 - "cd tests"
Kevin Rose3282a842017-08-01 10:34:00 -050057 - rem "Building all code"
58 - generate_code.bat -b %CONFIGURATION%
59 - 7z a GeneratedMyGameCode.zip MyGame\
60 - rem "---------------- C++ -----------------"
61 - "cd .."
62 - "%CONFIGURATION%\\flattests.exe"
63 - "cd tests"
64 - rem "---------------- Java -----------------"
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080065 - "java -version"
66 - "JavaTest.bat"
Robert02a78072018-09-12 11:44:51 -070067 - rem "---------------- Rust ----------------"
68 - "RustTest.bat"
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080069 - rem "---------------- JS -----------------"
70 - "node --version"
Wouter van Oortmerssen22743ca2017-05-24 15:21:26 -070071 - "..\\%CONFIGURATION%\\flatc -b -I include_test monster_test.fbs unicode_test.json"
Kamil Rojewski808b44f2017-04-21 18:29:42 +020072 - "node JavaScriptTest ./monster_test_generated"
Kevin Rose3282a842017-08-01 10:34:00 -050073 - rem "-------------- Python ---------------"
74 - where python
75 - python --version
76 - where pip
77 - pip --version
78 - where conda
79 - conda --version
80 - rem "installing flatbuffers python library"
81 - pip install ../python
82 - rem "testing without installing Numpy"
83 - python py_test.py 0 0 0
Wouter van Oortmerssen1f0bd122017-08-24 13:46:46 -070084 - rem "testing after installing Numpy - disabled"
85 # FIXME: This has a LOT of unnecessary dependencies and makes the tests fail
86 # with timeouts.
87 # - conda install --yes numpy
88 # - python py_test.py 0 0 0
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080089 - rem "---------------- C# -----------------"
90 # Have to compile this here rather than in "build" above because AppVeyor only
91 # supports building one project??
92 - "cd FlatBuffers.Test"
93 - "msbuild.exe /property:Configuration=Release;OutputPath=tempcs /verbosity:minimal FlatBuffers.Test.csproj"
94 - "tempcs\\FlatBuffers.Test.exe"
Eric Erhardt0cdacdf2019-02-21 16:36:55 -060095 # Run tests with UNSAFE_BYTEBUFFER
96 - "msbuild.exe /property:Configuration=Release;UnsafeByteBuffer=true;OutputPath=tempcsUnsafe /verbosity:minimal FlatBuffers.Test.csproj"
97 - "tempcsUnsafe\\FlatBuffers.Test.exe"
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080098 # TODO: add more languages.
99 - "cd ..\\.."
Wouter van Oortmerssenf6240652016-07-27 17:34:00 -0700100
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -0800101artifacts:
Kevin Rose3282a842017-08-01 10:34:00 -0500102 - path: $(CONFIGURATION)\flatc.exe
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -0800103 name: flatc.exe
Kevin Rose3282a842017-08-01 10:34:00 -0500104 - path: tests\GeneratedMyGameCode.zip
105 name: GeneratedMyGameCode.zip