[TS] Add Build TS to CI jobs (#6524)

* Add Build TS to CI jobs

* Add npm compile step

* Fix syntax

* Add required code gen for TS

* Exit on failure

* Make TS code gen identical to test run

* Remove duplicate TS code gen artifacts

* Remove bad gitignore

* Forgot parts of generate_code and make sure same settings for test run

* Don't forget about the bat

* Try and fix flatc args

* Another attempt to fix args

* Fix typo

* Commit up to date code gen

* Another attempt to fix sh/bat

* Move -o param to after -I

* Commit missing code gen file

* Fix grpc code gen and test

* Another grpc code gen fix

* Rework to not use ts folder

* Fix env vars in bat and make less churn

* Move TS code gen to dedicated folder

* Fix transpilation output folder and module paths

* Fixes to code gen

* Include generated js

* Moved ts code gen

* Remove test ts code gen folder
This commit is contained in:
Björn Harrtell
2021-04-12 19:41:59 +02:00
committed by GitHub
parent 4d2364f342
commit 408e4db4af
77 changed files with 2908 additions and 9040 deletions

View File

@@ -26,7 +26,7 @@ fi
TEST_CPP_FLAGS="--gen-compare --cpp-ptr-type flatbuffers::unique_ptr $TEST_CPP_FLAGS"
TEST_CS_FLAGS="--cs-gen-json-serializer"
TEST_JS_TS_FLAGS="--gen-name-strings"
TEST_TS_FLAGS="--gen-name-strings"
TEST_BASE_FLAGS="--reflect-names --gen-mutable --gen-object-api"
TEST_RUST_FLAGS="$TEST_BASE_FLAGS --gen-name-strings"
TEST_NOINCL_FLAGS="$TEST_BASE_FLAGS --no-includes"
@@ -38,13 +38,16 @@ $TEST_NOINCL_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS -I include_test monster_test.f
../flatc --python $TEST_BASE_FLAGS -I include_test monster_test.fbs monsterdata_test.json
../flatc --cpp --java --kotlin --csharp --dart --go --binary --lobster --lua --ts --php --python \
$TEST_NOINCL_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS $TEST_JS_TS_FLAGS -o namespace_test namespace_test/namespace_test1.fbs namespace_test/namespace_test2.fbs
$TEST_NOINCL_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS $TEST_TS_FLAGS -o namespace_test namespace_test/namespace_test1.fbs namespace_test/namespace_test2.fbs
# For Rust we currently generate two independent schemas, with namespace_test2
# duplicating the types in namespace_test1
../flatc --rust --gen-all $TEST_RUST_FLAGS -o namespace_test namespace_test/namespace_test1.fbs namespace_test/namespace_test2.fbs
../flatc --cpp --java --kotlin --csharp --ts --php $TEST_BASE_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS $TEST_JS_TS_FLAGS -o union_vector ./union_vector/union_vector.fbs
../flatc --cpp --java --kotlin --csharp --ts --php $TEST_BASE_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS $TEST_TS_FLAGS -o union_vector ./union_vector/union_vector.fbs
../flatc --ts --gen-name-strings --gen-mutable $TEST_BASE_FLAGS $TEST_TS_FLAGS -I include_test monster_test.fbs
../flatc $TEST_BASE_FLAGS $TEST_TS_FLAGS -b -I include_test monster_test.fbs unicode_test.json
../flatc --ts --gen-name-strings $TEST_BASE_FLAGS $TEST_TS_FLAGS -o union_vector union_vector/union_vector.fbs
../flatc --rust -I include_test -o include_test include_test/include_test1.fbs
../flatc --rust -I include_test -o include_test/sub include_test/sub/include_test2.fbs
../flatc -b --schema --bfbs-comments --bfbs-builtins -I include_test monster_test.fbs