Wouter van Oortmerssen | f624065 | 2016-07-27 17:34:00 -0700 | [diff] [blame] | 1 | branches: |
| 2 | only: |
| 3 | - master |
| 4 | |
Wouter van Oortmerssen | 0c80b3a | 2017-04-24 10:04:34 -0700 | [diff] [blame] | 5 | environment: |
Kevin Rose | 3282a84 | 2017-08-01 10:34:00 -0500 | [diff] [blame] | 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" |
Haibo Huang | b9f6b1a | 2020-03-16 15:41:29 -0700 | [diff] [blame] | 11 | CMAKE_OPTIONS: "" |
| 12 | CPP_TEST_OPTIONS: "" |
Kevin Rose | 3282a84 | 2017-08-01 10:34:00 -0500 | [diff] [blame] | 13 | |
Wouter van Oortmerssen | 0c80b3a | 2017-04-24 10:04:34 -0700 | [diff] [blame] | 14 | matrix: |
Haibo Huang | b9f6b1a | 2020-03-16 15:41:29 -0700 | [diff] [blame] | 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" |
Vladimir Glavnyy | dd288f7 | 2019-01-08 01:04:44 +0700 | [diff] [blame] | 19 | MONSTER_EXTRA: "skip" |
| 20 | |
Haibo Huang | b9f6b1a | 2020-03-16 15:41:29 -0700 | [diff] [blame] | 21 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 |
| 22 | CMAKE_VS_VERSION: "12 2013" |
Vladimir Glavnyy | dd288f7 | 2019-01-08 01:04:44 +0700 | [diff] [blame] | 23 | MONSTER_EXTRA: "skip" |
| 24 | |
Haibo Huang | b9f6b1a | 2020-03-16 15:41:29 -0700 | [diff] [blame] | 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" |
Vladimir Glavnyy | dd288f7 | 2019-01-08 01:04:44 +0700 | [diff] [blame] | 35 | MONSTER_EXTRA: "" |
Wouter van Oortmerssen | 0c80b3a | 2017-04-24 10:04:34 -0700 | [diff] [blame] | 36 | |
Wouter van Oortmerssen | f624065 | 2016-07-27 17:34:00 -0700 | [diff] [blame] | 37 | platform: |
| 38 | - x86 |
| 39 | - x64 |
| 40 | |
| 41 | configuration: |
| 42 | - Debug |
| 43 | - Release |
| 44 | |
| 45 | before_build: |
Vladimir Glavnyy | dd288f7 | 2019-01-08 01:04:44 +0700 | [diff] [blame] | 46 | - set MONSTER_EXTRA=%MONSTER_EXTRA% |
Haibo Huang | b9f6b1a | 2020-03-16 15:41:29 -0700 | [diff] [blame] | 47 | - cmake . -G"Visual Studio %CMAKE_VS_VERSION%" -DFLATBUFFERS_CODE_SANITIZE=1 %CMAKE_OPTIONS% |
Wouter van Oortmerssen | 2a7a44b | 2016-12-12 15:43:49 -0800 | [diff] [blame] | 48 | # This cuts down on a lot of noise generated by xamarin warnings. |
Haibo Huang | b9f6b1a | 2020-03-16 15:41:29 -0700 | [diff] [blame] | 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" |
Wouter van Oortmerssen | f624065 | 2016-07-27 17:34:00 -0700 | [diff] [blame] | 52 | |
| 53 | build: |
| 54 | project: ALL_BUILD.vcxproj |
Wouter van Oortmerssen | 2a7a44b | 2016-12-12 15:43:49 -0800 | [diff] [blame] | 55 | verbosity: minimal |
Wouter van Oortmerssen | f624065 | 2016-07-27 17:34:00 -0700 | [diff] [blame] | 56 | |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 57 | after_build: |
| 58 | - python conan/appveyor/install.py |
| 59 | - python conan/appveyor/build.py |
| 60 | |
Kevin Rose | 3282a84 | 2017-08-01 10:34:00 -0500 | [diff] [blame] | 61 | install: |
| 62 | - set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%; |
Robert | 02a7807 | 2018-09-12 11:44:51 -0700 | [diff] [blame] | 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 |
Kevin Rose | 3282a84 | 2017-08-01 10:34:00 -0500 | [diff] [blame] | 68 | |
Wouter van Oortmerssen | 2a7a44b | 2016-12-12 15:43:49 -0800 | [diff] [blame] | 69 | test_script: |
Frank Benkstein | efbb11e | 2018-10-22 15:41:12 -0700 | [diff] [blame] | 70 | - call .appveyor\check-generate-code.bat -b %CONFIGURATION% |
Wouter van Oortmerssen | 2a7a44b | 2016-12-12 15:43:49 -0800 | [diff] [blame] | 71 | - "cd tests" |
Kevin Rose | 3282a84 | 2017-08-01 10:34:00 -0500 | [diff] [blame] | 72 | - rem "Building all code" |
Haibo Huang | b9f6b1a | 2020-03-16 15:41:29 -0700 | [diff] [blame] | 73 | - generate_code.bat -b %CONFIGURATION% %CPP_TEST_OPTIONS% |
Kevin Rose | 3282a84 | 2017-08-01 10:34:00 -0500 | [diff] [blame] | 74 | - 7z a GeneratedMyGameCode.zip MyGame\ |
| 75 | - rem "---------------- C++ -----------------" |
| 76 | - "cd .." |
| 77 | - "%CONFIGURATION%\\flattests.exe" |
| 78 | - "cd tests" |
| 79 | - rem "---------------- Java -----------------" |
Wouter van Oortmerssen | 2a7a44b | 2016-12-12 15:43:49 -0800 | [diff] [blame] | 80 | - "java -version" |
| 81 | - "JavaTest.bat" |
Robert | 02a7807 | 2018-09-12 11:44:51 -0700 | [diff] [blame] | 82 | - rem "---------------- Rust ----------------" |
| 83 | - "RustTest.bat" |
Wouter van Oortmerssen | 2a7a44b | 2016-12-12 15:43:49 -0800 | [diff] [blame] | 84 | - rem "---------------- JS -----------------" |
| 85 | - "node --version" |
Wouter van Oortmerssen | 22743ca | 2017-05-24 15:21:26 -0700 | [diff] [blame] | 86 | - "..\\%CONFIGURATION%\\flatc -b -I include_test monster_test.fbs unicode_test.json" |
Kamil Rojewski | 808b44f | 2017-04-21 18:29:42 +0200 | [diff] [blame] | 87 | - "node JavaScriptTest ./monster_test_generated" |
Kevin Rose | 3282a84 | 2017-08-01 10:34:00 -0500 | [diff] [blame] | 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 |
Wouter van Oortmerssen | 1f0bd12 | 2017-08-24 13:46:46 -0700 | [diff] [blame] | 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 |
Wouter van Oortmerssen | 2a7a44b | 2016-12-12 15:43:49 -0800 | [diff] [blame] | 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" |
Haibo Huang | b9f6b1a | 2020-03-16 15:41:29 -0700 | [diff] [blame] | 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" |
Wouter van Oortmerssen | 2a7a44b | 2016-12-12 15:43:49 -0800 | [diff] [blame] | 113 | - "msbuild.exe /property:Configuration=Release;OutputPath=tempcs /verbosity:minimal FlatBuffers.Test.csproj" |
| 114 | - "tempcs\\FlatBuffers.Test.exe" |
Eric Erhardt | 0cdacdf | 2019-02-21 16:36:55 -0600 | [diff] [blame] | 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" |
Wouter van Oortmerssen | 2a7a44b | 2016-12-12 15:43:49 -0800 | [diff] [blame] | 118 | # TODO: add more languages. |
| 119 | - "cd ..\\.." |
Wouter van Oortmerssen | f624065 | 2016-07-27 17:34:00 -0700 | [diff] [blame] | 120 | |
Wouter van Oortmerssen | 2a7a44b | 2016-12-12 15:43:49 -0800 | [diff] [blame] | 121 | artifacts: |
Kevin Rose | 3282a84 | 2017-08-01 10:34:00 -0500 | [diff] [blame] | 122 | - path: $(CONFIGURATION)\flatc.exe |
Wouter van Oortmerssen | 2a7a44b | 2016-12-12 15:43:49 -0800 | [diff] [blame] | 123 | name: flatc.exe |
Kevin Rose | 3282a84 | 2017-08-01 10:34:00 -0500 | [diff] [blame] | 124 | - path: tests\GeneratedMyGameCode.zip |
| 125 | name: GeneratedMyGameCode.zip |