[C++] Add ParseJson(), Parser(Parser&&), update fuzzers (#6284)
[platform/upstream/flatbuffers.git] / appveyor.yml
1 branches:
2   only:
3     - master
4
5 environment:
6
7   global:
8     # Workaround for https://github.com/conda/conda-build/issues/636
9     PYTHONIOENCODING: UTF-8
10     CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
11     CMAKE_OPTIONS: ""
12     CPP_TEST_OPTIONS: ""
13
14   matrix:
15     - 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"
19       MONSTER_EXTRA: "skip"
20
21     - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
22       CMAKE_VS_VERSION: "12 2013"
23       MONSTER_EXTRA: "skip"
24
25     - 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       CMAKE_OPTIONS: "-DFLATBUFFERS_ENABLE_PCH=1"
32       MONSTER_EXTRA: ""
33
34     - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
35       CMAKE_VS_VERSION: "16 2019"
36       CMAKE_OPTIONS: "-DFLATBUFFERS_ENABLE_PCH=1"
37       MONSTER_EXTRA: ""
38
39 platform:
40   - x86
41   - x64
42
43 configuration:
44   - Debug
45   - Release
46
47 before_build:
48   - set MONSTER_EXTRA=%MONSTER_EXTRA%
49   - cmake . -G"Visual Studio %CMAKE_VS_VERSION%" -DFLATBUFFERS_CODE_SANITIZE=1 %CMAKE_OPTIONS%
50   # This cuts down on a lot of noise generated by xamarin warnings.
51   - 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"
52   - 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"
53   - 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"
54
55 build:
56   project: ALL_BUILD.vcxproj
57   verbosity: minimal
58
59 after_build:
60   - python conan/appveyor/install.py
61   - python conan/appveyor/build.py
62
63 install:
64   - set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
65   - curl -sSf -o rustup-init.exe https://win.rustup.rs/
66   - rustup-init.exe -y
67   - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
68   - rustc -V
69   - cargo -V
70
71 test_script:
72   - call .appveyor\check-generate-code.bat -b %CONFIGURATION%
73   - "cd tests"
74   - rem "Building all code"
75   - generate_code.bat -b %CONFIGURATION% %CPP_TEST_OPTIONS%
76   - 7z a GeneratedMyGameCode.zip MyGame\
77   - rem "---------------- C++ -----------------"
78   - "cd .."
79   - "%CONFIGURATION%\\flattests.exe"
80   - "cd tests"
81   - rem "---------------- Java -----------------"
82   - "java -version"
83   - "JavaTest.bat"
84   - rem "---------------- Rust ----------------"
85   - "RustTest.bat"
86   - rem "---------------- JS -----------------"
87   - "node --version"
88   - "..\\%CONFIGURATION%\\flatc -b -I include_test monster_test.fbs unicode_test.json"
89   - "npm install"
90   - "npm run pretest"
91   - "node JavaScriptTest ./monster_test_generated"
92   - rem "-------------- Python ---------------"
93   - where python
94   - python --version
95   - where pip
96   - pip --version
97   - where conda
98   - conda --version
99   - rem "installing flatbuffers python library"
100   - pip install ../python
101   - rem "testing without installing Numpy"
102   - python py_test.py 0 0 0
103   - rem "testing after installing Numpy - disabled"
104   # FIXME: This has a LOT of unnecessary dependencies and makes the tests fail
105   # with timeouts.
106   # - conda install --yes numpy
107   # - python py_test.py 0 0 0
108   - rem "---------------- C# -----------------"
109   # Have to compile this here rather than in "build" above because AppVeyor only
110   # supports building one project??
111   - "cd FlatBuffers.Test"
112   - "dotnet new sln"
113   - "dotnet sln add FlatBuffers.Test.csproj"
114   - "nuget restore"
115   - "mkdir .tmp"
116   - "msbuild.exe /property:Configuration=Release;OutputPath=.tmp /verbosity:minimal FlatBuffers.Test.csproj"
117   - ".tmp\\FlatBuffers.Test.exe"
118   # Run tests with UNSAFE_BYTEBUFFER
119   - "msbuild.exe /property:Configuration=Release;UnsafeByteBuffer=true;OutputPath=.tmp /verbosity:minimal FlatBuffers.Test.csproj"
120   - ".tmp\\FlatBuffers.Test.exe"
121   # TODO: add more languages.
122   - "cd ..\\.."
123
124 artifacts:
125   - path: $(CONFIGURATION)\flatc.exe
126     name: flatc.exe
127   - path: tests\GeneratedMyGameCode.zip
128     name: GeneratedMyGameCode.zip