CI check generate code (#4998)
[platform/upstream/flatbuffers.git] / appveyor.yml
1 branches:
2   only:
3     - master
4
5 os: Visual Studio 2015
6
7 environment:
8
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
14   matrix:
15     - CMAKE_VS_VERSION: "10 2010"
16     - CMAKE_VS_VERSION: "12 2013"
17     - CMAKE_VS_VERSION: "14 2015"
18
19 platform:
20   - x86
21   - x64
22
23 configuration:
24   - Debug
25   - Release
26
27 before_build:
28   - cmake -G"Visual Studio %CMAKE_VS_VERSION%"
29   # This cuts down on a lot of noise generated by xamarin warnings.
30   - del "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
31
32 build:
33   project: ALL_BUILD.vcxproj
34   verbosity: minimal
35
36 after_build:
37   - python conan/appveyor/install.py
38   - python conan/appveyor/build.py
39
40 install:
41   - set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
42   - curl -sSf -o rustup-init.exe https://win.rustup.rs/
43   - rustup-init.exe -y
44   - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
45   - rustc -V
46   - cargo -V
47
48 test_script:
49   - call .appveyor\check-generate-code.bat -b %CONFIGURATION%
50   - "cd tests"
51   - rem "Building all code"
52   - generate_code.bat -b %CONFIGURATION%
53   - 7z a GeneratedMyGameCode.zip MyGame\
54   - rem "---------------- C++ -----------------"
55   - "cd .."
56   - "%CONFIGURATION%\\flattests.exe"
57   - "cd tests"
58   - rem "---------------- Java -----------------"
59   - "java -version"
60   - "JavaTest.bat"
61   - rem "---------------- Rust ----------------"
62   - "RustTest.bat"
63   - rem "---------------- JS -----------------"
64   - "node --version"
65   - "..\\%CONFIGURATION%\\flatc -b -I include_test monster_test.fbs unicode_test.json"
66   - "node JavaScriptTest ./monster_test_generated"
67   - rem "-------------- Python ---------------"
68   - where python
69   - python --version
70   - where pip
71   - pip --version
72   - where conda
73   - conda --version
74   - rem "installing flatbuffers python library"
75   - pip install ../python
76   - rem "testing without installing Numpy"
77   - python py_test.py 0 0 0
78   - rem "testing after installing Numpy - disabled"
79   # FIXME: This has a LOT of unnecessary dependencies and makes the tests fail
80   # with timeouts.
81   # - conda install --yes numpy
82   # - python py_test.py 0 0 0
83   - rem "---------------- C# -----------------"
84   # Have to compile this here rather than in "build" above because AppVeyor only
85   # supports building one project??
86   - "cd FlatBuffers.Test"
87   - "msbuild.exe /property:Configuration=Release;OutputPath=tempcs /verbosity:minimal FlatBuffers.Test.csproj"
88   - "tempcs\\FlatBuffers.Test.exe"
89   # TODO: add more languages.
90   - "cd ..\\.."
91
92 artifacts:
93   - path: $(CONFIGURATION)\flatc.exe
94     name: flatc.exe
95   - path: tests\GeneratedMyGameCode.zip
96     name: GeneratedMyGameCode.zip