blob: e42fecebd87fccc7fd47fc1ad993c7f503c0bbf7 [file] [log] [blame]
Wouter van Oortmerssenf6240652016-07-27 17:34:00 -07001branches:
2 only:
3 - master
4
Wouter van Oortmerssen0c80b3a2017-04-24 10:04:34 -07005environment:
Kevin Rose3282a842017-08-01 10:34:00 -05006
7 global:
8 # Workaround for https://github.com/conda/conda-build/issues/636
9 PYTHONIOENCODING: UTF-8
10 CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
Haibo Huangb9f6b1a2020-03-16 15:41:29 -070011 CMAKE_OPTIONS: ""
12 CPP_TEST_OPTIONS: ""
Kevin Rose3282a842017-08-01 10:34:00 -050013
Wouter van Oortmerssen0c80b3a2017-04-24 10:04:34 -070014 matrix:
Haibo Huangb9f6b1a2020-03-16 15:41:29 -070015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
16 CMAKE_VS_VERSION: "10 2010"
17 CMAKE_OPTIONS: "-DFLATBUFFERS_BUILD_LEGACY=1"
18 CPP_TEST_OPTIONS: "--std-cpp c++0x"
Vladimir Glavnyydd288f72019-01-08 01:04:44 +070019 MONSTER_EXTRA: "skip"
20
Haibo Huangb9f6b1a2020-03-16 15:41:29 -070021 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
22 CMAKE_VS_VERSION: "12 2013"
Vladimir Glavnyydd288f72019-01-08 01:04:44 +070023 MONSTER_EXTRA: "skip"
24
Haibo Huangb9f6b1a2020-03-16 15:41:29 -070025 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
26 CMAKE_VS_VERSION: "14 2015"
27 MONSTER_EXTRA: ""
28
29 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
30 CMAKE_VS_VERSION: "15 2017"
31 MONSTER_EXTRA: ""
32
33 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
34 CMAKE_VS_VERSION: "16 2019"
Vladimir Glavnyydd288f72019-01-08 01:04:44 +070035 MONSTER_EXTRA: ""
Wouter van Oortmerssen0c80b3a2017-04-24 10:04:34 -070036
Wouter van Oortmerssenf6240652016-07-27 17:34:00 -070037platform:
38 - x86
39 - x64
40
41configuration:
42 - Debug
43 - Release
44
45before_build:
Vladimir Glavnyydd288f72019-01-08 01:04:44 +070046 - set MONSTER_EXTRA=%MONSTER_EXTRA%
Haibo Huangb9f6b1a2020-03-16 15:41:29 -070047 - cmake . -G"Visual Studio %CMAKE_VS_VERSION%" -DFLATBUFFERS_CODE_SANITIZE=1 %CMAKE_OPTIONS%
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080048 # This cuts down on a lot of noise generated by xamarin warnings.
Haibo Huangb9f6b1a2020-03-16 15:41:29 -070049 - if exist "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets" del "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
50 - if exist "C:\Program Files (x86)\MSBuild\15.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets" del "C:\Program Files (x86)\MSBuild\15.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
51 - if exist "C:\Program Files (x86)\MSBuild\16.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets" del "C:\Program Files (x86)\MSBuild\16.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
Wouter van Oortmerssenf6240652016-07-27 17:34:00 -070052
53build:
54 project: ALL_BUILD.vcxproj
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080055 verbosity: minimal
Wouter van Oortmerssenf6240652016-07-27 17:34:00 -070056
Uilian Ries1f03bec2018-08-16 16:17:52 -030057after_build:
58 - python conan/appveyor/install.py
59 - python conan/appveyor/build.py
60
Kevin Rose3282a842017-08-01 10:34:00 -050061install:
62 - set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
Robert02a78072018-09-12 11:44:51 -070063 - curl -sSf -o rustup-init.exe https://win.rustup.rs/
64 - rustup-init.exe -y
65 - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
66 - rustc -V
67 - cargo -V
Kevin Rose3282a842017-08-01 10:34:00 -050068
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080069test_script:
Frank Benksteinefbb11e2018-10-22 15:41:12 -070070 - call .appveyor\check-generate-code.bat -b %CONFIGURATION%
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080071 - "cd tests"
Kevin Rose3282a842017-08-01 10:34:00 -050072 - rem "Building all code"
Haibo Huangb9f6b1a2020-03-16 15:41:29 -070073 - generate_code.bat -b %CONFIGURATION% %CPP_TEST_OPTIONS%
Kevin Rose3282a842017-08-01 10:34:00 -050074 - 7z a GeneratedMyGameCode.zip MyGame\
75 - rem "---------------- C++ -----------------"
76 - "cd .."
77 - "%CONFIGURATION%\\flattests.exe"
78 - "cd tests"
79 - rem "---------------- Java -----------------"
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080080 - "java -version"
81 - "JavaTest.bat"
Robert02a78072018-09-12 11:44:51 -070082 - rem "---------------- Rust ----------------"
83 - "RustTest.bat"
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -080084 - rem "---------------- JS -----------------"
85 - "node --version"
Wouter van Oortmerssen22743ca2017-05-24 15:21:26 -070086 - "..\\%CONFIGURATION%\\flatc -b -I include_test monster_test.fbs unicode_test.json"
Kamil Rojewski808b44f2017-04-21 18:29:42 +020087 - "node JavaScriptTest ./monster_test_generated"
Kevin Rose3282a842017-08-01 10:34:00 -050088 - rem "-------------- Python ---------------"
89 - where python
90 - python --version
91 - where pip
92 - pip --version
93 - where conda
94 - conda --version
95 - rem "installing flatbuffers python library"
96 - pip install ../python
97 - rem "testing without installing Numpy"
98 - python py_test.py 0 0 0
Wouter van Oortmerssen1f0bd122017-08-24 13:46:46 -070099 - rem "testing after installing Numpy - disabled"
100 # FIXME: This has a LOT of unnecessary dependencies and makes the tests fail
101 # with timeouts.
102 # - conda install --yes numpy
103 # - python py_test.py 0 0 0
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -0800104 - rem "---------------- C# -----------------"
105 # Have to compile this here rather than in "build" above because AppVeyor only
106 # supports building one project??
107 - "cd FlatBuffers.Test"
Haibo Huangb9f6b1a2020-03-16 15:41:29 -0700108 - "copy ..\\monsterdata_test.mon Resources\\"
109 - "copy ..\\monsterdata_test.json Resources\\"
110 - "dotnet new sln"
111 - "dotnet sln add FlatBuffers.Test.csproj"
112 - "nuget restore"
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -0800113 - "msbuild.exe /property:Configuration=Release;OutputPath=tempcs /verbosity:minimal FlatBuffers.Test.csproj"
114 - "tempcs\\FlatBuffers.Test.exe"
Eric Erhardt0cdacdf2019-02-21 16:36:55 -0600115 # Run tests with UNSAFE_BYTEBUFFER
116 - "msbuild.exe /property:Configuration=Release;UnsafeByteBuffer=true;OutputPath=tempcsUnsafe /verbosity:minimal FlatBuffers.Test.csproj"
117 - "tempcsUnsafe\\FlatBuffers.Test.exe"
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -0800118 # TODO: add more languages.
119 - "cd ..\\.."
Wouter van Oortmerssenf6240652016-07-27 17:34:00 -0700120
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -0800121artifacts:
Kevin Rose3282a842017-08-01 10:34:00 -0500122 - path: $(CONFIGURATION)\flatc.exe
Wouter van Oortmerssen2a7a44b2016-12-12 15:43:49 -0800123 name: flatc.exe
Kevin Rose3282a842017-08-01 10:34:00 -0500124 - path: tests\GeneratedMyGameCode.zip
125 name: GeneratedMyGameCode.zip