Skip to content

Commit

Permalink
feat: taosdump for windows fix schema.c (taosdata#527)
Browse files Browse the repository at this point in the history
* fix: add windows taosdump

* fix: add windows taosdump

* fix: add windows taosdump

* test: enable error output

* chore: rewrite license of new files

* fix: move path_max to windows code

* fix: taosdump for windows

* fix: choro install jom -y

* test: use fix/sangshuduo/td-16450-add-windows-taosdump in workflow

* fix: replace jansson_found with true

* fix: port header file for win

* fix: atom_add porting for windows

* fix: co zhiqiang's 3.0 windows workflow

* fix: add go to windows build

* fix: adjust header including in tools sys.c

* fix: deps cmake on windows

* fix: port taosdump_win to taosdump.c

* fix: taosdump.c windows compile

* fix: add strsep() definition for windows 64bit pointer

* fix: taosbenchmark deps on taos dyn lib on windows

* test: change tdengine 3.0 build branch

* fix: use alloc insteal of value on stack

* fix: remove codec remove in deps cmake

* fix: add zlib for windows

* fix: merge with develop and change zlib target name

* fix: patch codec. taosdump run further

* fix: cmake add snappy/zlib

* fix: replace avro cmake list with a modified version

* fix: remove pkg check in avro cmake list

* fix: avro-lang-c-makelist

* fix: adjust depdencies of taosdump

* fix: remove more sed command

* fix: taosdump for windows works first time

* fix: remove unused func

* test: use feat/sangshuduo/TD-16450-taosdump-for-windows to test

* test: run basic test on windows

* feat: refactor tools dir for taosdump

* test: exclude tools source code as they run on windows only

* chore: clean ci workflows

* fix: tools string func link error

* fix: codacy security complain

* fix: tolerate codacy due to compile error

* fix: patch jansson value.c

* fix: remove isnan() and isinf() from jansson-value.c

* fix: wrong path in cmake lists

* fix: remove isnan and isinf from jansson-value.c

* chore: change build branch to 3.0

* feat: change build branch for windows

* fix: use zlib static for taosdump

* fix: use multiple thread static lib on windows

* fix: support release build on windows

* fix: taosdump fgets on windows

* fix: use chore/sangshuduo/TD-20676-use-localfile-asdeps for coverage

* fix: sprintf format for uint32_t

* fix: taosdump build release by default

* test: change 3.0-windows-build.yml test branch

* fix: taosdump for windows

* fix: deps avro c src filename

* fix: add prompt to dump in old data on windows

* fix: '\r' from windows dump file

Co-authored-by: afwerar <[email protected]>
  • Loading branch information
sangshuduo and afwerar authored Dec 23, 2022
1 parent 0c7f5ba commit 80fa468
Show file tree
Hide file tree
Showing 13 changed files with 1,971 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/3.0-coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21295-taosbenchmark-disorder'
ref: 'feat/sangshuduo/TD-16450-taosdump-for-windows'

- name: Change time zone
if:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21295-taosbenchmark-disorder'
ref: 'feat/sangshuduo/TD-16450-taosdump-for-windows'

- name: Change time zone
if: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-non-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
apt install -y cmake build-essential git libjansson-dev libsnappy-dev liblzma-dev libz-dev zlib1g pkg-config libssl-dev > /dev/null
echo "clone TDengine 3.0 on ${{ steps.setup.outputs.uname }}"
git clone --branch fix/sangshuduo/TD-21295-taosbenchmark-disorder --depth 1 https://github.com/taosdata/TDengine > /dev/null || exit 1
git clone --branch feat/sangshuduo/TD-16450-taosdump-for-windows --depth 1 https://github.com/taosdata/TDengine > /dev/null || exit 1
echo "build TDengine 3.0 on ${{ steps.setup.outputs.uname }}"
cd TDengine || exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-taosBenchmark-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21295-taosbenchmark-disorder'
ref: 'feat/sangshuduo/TD-16450-taosdump-for-windows'

- name: Change time zone
if: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-taosBenchmark-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21295-taosbenchmark-disorder'
ref: 'feat/sangshuduo/TD-16450-taosdump-for-windows'

- name: Change time zone
if: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-taosdump-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21295-taosbenchmark-disorder'
ref: 'feat/sangshuduo/TD-16450-taosdump-for-windows'

- name: Change time zone
if:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-taosdump-release-ws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21295-taosbenchmark-disorder'
ref: 'feat/sangshuduo/TD-16450-taosdump-for-windows'

- name: Change time zone
if:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-taosdump-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21295-taosbenchmark-disorder'
ref: 'feat/sangshuduo/TD-16450-taosdump-for-windows'

- name: Change time zone
if:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21295-taosbenchmark-disorder'
ref: 'feat/sangshuduo/TD-16450-taosdump-for-windows'

- name: create debug directory
if: |
Expand Down
7 changes: 2 additions & 5 deletions deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,16 @@ ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
COMMAND sed -i "s/^install(TARGETS avro[^-]/# install(TARGETS avro/g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/CMakeLists.txt
COMMAND sed -i "s/^target_link_libraries(avro[^-]/# target_link_libraries(avro/g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/CMakeLists.txt
COMMAND sed -i "s/^add_executable(avro/# add_executable(avro/g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/CMakeLists.txt
COMMAND sed -ri "s/([^_])namespace/\\1taos_namespace/g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/schema.c
COMMAND sed -i "s/strrchr(fullname/strrchr((char *)fullname/g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/schema.c
COMMAND sed -i "s/^#include <stdlib.h>/#define ssize_t int\\n #include <stdlib.h>/g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/generic.c
COMMAND sed -i "s/, codec->block_data,/, (uint8_t *)(codec->block_data),/g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/codec.c
COMMAND sed -i "s/filters, NULL, data/filters, NULL, (const uint8_t *)data/g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/codec.c
COMMAND sed -i "s/__cdecl//g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/avro/msinttypes.h
COMMAND sed -i "s/imaxdiv_t/imaxdiv1_t/g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/avro/msinttypes.h
COMMAND sed -i "s/imaxdiv(/imax_div(/g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/avro/msinttypes.h
COMMAND sed -i "s/typedef uint16_t uint_fast16_t//g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/avro/msstdint.h
COMMAND sed -i "s/typedef int16_t int_fast16_t//g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/avro/msstdint.h
COMMAND sed -i "s/#define snprintf _snprintf//g" ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/avro_private.h
COMMAND cmake -E copy ${PROJECT_SOURCE_DIR}/deps/codec.c ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/codec.c
COMMAND cmake -E copy ${PROJECT_SOURCE_DIR}/deps/avro-lang-c-CMakeLists.txt ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/CMakeLists.txt
COMMAND cmake -E copy ${PROJECT_SOURCE_DIR}/deps/avro-lang-c-src-codec.c ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/codec.c
COMMAND cmake -E copy ${PROJECT_SOURCE_DIR}/deps/avro-lang-c-src-schema.c ${PROJECT_SOURCE_DIR}/deps/avro/lang/c/src/schema.c
CONFIGURE_COMMAND cmake -G "NMake Makefiles JOM" ${BUILD_TYPE} -DCMAKE_MAKE_PROGRAM=jom -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/build/ -S ${PROJECT_SOURCE_DIR}/deps/avro/lang/c
)
# ADD_SUBDIRECTORY(CUnit)
Expand Down
File renamed without changes.
Loading

0 comments on commit 80fa468

Please sign in to comment.