[idl_parser] Add kTokenNumericConstant token (#6432)
[platform/upstream/flatbuffers.git] / appveyor.yml
index 2cd22e9..b6e641a 100644 (file)
@@ -2,23 +2,29 @@ branches:
   only:
     - master
 
-os: Visual Studio 2015
-
 environment:
+  nodejs_version: "14"
 
   global:
     # Workaround for https://github.com/conda/conda-build/issues/636
     PYTHONIOENCODING: UTF-8
     CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
+    CMAKE_OPTIONS: ""
+    CPP_TEST_OPTIONS: ""
 
   matrix:
-    - CMAKE_VS_VERSION: "10 2010"
+    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+      CMAKE_VS_VERSION: "10 2010"
+      CMAKE_OPTIONS: "-DFLATBUFFERS_BUILD_LEGACY=1"
+      CPP_TEST_OPTIONS: "--std-cpp c++0x"
       MONSTER_EXTRA: "skip"
 
-    - CMAKE_VS_VERSION: "12 2013"
+    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+      CMAKE_VS_VERSION: "12 2013"
       MONSTER_EXTRA: "skip"
 
-    - CMAKE_VS_VERSION: "14 2015"
+    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+      CMAKE_VS_VERSION: "14 2015"
       MONSTER_EXTRA: ""
 
 platform:
@@ -31,9 +37,9 @@ configuration:
 
 before_build:
   - set MONSTER_EXTRA=%MONSTER_EXTRA%
-  - cmake -G"Visual Studio %CMAKE_VS_VERSION%"
+  - cmake . -G"Visual Studio %CMAKE_VS_VERSION%" -DFLATBUFFERS_CODE_SANITIZE=1 %CMAKE_OPTIONS%
   # This cuts down on a lot of noise generated by xamarin warnings.
-  - del "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
+  - 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"
 
 build:
   project: ALL_BUILD.vcxproj
@@ -45,55 +51,36 @@ after_build:
 
 install:
   - set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
-  - curl -sSf -o rustup-init.exe https://win.rustup.rs/
-  - rustup-init.exe -y
-  - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
-  - rustc -V
-  - cargo -V
+  - ps: Install-Product node $env:nodejs_version
 
 test_script:
   - call .appveyor\check-generate-code.bat -b %CONFIGURATION%
   - "cd tests"
   - rem "Building all code"
-  - generate_code.bat -b %CONFIGURATION%
+  - generate_code.bat -b %CONFIGURATION% %CPP_TEST_OPTIONS%
   - 7z a GeneratedMyGameCode.zip MyGame\
   - rem "---------------- C++ -----------------"
   - "cd .."
   - "%CONFIGURATION%\\flattests.exe"
-  - "cd tests"
-  - rem "---------------- Java -----------------"
-  - "java -version"
-  - "JavaTest.bat"
-  - rem "---------------- Rust ----------------"
-  - "RustTest.bat"
   - rem "---------------- JS -----------------"
   - "node --version"
-  - "..\\%CONFIGURATION%\\flatc -b -I include_test monster_test.fbs unicode_test.json"
-  - "node JavaScriptTest ./monster_test_generated"
-  - rem "-------------- Python ---------------"
-  - where python
-  - python --version
-  - where pip
-  - pip --version
-  - where conda
-  - conda --version
-  - rem "installing flatbuffers python library"
-  - pip install ../python
-  - rem "testing without installing Numpy"
-  - python py_test.py 0 0 0
-  - rem "testing after installing Numpy - disabled"
-  # FIXME: This has a LOT of unnecessary dependencies and makes the tests fail
-  # with timeouts.
-  # - conda install --yes numpy
-  # - python py_test.py 0 0 0
+  - "npm install"
+  - "npm run compile"
+  - "cd tests"
+  - "TypeScriptTest.bat"
   - rem "---------------- C# -----------------"
   # Have to compile this here rather than in "build" above because AppVeyor only
   # supports building one project??
   - "cd FlatBuffers.Test"
-  - "msbuild.exe /property:Configuration=Release;OutputPath=tempcs /verbosity:minimal FlatBuffers.Test.csproj"
-  - "tempcs\\FlatBuffers.Test.exe"
-  # TODO: add more languages.
-  - "cd ..\\.."
+  - "dotnet new sln"
+  - "dotnet sln add FlatBuffers.Test.csproj"
+  - "nuget restore"
+  - "mkdir .tmp"
+  - "msbuild.exe /property:Configuration=Release;OutputPath=.tmp /verbosity:minimal FlatBuffers.Test.csproj"
+  - ".tmp\\FlatBuffers.Test.exe"
+  # Run tests with UNSAFE_BYTEBUFFER
+  - "msbuild.exe /property:Configuration=Release;UnsafeByteBuffer=true;OutputPath=.tmp /verbosity:minimal FlatBuffers.Test.csproj"
+  - ".tmp\\FlatBuffers.Test.exe"
 
 artifacts:
   - path: $(CONFIGURATION)\flatc.exe