1branches: 2 only: 3 - master 4 5environment: 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 MONSTER_EXTRA: "" 32 33 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 34 CMAKE_VS_VERSION: "16 2019" 35 MONSTER_EXTRA: "" 36 37platform: 38 - x86 39 - x64 40 41configuration: 42 - Debug 43 - Release 44 45before_build: 46 - set MONSTER_EXTRA=%MONSTER_EXTRA% 47 - cmake . -G"Visual Studio %CMAKE_VS_VERSION%" -DFLATBUFFERS_CODE_SANITIZE=1 %CMAKE_OPTIONS% 48 # This cuts down on a lot of noise generated by xamarin warnings. 49 - 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" 52 53build: 54 project: ALL_BUILD.vcxproj 55 verbosity: minimal 56 57after_build: 58 - python conan/appveyor/install.py 59 - python conan/appveyor/build.py 60 61install: 62 - set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%; 63 - 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 68 69test_script: 70 - call .appveyor\check-generate-code.bat -b %CONFIGURATION% 71 - "cd tests" 72 - rem "Building all code" 73 - generate_code.bat -b %CONFIGURATION% %CPP_TEST_OPTIONS% 74 - 7z a GeneratedMyGameCode.zip MyGame\ 75 - rem "---------------- C++ -----------------" 76 - "cd .." 77 - "%CONFIGURATION%\\flattests.exe" 78 - "cd tests" 79 - rem "---------------- Java -----------------" 80 - "java -version" 81 - "JavaTest.bat" 82 - rem "---------------- Rust ----------------" 83 - "RustTest.bat" 84 - rem "---------------- JS -----------------" 85 - "node --version" 86 - "..\\%CONFIGURATION%\\flatc -b -I include_test monster_test.fbs unicode_test.json" 87 - "node JavaScriptTest ./monster_test_generated" 88 - 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 99 - 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 104 - 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" 108 - "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" 113 - "msbuild.exe /property:Configuration=Release;OutputPath=tempcs /verbosity:minimal FlatBuffers.Test.csproj" 114 - "tempcs\\FlatBuffers.Test.exe" 115 # 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" 118 # TODO: add more languages. 119 - "cd ..\\.." 120 121artifacts: 122 - path: $(CONFIGURATION)\flatc.exe 123 name: flatc.exe 124 - path: tests\GeneratedMyGameCode.zip 125 name: GeneratedMyGameCode.zip 126