From 3418cd3b61a1ed70d621cecd58d04d006670fa16 Mon Sep 17 00:00:00 2001 From: Hangxiang Yu Date: Sun, 7 Apr 2024 18:05:18 +0800 Subject: [PATCH 1/7] [build] Support release windows temporarily --- .circleci/config.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23466cf48..f9df7782f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -72,7 +72,7 @@ commands: $env:Path = $env:JAVA_HOME + ";" + $env:Path mkdir build cd build - & $Env:CMAKE_BIN -G "$Env:CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=Debug -DOPTDBG=1 -DPORTABLE="$Env:CMAKE_PORTABLE" -DSNAPPY=1 -DJNI=1 .. + & $Env:CMAKE_BIN -G "$Env:CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=RELEASE -DOPTDBG=1 -DPORTABLE="$Env:CMAKE_PORTABLE" -DSNAPPY=1 -DJNI=1 .. cd .. echo "Building with VS version: $Env:CMAKE_GENERATOR" msbuild.exe build/rocksdb.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64 @@ -81,11 +81,8 @@ commands: shell: powershell.exe command: | build_tools\run_ci_db_test.ps1 -SuiteRun arena_test,db_basic_test,db_test,db_test2,db_merge_operand_test,bloom_test,c_test,coding_test,crc32c_test,dynamic_bloom_test,env_basic_test,env_test,hash_test,random_test -Concurrency 16 - - run: - name: "Test RocksJava" - command: | - cd build\java - & $Env:CTEST_BIN -C Debug -j 16 + - store_artifacts: + path: build\java pre-steps-macos: steps: - pre-steps From 616d18aad43eea27d0fe3d0fdd166ada1bfd5376 Mon Sep 17 00:00:00 2001 From: Hangxiang Yu Date: Sun, 7 Apr 2024 20:59:06 +0800 Subject: [PATCH 2/7] [build] Support release linux arm temporarily --- .circleci/config.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index f9df7782f..2706f94a7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -838,6 +838,46 @@ jobs: - run: ROCKSDBTESTS_PLATFORM_DEPENDENT=only make V=1 J=4 -j4 all_but_some_tests check_some - post-steps + build-linux-arm-docker-musl: + machine: + image: ubuntu-2004:202111-02 + resource_class: arm.xlarge + steps: + - pre-steps + - run: + name: "Set Java Environment" + command: | + echo "JAVA_HOME=${JAVA_HOME}" + echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV + which java && java -version + which javac && javac -version + - run: + name: "Build rocksdbjavastaticdockerarm64v8musl" + command: DEBUG_LEVEL=0 ROCKSDB_DISABLE_JEMALLOC=true PORTABLE=1 CXXFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux -Wno-error=shadow -Wno-error-defaulted-function-deleted -Wno-unknown-warning-option -Wno-error=unused-parameter -Wno-error=unused-variable" make V=1 J=8 -j8 rocksdbjavastaticdockerarm64v8musl + - store_artifacts: + path: java/target + - post-steps + + build-linux-arm-docker: + machine: + image: ubuntu-2004:202111-02 + resource_class: arm.xlarge + steps: + - pre-steps + - run: + name: "Set Java Environment" + command: | + echo "JAVA_HOME=${JAVA_HOME}" + echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV + which java && java -version + which javac && javac -version + - run: + name: "Build rocksdbjavastaticdockerarm64v8" + command: DEBUG_LEVEL=0 ROCKSDB_DISABLE_JEMALLOC=true PORTABLE=1 CXXFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux -Wno-error=shadow -Wno-error-defaulted-function-deleted -Wno-unknown-warning-option -Wno-error=unused-parameter -Wno-error=unused-variable" make V=1 J=8 -j8 rocksdbjavastaticdockerarm64v8 + - store_artifacts: + path: java/target + - post-steps + build-linux-arm-cmake-no_test_run: machine: image: ubuntu-2004:202111-02 From ba84005cfe50f3264b3291d11454b4949d9fced1 Mon Sep 17 00:00:00 2001 From: Hangxiang Yu Date: Sun, 7 Apr 2024 21:09:28 +0800 Subject: [PATCH 3/7] [build] Support release linux ppc64le temporarily --- .circleci/config.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2706f94a7..60b2a11f2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -878,6 +878,44 @@ jobs: path: java/target - post-steps + build-linux-ppc64le-docker-musl: + executor: linux-docker + resource_class: large + steps: + - pre-steps + - run: + name: "Set Java Environment" + command: | + echo "JAVA_HOME=${JAVA_HOME}" + echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV + which java && java -version + which javac && javac -version + - run: + name: "Build rocksdbjavastaticdockerppc64lemusl" + command: DEBUG_LEVEL=0 ROCKSDB_DISABLE_JEMALLOC=true PORTABLE=1 CXXFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux -Wno-error=shadow -Wno-error-defaulted-function-deleted -Wno-unknown-warning-option -Wno-error=unused-parameter -Wno-error=unused-variable" make V=1 J=8 -j8 rocksdbjavastaticdockerppc64lemusl + - store_artifacts: + path: java/target + - post-steps + + build-linux-ppc64le-docker: + executor: linux-docker + resource_class: large + steps: + - pre-steps + - run: + name: "Set Java Environment" + command: | + echo "JAVA_HOME=${JAVA_HOME}" + echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV + which java && java -version + which javac && javac -version + - run: + name: "Build rocksdbjavastaticdockerppc64le" + command: DEBUG_LEVEL=0 ROCKSDB_DISABLE_JEMALLOC=true PORTABLE=1 CXXFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux -Wno-error=shadow -Wno-error-defaulted-function-deleted -Wno-unknown-warning-option -Wno-error=unused-parameter -Wno-error=unused-variable" make V=1 J=8 -j8 rocksdbjavastaticdockerppc64le + - store_artifacts: + path: java/target + - post-steps + build-linux-arm-cmake-no_test_run: machine: image: ubuntu-2004:202111-02 @@ -983,6 +1021,7 @@ workflows: - build-linux-mini-crashtest jobs-windows: jobs: + - build-windows-vs2022 - build-windows-vs2019 - build-cmake-mingw jobs-java: @@ -1006,6 +1045,10 @@ workflows: build-fuzzers: jobs: - build-fuzzers + - build-linux-arm-docker-musl + - build-linux-arm-docker + - build-linux-ppc64le-docker-musl + - build-linux-ppc64le-docker benchmark-linux: triggers: - schedule: From 6df509d7ecb518a62f83e6a1d0a50ddd5a6fe938 Mon Sep 17 00:00:00 2001 From: Zakelly Date: Wed, 21 Aug 2024 12:50:20 +0800 Subject: [PATCH 4/7] [build] disable pert context --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 60b2a11f2..06d2c5f13 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,7 +45,7 @@ commands: echo "export SNAPPY_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/snappy" >> $BASH_ENV echo "export LZ4_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/lz4" >> $BASH_ENV echo "export ZSTD_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/zstd" >> $BASH_ENV - echo "export DISABLE_PERF_CONTEXT=0" >> $BASH_ENV + echo "export DISABLE_PERF_CONTEXT=1" >> $BASH_ENV windows-build-steps: steps: @@ -359,7 +359,7 @@ jobs: resource_class: xlarge steps: - checkout # check out the code in the project directory - - run: CC=clang CXX=clang++ USE_CLANG=1 PORTABLE=1 DISABLE_PERF_CONTEXT=0 make V=1 -j16 all + - run: CC=clang CXX=clang++ USE_CLANG=1 PORTABLE=1 DISABLE_PERF_CONTEXT=1 make V=1 -j16 all - post-steps build-linux-clang10-asan: @@ -472,7 +472,7 @@ jobs: - run: apt-get update -y && apt-get install -y libgflags-dev - run: name: "Unity build" - command: DISABLE_PERF_CONTEXT=0 make V=1 -j8 unity_test + command: DISABLE_PERF_CONTEXT=1 make V=1 -j8 unity_test no_output_timeout: 20m - run: make V=1 -j8 -k check-headers # could be moved to a different build - post-steps From 1deeace8026e4d113cf4ae6092c4505099f51f2a Mon Sep 17 00:00:00 2001 From: Zakelly Date: Wed, 21 Aug 2024 13:49:48 +0800 Subject: [PATCH 5/7] [build] disable Werror --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index bb39c2350..e12fe3add 100644 --- a/Makefile +++ b/Makefile @@ -566,9 +566,9 @@ ifeq ($(PLATFORM), OS_OPENBSD) WARNING_FLAGS += -Wno-unused-lambda-capture endif -ifndef DISABLE_WARNING_AS_ERROR - WARNING_FLAGS += -Werror -endif +# ifndef DISABLE_WARNING_AS_ERROR +# WARNING_FLAGS += -Werror +# endif ifdef LUA_PATH From 4a100f3dd20336df06d34270398c72eba589c5bc Mon Sep 17 00:00:00 2001 From: Zakelly Date: Wed, 21 Aug 2024 13:59:09 +0800 Subject: [PATCH 6/7] [build] setup docker --- .circleci/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 06d2c5f13..9e8ed5efa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -890,6 +890,10 @@ jobs: echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV which java && java -version which javac && javac -version + # No need to manually build the Docker image, use the existing Dockerfile + - setup_remote_docker: + version: 20.10.7 + docker_layer_caching: true - run: name: "Build rocksdbjavastaticdockerppc64lemusl" command: DEBUG_LEVEL=0 ROCKSDB_DISABLE_JEMALLOC=true PORTABLE=1 CXXFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux -Wno-error=shadow -Wno-error-defaulted-function-deleted -Wno-unknown-warning-option -Wno-error=unused-parameter -Wno-error=unused-variable" make V=1 J=8 -j8 rocksdbjavastaticdockerppc64lemusl @@ -909,6 +913,10 @@ jobs: echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV which java && java -version which javac && javac -version + # No need to manually build the Docker image, use the existing Dockerfile + - setup_remote_docker: + version: 20.10.7 + docker_layer_caching: true - run: name: "Build rocksdbjavastaticdockerppc64le" command: DEBUG_LEVEL=0 ROCKSDB_DISABLE_JEMALLOC=true PORTABLE=1 CXXFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux -Wno-error=shadow -Wno-error-defaulted-function-deleted -Wno-unknown-warning-option -Wno-error=unused-parameter -Wno-error=unused-variable" make V=1 J=8 -j8 rocksdbjavastaticdockerppc64le From e06d59c67620d91f4467b932e1055151b4d2315b Mon Sep 17 00:00:00 2001 From: Zakelly Date: Wed, 21 Aug 2024 14:33:23 +0800 Subject: [PATCH 7/7] [build] setup docker --- .circleci/config.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e8ed5efa..6002f135c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -65,7 +65,7 @@ commands: mkdir build cd build & $Env:CMAKE_BIN -G "$Env:CMAKE_GENERATOR" .. - msbuild.exe Snappy.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64 + msbuild.exe Snappy.sln -maxCpuCount -property:Configuration=Release -property:Platform=x64 - run: name: "Build RocksDB" command: | @@ -75,7 +75,7 @@ commands: & $Env:CMAKE_BIN -G "$Env:CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=RELEASE -DOPTDBG=1 -DPORTABLE="$Env:CMAKE_PORTABLE" -DSNAPPY=1 -DJNI=1 .. cd .. echo "Building with VS version: $Env:CMAKE_GENERATOR" - msbuild.exe build/rocksdb.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64 + msbuild.exe build/rocksdb.sln -maxCpuCount -property:Configuration=Release -property:Platform=x64 - run: name: "Test RocksDB" shell: powershell.exe @@ -879,8 +879,9 @@ jobs: - post-steps build-linux-ppc64le-docker-musl: - executor: linux-docker - resource_class: large + machine: + image: ubuntu-2004:202111-02 + resource_class: arm.xlarge steps: - pre-steps - run: @@ -890,10 +891,6 @@ jobs: echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV which java && java -version which javac && javac -version - # No need to manually build the Docker image, use the existing Dockerfile - - setup_remote_docker: - version: 20.10.7 - docker_layer_caching: true - run: name: "Build rocksdbjavastaticdockerppc64lemusl" command: DEBUG_LEVEL=0 ROCKSDB_DISABLE_JEMALLOC=true PORTABLE=1 CXXFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux -Wno-error=shadow -Wno-error-defaulted-function-deleted -Wno-unknown-warning-option -Wno-error=unused-parameter -Wno-error=unused-variable" make V=1 J=8 -j8 rocksdbjavastaticdockerppc64lemusl @@ -902,8 +899,9 @@ jobs: - post-steps build-linux-ppc64le-docker: - executor: linux-docker - resource_class: large + machine: + image: ubuntu-2004:202111-02 + resource_class: arm.xlarge steps: - pre-steps - run: @@ -913,10 +911,6 @@ jobs: echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV which java && java -version which javac && javac -version - # No need to manually build the Docker image, use the existing Dockerfile - - setup_remote_docker: - version: 20.10.7 - docker_layer_caching: true - run: name: "Build rocksdbjavastaticdockerppc64le" command: DEBUG_LEVEL=0 ROCKSDB_DISABLE_JEMALLOC=true PORTABLE=1 CXXFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux -Wno-error=shadow -Wno-error-defaulted-function-deleted -Wno-unknown-warning-option -Wno-error=unused-parameter -Wno-error=unused-variable" make V=1 J=8 -j8 rocksdbjavastaticdockerppc64le