From e7f9badb68102d381e4217d50466c87e78348fc3 Mon Sep 17 00:00:00 2001 From: Sebastian Mattheis Date: Wed, 29 Jun 2022 09:00:09 +0200 Subject: [PATCH] Add travis config for building ppc64 binaries --- .circleci/cat_ignore_eagain | 54 -- .circleci/config.yml | 872 --------------------------- .circleci/ubsan_suppression_list.txt | 6 - .circleci/vs2015_install.ps1 | 24 - .circleci/vs2017_install.ps1 | 35 -- .github/workflows/sanity_check.yml | 44 -- .travis.yml | 312 +--------- 7 files changed, 21 insertions(+), 1326 deletions(-) delete mode 100755 .circleci/cat_ignore_eagain delete mode 100644 .circleci/config.yml delete mode 100644 .circleci/ubsan_suppression_list.txt delete mode 100644 .circleci/vs2015_install.ps1 delete mode 100644 .circleci/vs2017_install.ps1 delete mode 100644 .github/workflows/sanity_check.yml diff --git a/.circleci/cat_ignore_eagain b/.circleci/cat_ignore_eagain deleted file mode 100755 index fc0f00d09..000000000 --- a/.circleci/cat_ignore_eagain +++ /dev/null @@ -1,54 +0,0 @@ -#! /bin/bash - -# Work around issue with parallel make output causing random error, as in -# make[1]: write error: stdout -# Probably due to a kernel bug: -# https://bugs.launchpad.net/ubuntu/+source/linux-signed/+bug/1814393 -# Seems to affect image ubuntu-1604:201903-01 and ubuntu-1604:202004-01 - -cd "$(dirname $0)" - -if [ ! -x cat_ignore_eagain.out ]; then - cc -x c -o cat_ignore_eagain.out - << EOF -#include -#include -#include -int main() { - int n, m, p; - char buf[1024]; - for (;;) { - n = read(STDIN_FILENO, buf, 1024); - if (n > 0 && n <= 1024) { - for (m = 0; m < n;) { - p = write(STDOUT_FILENO, buf + m, n - m); - if (p < 0) { - if (errno == EAGAIN) { - // ignore but pause a bit - usleep(100); - } else { - perror("write failed"); - return 42; - } - } else { - m += p; - } - } - } else if (n < 0) { - if (errno == EAGAIN) { - // ignore but pause a bit - usleep(100); - } else { - // Some non-ignorable error - perror("read failed"); - return 43; - } - } else { - // EOF - return 0; - } - } -} -EOF -fi - -exec ./cat_ignore_eagain.out diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index ce33da9ef..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,872 +0,0 @@ -version: 2.1 - -orbs: - win: circleci/windows@2.4.0 - slack: circleci/slack@3.4.2 - -aliases: - - ¬ify-on-main-failure - fail_only: true - only_for_branches: main - -commands: - install-cmake-on-macos: - steps: - - run: - name: Install cmake on macos - command: | - HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake - - install-jdk8-on-macos: - steps: - - run: - name: Install JDK 8 on macos - command: | - brew install --cask adoptopenjdk/openjdk/adoptopenjdk8 - - increase-max-open-files-on-macos: - steps: - - run: - name: Increase max open files - command: | - sudo sysctl -w kern.maxfiles=1048576 - sudo sysctl -w kern.maxfilesperproc=1048576 - sudo launchctl limit maxfiles 1048576 - - pre-steps: - steps: - - checkout - - run: - name: Setup Environment Variables - command: | - echo "export GTEST_THROW_ON_FAILURE=0" >> $BASH_ENV - echo "export GTEST_OUTPUT=\"xml:/tmp/test-results/\"" >> $BASH_ENV - echo "export SKIP_FORMAT_BUCK_CHECKS=1" >> $BASH_ENV - echo "export GTEST_COLOR=1" >> $BASH_ENV - echo "export CTEST_OUTPUT_ON_FAILURE=1" >> $BASH_ENV - echo "export CTEST_TEST_TIMEOUT=300" >> $BASH_ENV - echo "export ZLIB_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/zlib" >> $BASH_ENV - echo "export BZIP2_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/bzip2" >> $BASH_ENV - 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 - - pre-steps-macos: - steps: - - pre-steps - - post-steps: - steps: - - slack/status: *notify-on-main-failure - - store_test_results: # store test result if there's any - path: /tmp/test-results - - store_artifacts: # store LOG for debugging if there's any - path: LOG - - run: # on fail, compress Test Logs for diagnosing the issue - name: Compress Test Logs - command: tar -cvzf t.tar.gz t - when: on_fail - - store_artifacts: # on fail, store Test Logs for diagnosing the issue - path: t.tar.gz - destination: test_logs - when: on_fail - - install-clang-10: - steps: - - run: - name: Install Clang 10 - command: | - echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main" | sudo tee -a /etc/apt/sources.list - echo "deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main" | sudo tee -a /etc/apt/sources.list - echo "APT::Acquire::Retries \"10\";" | sudo tee -a /etc/apt/apt.conf.d/80-retries # llvm.org unreliable - sudo apt-get update -y && sudo apt-get install -y clang-10 - - install-clang-13: - steps: - - run: - name: Install Clang 13 - command: | - echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main" | sudo tee -a /etc/apt/sources.list - echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main" | sudo tee -a /etc/apt/sources.list - echo "APT::Acquire::Retries \"10\";" | sudo tee -a /etc/apt/apt.conf.d/80-retries # llvm.org unreliable - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - - sudo apt-get update -y && sudo apt-get install -y clang-13 - - install-gflags: - steps: - - run: - name: Install gflags - command: | - sudo apt-get update -y && sudo apt-get install -y libgflags-dev - - install-benchmark: - steps: - - run: # currently doesn't support ubuntu-1604 which doesn't have libbenchmark package, user can still install by building it youself - name: Install benchmark - command: | - sudo apt-get update -y && sudo apt-get install -y libbenchmark-dev - - install-librados: - steps: - - run: - name: Install librados - command: | - sudo apt-get update -y && sudo apt-get install -y librados-dev - - upgrade-cmake: - steps: - - run: - name: Upgrade cmake - command: | - sudo apt remove --purge cmake - sudo snap install cmake --classic - - install-gflags-on-macos: - steps: - - run: - name: Install gflags on macos - command: | - HOMEBREW_NO_AUTO_UPDATE=1 brew install gflags - - install-gtest-parallel: - steps: - - run: - name: Install gtest-parallel - command: | - git clone --single-branch --branch master --depth 1 https://github.com/google/gtest-parallel.git ~/gtest-parallel - echo 'export PATH=$HOME/gtest-parallel:$PATH' >> $BASH_ENV - - install-compression-libs: - steps: - - run: - name: Install compression libs - command: | - sudo apt-get update -y && sudo apt-get install -y libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev - -executors: - windows-2xlarge: - machine: - image: 'windows-server-2019-vs2019:stable' - resource_class: windows.2xlarge - shell: bash.exe - -jobs: - build-macos: - macos: - xcode: 12.5.1 - resource_class: large - environment: - ROCKSDB_DISABLE_JEMALLOC: 1 # jemalloc cause env_test hang, disable it for now - steps: - - increase-max-open-files-on-macos - - install-gflags-on-macos - - pre-steps-macos - - run: ulimit -S -n 1048576 && OPT=-DCIRCLECI make V=1 J=32 -j32 check 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-macos-cmake: - macos: - xcode: 12.5.1 - resource_class: large - steps: - - increase-max-open-files-on-macos - - install-cmake-on-macos - - install-gflags-on-macos - - pre-steps-macos - - run: ulimit -S -n 1048576 && (mkdir build && cd build && cmake -DWITH_GFLAGS=1 .. && make V=1 -j32 && ctest -j10) 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-linux: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - run: make V=1 J=32 -j32 check 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-linux-mem-env-librados: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - install-librados - - run: MEM_ENV=1 ROCKSDB_USE_LIBRADOS=1 make V=1 J=32 -j32 check 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-linux-encrypted-env: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - run: ENCRYPTED_ENV=1 make V=1 J=32 -j32 check 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-linux-shared_lib-alt_namespace-status_checked: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - run: ASSERT_STATUS_CHECKED=1 TEST_UINT128_COMPAT=1 ROCKSDB_MODIFY_NPHASH=1 LIB_MODE=shared OPT="-DROCKSDB_NAMESPACE=alternative_rocksdb_ns" make V=1 -j32 check 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-linux-release: - machine: - image: ubuntu-1604:202104-01 - resource_class: large - steps: - - checkout # check out the code in the project directory - - run: make V=1 -j8 release 2>&1 | .circleci/cat_ignore_eagain - - run: if ./db_stress --version; then false; else true; fi # ensure without gflags - - install-gflags - - run: make V=1 -j8 release 2>&1 | .circleci/cat_ignore_eagain - - run: ./db_stress --version # ensure with gflags - - post-steps - - build-linux-release-rtti: - machine: - image: ubuntu-1604:201903-01 - resource_class: large - steps: - - checkout # check out the code in the project directory - - run: make clean - - run: USE_RTTI=1 DEBUG_LEVEL=0 make V=1 -j8 static_lib tools db_bench 2>&1 | .circleci/cat_ignore_eagain - - run: if ./db_stress --version; then false; else true; fi # ensure without gflags - - run: sudo apt-get update -y && sudo apt-get install -y libgflags-dev - - run: make clean - - run: USE_RTTI=1 DEBUG_LEVEL=0 make V=1 -j8 static_lib tools db_bench 2>&1 | .circleci/cat_ignore_eagain - - run: ./db_stress --version # ensure with gflags - - build-linux-lite: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - run: LITE=1 make V=1 J=32 -j32 check 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-linux-lite-release: - machine: - image: ubuntu-1604:202104-01 - resource_class: large - steps: - - checkout # check out the code in the project directory - - run: LITE=1 make V=1 -j8 release 2>&1 | .circleci/cat_ignore_eagain - - run: if ./db_stress --version; then false; else true; fi # ensure without gflags - - install-gflags - - run: LITE=1 make V=1 -j8 release 2>&1 | .circleci/cat_ignore_eagain - - run: ./db_stress --version # ensure with gflags - - post-steps - - build-linux-clang-no_test_run: - machine: - image: ubuntu-1604:202104-01 - resource_class: xlarge - steps: - - checkout # check out the code in the project directory - - run: sudo apt-get update -y && sudo apt-get install -y clang libgflags-dev libtbb-dev - - run: CC=clang CXX=clang++ USE_CLANG=1 PORTABLE=1 make V=1 -j16 all 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-linux-clang10-asan: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - install-clang-10 - - run: COMPILE_WITH_ASAN=1 CC=clang-10 CXX=clang++-10 ROCKSDB_DISABLE_ALIGNED_NEW=1 USE_CLANG=1 make V=1 -j32 check 2>&1 | .circleci/cat_ignore_eagain # aligned new doesn't work for reason we haven't figured out - - post-steps - - build-linux-clang10-mini-tsan: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - install-clang-10 - - run: COMPILE_WITH_TSAN=1 CC=clang-10 CXX=clang++-10 ROCKSDB_DISABLE_ALIGNED_NEW=1 USE_CLANG=1 make V=1 -j32 check 2>&1 | .circleci/cat_ignore_eagain # aligned new doesn't work for reason we haven't figured out. - - post-steps - - build-linux-clang10-ubsan: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - install-clang-10 - - run: COMPILE_WITH_UBSAN=1 OPT="-fsanitize-blacklist=.circleci/ubsan_suppression_list.txt" CC=clang-10 CXX=clang++-10 ROCKSDB_DISABLE_ALIGNED_NEW=1 USE_CLANG=1 make V=1 -j32 ubsan_check 2>&1 | .circleci/cat_ignore_eagain # aligned new doesn't work for reason we haven't figured out - - post-steps - - build-linux-clang10-clang-analyze: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - install-clang-10 - - run: sudo apt-get update -y && sudo apt-get install -y clang-tools-10 - - run: CC=clang-10 CXX=clang++-10 ROCKSDB_DISABLE_ALIGNED_NEW=1 CLANG_ANALYZER="/usr/bin/clang++-10" CLANG_SCAN_BUILD=scan-build-10 USE_CLANG=1 make V=1 -j32 analyze 2>&1 | .circleci/cat_ignore_eagain # aligned new doesn't work for reason we haven't figured out. For unknown, reason passing "clang++-10" as CLANG_ANALYZER doesn't work, and we need a full path. - - post-steps - - build-linux-cmake: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - upgrade-cmake - - run: (mkdir build && cd build && cmake -DWITH_GFLAGS=1 .. && make V=1 -j20 && ctest -j20) 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-linux-cmake-ubuntu-20: - machine: - image: ubuntu-2004:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - install-benchmark - - run: (mkdir build && cd build && cmake -DWITH_GFLAGS=1 -DWITH_BENCHMARK=1 .. && make V=1 -j20 && ctest -j20 && make microbench) 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-linux-unity-and-headers: - docker: # executor type - - image: gcc:latest - resource_class: large - steps: - - checkout # check out the code in the project directory - - run: apt-get update -y && apt-get install -y libgflags-dev - - run: TEST_TMPDIR=/dev/shm && make V=1 -j8 unity_test 2>&1 | .circleci/cat_ignore_eagain - - run: make V=1 -j8 -k check-headers 2>&1 | .circleci/cat_ignore_eagain # could be moved to a different build - - post-steps - - build-linux-gcc-4_8-no_test_run: - machine: - image: ubuntu-1604:202104-01 - resource_class: large - steps: - - pre-steps - - run: sudo apt-get update -y && sudo apt-get install gcc-4.8 g++-4.8 libgflags-dev - - run: CC=gcc-4.8 CXX=g++-4.8 V=1 SKIP_LINK=1 make -j8 all 2>&1 | .circleci/cat_ignore_eagain # Linking broken because libgflags compiled with newer ABI - - post-steps - - build-linux-gcc-8-no_test_run: - machine: - image: ubuntu-2004:202010-01 - resource_class: large - steps: - - pre-steps - - run: sudo apt-get update -y && sudo apt-get install gcc-8 g++-8 libgflags-dev - - run: CC=gcc-8 CXX=g++-8 V=1 SKIP_LINK=1 make -j8 all 2>&1 | .circleci/cat_ignore_eagain # Linking broken because libgflags compiled with newer ABI - - post-steps - - build-linux-gcc-9-no_test_run: - machine: - image: ubuntu-2004:202010-01 - resource_class: large - steps: - - pre-steps - - run: sudo apt-get update -y && sudo apt-get install gcc-9 g++-9 libgflags-dev - - run: CC=gcc-9 CXX=g++-9 V=1 SKIP_LINK=1 make -j8 all 2>&1 | .circleci/cat_ignore_eagain # Linking broken because libgflags compiled with newer ABI - - post-steps - - build-linux-gcc-10-cxx20-no_test_run: - machine: - image: ubuntu-2004:202010-01 - resource_class: xlarge - steps: - - pre-steps - - run: sudo apt-get update -y && sudo apt-get install gcc-10 g++-10 libgflags-dev - - run: CC=gcc-10 CXX=g++-10 V=1 SKIP_LINK=1 ROCKSDB_CXX_STANDARD=c++20 make -j16 all 2>&1 | .circleci/cat_ignore_eagain # Linking broken because libgflags compiled with newer ABI - - post-steps - - build-linux-gcc-11-no_test_run: - machine: - image: ubuntu-2004:202010-01 - resource_class: xlarge - steps: - - pre-steps - - run: sudo apt-get update -y && sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get install gcc-11 g++-11 libgflags-dev - - run: CC=gcc-11 CXX=g++-11 V=1 SKIP_LINK=1 make -j16 all 2>&1 | .circleci/cat_ignore_eagain # Linking broken because libgflags compiled with newer ABI - - post-steps - - build-linux-clang-13-no_test_run: - machine: - image: ubuntu-2004:202010-01 - resource_class: xlarge - steps: - - pre-steps - - install-clang-13 - - run: CC=clang-13 CXX=clang++-13 USE_CLANG=1 make -j16 all 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - # This job is only to make sure the microbench tests are able to run, the benchmark result is not meaningful as the CI host is changing. - build-linux-microbench: - machine: - image: ubuntu-2004:202010-01 - resource_class: xlarge - steps: - - pre-steps - - install-benchmark - - run: DEBUG_LEVEL=0 make microbench 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-windows: - executor: windows-2xlarge - parameters: - extra_cmake_opt: - default: "" - type: string - vs_year: - default: "2019" - type: string - cmake_generator: - default: "Visual Studio 16 2019" - type: string - environment: - THIRDPARTY_HOME: C:/Users/circleci/thirdparty - CMAKE_HOME: C:/Users/circleci/thirdparty/cmake-3.16.4-win64-x64 - CMAKE_BIN: C:/Users/circleci/thirdparty/cmake-3.16.4-win64-x64/bin/cmake.exe - SNAPPY_HOME: C:/Users/circleci/thirdparty/snappy-1.1.7 - SNAPPY_INCLUDE: C:/Users/circleci/thirdparty/snappy-1.1.7;C:/Users/circleci/thirdparty/snappy-1.1.7/build - SNAPPY_LIB_DEBUG: C:/Users/circleci/thirdparty/snappy-1.1.7/build/Debug/snappy.lib - VS_YEAR: <> - CMAKE_GENERATOR: <> - steps: - - checkout - - run: - name: "Setup VS" - command: | - if [[ "${VS_YEAR}" == "2019" ]]; then - echo "VS2019 already present." - elif [[ "${VS_YEAR}" == "2017" ]]; then - echo "Installing VS2017..." - powershell .circleci/vs2017_install.ps1 - elif [[ "${VS_YEAR}" == "2015" ]]; then - echo "Installing VS2015..." - powershell .circleci/vs2015_install.ps1 - fi - - store_artifacts: - path: \Users\circleci\AppData\Local\Temp\vslogs.zip - - run: - name: "Install thirdparty dependencies" - command: | - mkdir ${THIRDPARTY_HOME} - cd ${THIRDPARTY_HOME} - echo "Installing CMake..." - curl --fail --silent --show-error --output cmake-3.16.4-win64-x64.zip --location https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4-win64-x64.zip - unzip -q cmake-3.16.4-win64-x64.zip - echo "Building Snappy dependency..." - curl --fail --silent --show-error --output snappy-1.1.7.zip --location https://github.com/google/snappy/archive/1.1.7.zip - unzip -q snappy-1.1.7.zip - cd snappy-1.1.7 - mkdir build - cd build - ${CMAKE_BIN} -G "${CMAKE_GENERATOR}" .. - msbuild.exe Snappy.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64 - - run: - name: "Build RocksDB" - command: | - mkdir build - cd build - ${CMAKE_BIN} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=Debug -DOPTDBG=1 -DPORTABLE=1 -DSNAPPY=1 -DJNI=1 << parameters.extra_cmake_opt >> .. - cd .. - echo "Building with VS version: ${CMAKE_GENERATOR}" - msbuild.exe build/rocksdb.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64 - - run: - name: "Test RocksDB" - shell: powershell.exe - command: | - build_tools\run_ci_db_test.ps1 -SuiteRun 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 - - build-linux-java: - machine: - image: ubuntu-1604:202104-01 - resource_class: large - environment: - JAVA_HOME: /usr/lib/jvm/java-1.8.0-openjdk-amd64 - steps: - - pre-steps - - install-gflags - - 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 RocksDBJava Shared Library" - command: make V=1 J=8 -j8 rocksdbjava 2>&1 | .circleci/cat_ignore_eagain - - run: - name: "Test RocksDBJava" - command: make V=1 J=8 -j8 jtest 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-linux-java-static: - machine: - image: ubuntu-1604:202104-01 - resource_class: large - environment: - JAVA_HOME: /usr/lib/jvm/java-1.8.0-openjdk-amd64 - steps: - - pre-steps - - install-gflags - - 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 RocksDBJava Static Library" - command: make V=1 J=8 -j8 rocksdbjavastatic 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-macos-java: - macos: - xcode: 12.5.1 - resource_class: medium - environment: - JAVA_HOME: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home - ROCKSDB_DISABLE_JEMALLOC: 1 # jemalloc causes java 8 crash - steps: - - increase-max-open-files-on-macos - - install-gflags-on-macos - - install-jdk8-on-macos - - pre-steps-macos - - 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 RocksDBJava Shared Library" - command: make V=1 J=8 -j8 rocksdbjava 2>&1 | .circleci/cat_ignore_eagain - - run: - name: "Test RocksDBJava" - command: make V=1 J=8 -j8 jtest 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-macos-java-static: - macos: - xcode: 12.5.1 - resource_class: medium - environment: - JAVA_HOME: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home - steps: - - increase-max-open-files-on-macos - - install-gflags-on-macos - - install-cmake-on-macos - - install-jdk8-on-macos - - pre-steps-macos - - 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 RocksDBJava x86 and ARM Static Libraries" - command: make V=1 J=8 -j8 rocksdbjavastaticosx 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-macos-java-static-universal: - macos: - xcode: 12.5.1 - resource_class: medium - environment: - JAVA_HOME: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home - steps: - - increase-max-open-files-on-macos - - install-gflags-on-macos - - install-cmake-on-macos - - install-jdk8-on-macos - - pre-steps-macos - - 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 RocksDBJava Universal Binary Static Library" - command: make V=1 J=8 -j8 rocksdbjavastaticosx_ub 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-examples: - machine: - image: ubuntu-1604:202104-01 - resource_class: large - steps: - - pre-steps - - install-gflags - - run: - name: "Build examples" - command: | - OPT=-DTRAVIS V=1 make -j4 static_lib && cd examples && make -j4 | ../.circleci/cat_ignore_eagain - - post-steps - - build-cmake-mingw: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - run: sudo apt-get update -y && sudo apt-get install -y mingw-w64 - - run: sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix - - run: - name: "Build cmake-mingw" - command: | - sudo apt-get install snapd && sudo snap install cmake --beta --classic - export PATH=/snap/bin:$PATH - sudo apt-get install -y openjdk-8-jdk - export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 - export PATH=$JAVA_HOME/bin:$PATH - echo "JAVA_HOME=${JAVA_HOME}" - which java && java -version - which javac && javac -version - mkdir build && cd build && cmake -DJNI=1 -DWITH_GFLAGS=OFF .. -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows && make -j4 rocksdb rocksdbjni - - post-steps - - build-linux-non-shm: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - parameters: - start_test: - default: "" - type: string - end_test: - default: "" - type: string - steps: - - pre-steps - - install-gflags - - install-gtest-parallel - - run: - name: "Build unit tests" - command: | - echo "env: $(env)" - echo "** done env" - ROCKSDBTESTS_START=<> ROCKSDBTESTS_END=<> ROCKSDBTESTS_SUBSET_TESTS_TO_FILE=/tmp/test_list make V=1 -j32 --output-sync=target build_subset_tests - - run: - name: "Run unit tests in parallel" - command: | - sed -i 's/[[:space:]]*$//; s/ / \.\//g; s/.*/.\/&/' /tmp/test_list - cat /tmp/test_list - export TEST_TMPDIR=/tmp/rocksdb_test_tmp - gtest-parallel $(&1 | .circleci/cat_ignore_eagain - - post-steps - - build-linux-arm: - machine: - image: ubuntu-2004:202101-01 - resource_class: arm.large - steps: - - pre-steps - - install-gflags - - run: ROCKSDBTESTS_PLATFORM_DEPENDENT=only make V=1 J=4 -j4 all_but_some_tests check_some 2>&1 | .circleci/cat_ignore_eagain - - post-steps - - build-linux-arm-cmake-no_test_run: - machine: - image: ubuntu-2004:202101-01 - resource_class: arm.large - environment: - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-arm64 - steps: - - pre-steps - - install-gflags - - 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 with cmake" - command: | - mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=0 -DWITH_GFLAGS=1 -DWITH_BENCHMARK_TOOLS=0 -DWITH_TOOLS=0 -DWITH_CORE_TOOLS=1 .. - make -j4 - - run: - name: "Build Java with cmake" - command: | - rm -rf build - mkdir build - cd build - cmake -DJNI=1 -DCMAKE_BUILD_TYPE=Release -DWITH_GFLAGS=1 .. - make -j4 rocksdb rocksdbjni - - post-steps - - build-format-compatible: - machine: - image: ubuntu-1604:202104-01 - resource_class: 2xlarge - steps: - - pre-steps - - install-gflags - - install-compression-libs - - run: - name: "test" - command: | - export TEST_TMPDIR=/dev/shm/rocksdb - rm -rf /dev/shm/rocksdb - mkdir /dev/shm/rocksdb - tools/check_format_compatible.sh - - post-steps - -workflows: - version: 2 - build-linux: - jobs: - - build-linux - build-linux-cmake: - jobs: - - build-linux-cmake - - build-linux-cmake-ubuntu-20 - build-linux-mem-env-librados: - jobs: - - build-linux-mem-env-librados - build-linux-encrypted-env: - jobs: - - build-linux-encrypted-env - build-linux-shared_lib-alt_namespace-status_checked: - jobs: - - build-linux-shared_lib-alt_namespace-status_checked - build-linux-lite: - jobs: - - build-linux-lite - build-linux-release: - jobs: - - build-linux-release - build-linux-release-rtti: - jobs: - - build-linux-release-rtti - build-linux-lite-release: - jobs: - - build-linux-lite-release - build-linux-clang10-asan: - jobs: - - build-linux-clang10-asan - build-linux-clang10-mini-tsan: - jobs: - - build-linux-clang10-mini-tsan - build-linux-clang10-ubsan: - jobs: - - build-linux-clang10-ubsan - build-linux-clang10-clang-analyze: - jobs: - - build-linux-clang10-clang-analyze - build-linux-unity-and-headers: - jobs: - - build-linux-unity-and-headers - build-windows-vs2019: - jobs: - - build-windows: - name: "build-windows-vs2019" - build-windows-vs2019-cxx20: - jobs: - - build-windows: - name: "build-windows-vs2019-cxx20" - extra_cmake_opt: -DCMAKE_CXX_STANDARD=20 - build-windows-vs2017: - jobs: - - build-windows: - name: "build-windows-vs2017" - vs_year: "2017" - cmake_generator: "Visual Studio 15 Win64" - build-java: - jobs: - - build-linux-java - - build-linux-java-static - - build-macos-java - - build-macos-java-static - - build-macos-java-static-universal - build-examples: - jobs: - - build-examples - build-linux-non-shm: - jobs: - - build-linux-non-shm: - start_test: "" - end_test: "db_options_test" # make sure unique in src.mk - - build-linux-non-shm: - start_test: "db_options_test" # make sure unique in src.mk - end_test: "filename_test" # make sure unique in src.mk - - build-linux-non-shm: - start_test: "filename_test" # make sure unique in src.mk - end_test: "statistics_test" # make sure unique in src.mk - - build-linux-non-shm: - start_test: "statistics_test" # make sure unique in src.mk - end_test: "" - build-linux-compilers-no_test_run: - jobs: - - build-linux-clang-no_test_run - - build-linux-clang-13-no_test_run - - build-linux-gcc-4_8-no_test_run - - build-linux-gcc-8-no_test_run - - build-linux-gcc-9-no_test_run - - build-linux-gcc-10-cxx20-no_test_run - - build-linux-gcc-11-no_test_run - - build-linux-arm-cmake-no_test_run - build-macos: - jobs: - - build-macos - build-macos-cmake: - jobs: - - build-macos-cmake - build-cmake-mingw: - jobs: - - build-cmake-mingw - build-linux-arm: - jobs: - - build-linux-arm - build-microbench: - jobs: - - build-linux-microbench - nightly: - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - main - jobs: - - build-format-compatible - - build-linux-arm-test-full diff --git a/.circleci/ubsan_suppression_list.txt b/.circleci/ubsan_suppression_list.txt deleted file mode 100644 index d7db81806..000000000 --- a/.circleci/ubsan_suppression_list.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Supress UBSAN warnings related to stl_tree.h, e.g. -# UndefinedBehaviorSanitizer: undefined-behavior /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/stl_tree.h:1505:43 in -# /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/stl_tree.h:1505:43: -# runtime error: upcast of address 0x000001fa8820 with insufficient space for an object of type -# 'std::_Rb_tree_node, rocksdb::(anonymous namespace)::LockHoldingInfo> >' -src:*bits/stl_tree.h diff --git a/.circleci/vs2015_install.ps1 b/.circleci/vs2015_install.ps1 deleted file mode 100644 index 754af0e57..000000000 --- a/.circleci/vs2015_install.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -$VS_DOWNLOAD_LINK = "https://go.microsoft.com/fwlink/?LinkId=691126" -$COLLECT_DOWNLOAD_LINK = "https://aka.ms/vscollect.exe" -curl.exe --retry 3 -kL $VS_DOWNLOAD_LINK --output vs_installer.exe -if ($LASTEXITCODE -ne 0) { - echo "Download of the VS 2015 installer failed" - exit 1 -} -$VS_INSTALL_ARGS = @("/Quiet", "/NoRestart") -$process = Start-Process "${PWD}\vs_installer.exe" -ArgumentList $VS_INSTALL_ARGS -NoNewWindow -Wait -PassThru -Remove-Item -Path vs_installer.exe -Force -$exitCode = $process.ExitCode -if (($exitCode -ne 0) -and ($exitCode -ne 3010)) { - echo "VS 2015 installer exited with code $exitCode, which should be one of [0, 3010]." - curl.exe --retry 3 -kL $COLLECT_DOWNLOAD_LINK --output Collect.exe - if ($LASTEXITCODE -ne 0) { - echo "Download of the VS Collect tool failed." - exit 1 - } - Start-Process "${PWD}\Collect.exe" -NoNewWindow -Wait -PassThru - New-Item -Path "C:\w\build-results" -ItemType "directory" -Force - Copy-Item -Path "C:\Users\circleci\AppData\Local\Temp\vslogs.zip" -Destination "C:\w\build-results\" - exit 1 -} -echo "VS 2015 installed." diff --git a/.circleci/vs2017_install.ps1 b/.circleci/vs2017_install.ps1 deleted file mode 100644 index 93975fff4..000000000 --- a/.circleci/vs2017_install.ps1 +++ /dev/null @@ -1,35 +0,0 @@ -$VS_DOWNLOAD_LINK = "https://aka.ms/vs/15/release/vs_buildtools.exe" -$COLLECT_DOWNLOAD_LINK = "https://aka.ms/vscollect.exe" -$VS_INSTALL_ARGS = @("--nocache","--quiet","--wait", "--add Microsoft.VisualStudio.Workload.VCTools", - "--add Microsoft.VisualStudio.Component.VC.Tools.14.13", - "--add Microsoft.Component.MSBuild", - "--add Microsoft.VisualStudio.Component.Roslyn.Compiler", - "--add Microsoft.VisualStudio.Component.TextTemplating", - "--add Microsoft.VisualStudio.Component.VC.CoreIde", - "--add Microsoft.VisualStudio.Component.VC.Redist.14.Latest", - "--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core", - "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64", - "--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81") - -curl.exe --retry 3 -kL $VS_DOWNLOAD_LINK --output vs_installer.exe -if ($LASTEXITCODE -ne 0) { - echo "Download of the VS 2017 installer failed" - exit 1 -} - -$process = Start-Process "${PWD}\vs_installer.exe" -ArgumentList $VS_INSTALL_ARGS -NoNewWindow -Wait -PassThru -Remove-Item -Path vs_installer.exe -Force -$exitCode = $process.ExitCode -if (($exitCode -ne 0) -and ($exitCode -ne 3010)) { - echo "VS 2017 installer exited with code $exitCode, which should be one of [0, 3010]." - curl.exe --retry 3 -kL $COLLECT_DOWNLOAD_LINK --output Collect.exe - if ($LASTEXITCODE -ne 0) { - echo "Download of the VS Collect tool failed." - exit 1 - } - Start-Process "${PWD}\Collect.exe" -NoNewWindow -Wait -PassThru - New-Item -Path "C:\w\build-results" -ItemType "directory" -Force - Copy-Item -Path "C:\Users\circleci\AppData\Local\Temp\vslogs.zip" -Destination "C:\w\build-results\" - exit 1 -} -echo "VS 2017 installed." diff --git a/.github/workflows/sanity_check.yml b/.github/workflows/sanity_check.yml deleted file mode 100644 index e6a5f1591..000000000 --- a/.github/workflows/sanity_check.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Check buck targets and code format -on: [push, pull_request] -jobs: - check: - name: Check TARGETS file and code format - runs-on: ubuntu-latest - steps: - - name: Checkout feature branch - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Fetch from upstream - run: | - git remote add upstream https://github.com/facebook/rocksdb.git && git fetch upstream - - - name: Where am I - run: | - echo git status && git status - echo "git remote -v" && git remote -v - echo git branch && git branch - - - name: Setup Python - uses: actions/setup-python@v1 - - - name: Install Dependencies - run: python -m pip install --upgrade pip - - - name: Install argparse - run: pip install argparse - - - name: Download clang-format-diff.py - uses: wei/wget@v1 - with: - args: https://raw.githubusercontent.com/llvm/llvm-project/main/clang/tools/clang-format/clang-format-diff.py - - - name: Check format - run: VERBOSE_CHECK=1 make check-format - - - name: Compare buckify output - run: make check-buck-targets - - - name: Simple source code checks - run: make check-sources diff --git a/.travis.yml b/.travis.yml index 3a71b264b..fbcb8f6a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,303 +3,33 @@ language: cpp os: - linux arch: - - arm64 - ppc64le - - s390x -compiler: - - clang - - gcc -cache: - - ccache -addons: - apt: - update: true - sources: - - ubuntu-toolchain-r-test - packages: - - libgflags-dev - - libbz2-dev - - liblz4-dev - - libsnappy-dev - - liblzma-dev # xv - - libzstd-dev - - zlib1g-dev +services: + - docker env: - - TEST_GROUP=platform_dependent # 16-18 minutes - - TEST_GROUP=1 # 33-35 minutes - - TEST_GROUP=2 # 18-20 minutes - - TEST_GROUP=3 # 20-22 minutes - - TEST_GROUP=4 # 12-14 minutes - # Run java tests - - JOB_NAME=java_test # 4-11 minutes - # Build ROCKSDB_LITE - - JOB_NAME=lite_build # 3-4 minutes - # Build examples - - JOB_NAME=examples # 5-7 minutes - - JOB_NAME=cmake # 3-5 minutes - - JOB_NAME=cmake-gcc8 # 3-5 minutes - - JOB_NAME=cmake-gcc9 # 3-5 minutes - - JOB_NAME=cmake-gcc9-c++20 # 3-5 minutes - - JOB_NAME=cmake-mingw # 3 minutes - - JOB_NAME=make-gcc4.8 - - JOB_NAME=status_checked + global: + - ARTIFACTS_BUCKET=frocksdb-build-artifacts + - ARTIFACTS_KEY=$AWS_ACCESS_KEY_ID + - ARTIFACTS_SECRET=$AWS_ACCESS_SECRET_KEY + jobs: + - CMD=rocksdbjavastaticdockerppc64le + - CMD=rocksdbjavastaticdockerppc64lemusl -matrix: - exclude: - - os : linux - arch: arm64 - env: JOB_NAME=cmake-mingw - - os : linux - arch: arm64 - env: JOB_NAME=make-gcc4.8 - - os: linux - arch: ppc64le - env: JOB_NAME=cmake-mingw - - os: linux - arch: ppc64le - env: JOB_NAME=make-gcc4.8 - - os: linux - arch: s390x - env: JOB_NAME=cmake-mingw - - os: linux - arch: s390x - env: JOB_NAME=make-gcc4.8 - - os: linux - compiler: clang - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: arm64 - env: TEST_GROUP=platform_dependent - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os : linux - arch: arm64 - env: TEST_GROUP=1 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: ppc64le - env: TEST_GROUP=1 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: s390x - env: TEST_GROUP=1 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os : linux - arch: arm64 - env: TEST_GROUP=2 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: ppc64le - env: TEST_GROUP=2 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: s390x - env: TEST_GROUP=2 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os : linux - arch: arm64 - env: TEST_GROUP=3 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: ppc64le - env: TEST_GROUP=3 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: s390x - env: TEST_GROUP=3 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os : linux - arch: arm64 - env: TEST_GROUP=4 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: ppc64le - env: TEST_GROUP=4 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: s390x - env: TEST_GROUP=4 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os : linux - arch: arm64 - env: JOB_NAME=cmake - - if: type = pull_request AND commit_message !~ /FULL_CI/ AND commit_message !~ /java/ - os : linux - arch: arm64 - env: JOB_NAME=java_test - - if: type = pull_request AND commit_message !~ /FULL_CI/ AND commit_message !~ /java/ - os: linux - arch: ppc64le - env: JOB_NAME=java_test - - if: type = pull_request AND commit_message !~ /FULL_CI/ AND commit_message !~ /java/ - os: linux - arch: s390x - env: JOB_NAME=java_test - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os : linux - arch: arm64 - env: JOB_NAME=lite_build - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: ppc64le - env: JOB_NAME=lite_build - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: s390x - env: JOB_NAME=lite_build - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os : linux - arch: arm64 - env: JOB_NAME=examples - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: ppc64le - env: JOB_NAME=examples - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: s390x - env: JOB_NAME=examples - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os : linux - arch: arm64 - env: JOB_NAME=cmake-gcc8 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: ppc64le - env: JOB_NAME=cmake-gcc8 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: s390x - env: JOB_NAME=cmake-gcc8 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os : linux - arch: arm64 - env: JOB_NAME=cmake-gcc9 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: ppc64le - env: JOB_NAME=cmake-gcc9 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: s390x - env: JOB_NAME=cmake-gcc9 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os : linux - arch: arm64 - env: JOB_NAME=cmake-gcc9-c++20 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: ppc64le - env: JOB_NAME=cmake-gcc9-c++20 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: s390x - env: JOB_NAME=cmake-gcc9-c++20 - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os : linux - arch: arm64 - env: JOB_NAME=status_checked - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: ppc64le - env: JOB_NAME=status_checked - - if: type = pull_request AND commit_message !~ /FULL_CI/ - os: linux - arch: s390x - env: JOB_NAME=status_checked +addons: + artifacts: + paths: + - $TRAVIS_BUILD_DIR/java/target/librocksdbjni-linux-ppc64le-musl.so + - $TRAVIS_BUILD_DIR/java/target/librocksdbjni-linux-ppc64le.so install: - - if [ "${JOB_NAME}" == cmake-gcc8 ]; then - sudo apt-get install -y g++-8 || exit $?; - CC=gcc-8 && CXX=g++-8; - fi - - if [ "${JOB_NAME}" == cmake-gcc9 ] || [ "${JOB_NAME}" == cmake-gcc9-c++20 ]; then - sudo apt-get install -y g++-9 || exit $?; - CC=gcc-9 && CXX=g++-9; - fi - - if [ "${JOB_NAME}" == cmake-mingw ]; then - sudo apt-get install -y mingw-w64 || exit $?; - fi - - if [ "${JOB_NAME}" == make-gcc4.8 ]; then - sudo apt-get install -y g++-4.8 || exit $?; - CC=gcc-4.8 && CXX=g++-4.8; - fi - - | - if [[ "${JOB_NAME}" == cmake* ]]; then - sudo apt-get remove -y cmake cmake-data - export CMAKE_DEB="cmake-3.14.5-Linux-$(uname -m).deb" - export CMAKE_DEB_URL="https://rocksdb-deps.s3-us-west-2.amazonaws.com/cmake/${CMAKE_DEB}" - curl --silent --fail --show-error --location --output "${CMAKE_DEB}" "${CMAKE_DEB_URL}" || exit $? - sudo dpkg -i "${CMAKE_DEB}" || exit $? - which cmake && cmake --version - fi - - | - if [[ "${JOB_NAME}" == java_test || "${JOB_NAME}" == cmake* ]]; then - # Ensure JDK 8 - sudo apt-get install -y openjdk-8-jdk || exit $? - export PATH=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/bin:$PATH - export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture) - echo "JAVA_HOME=${JAVA_HOME}" - which java && java -version - which javac && javac -version - fi - -before_script: - # Increase the maximum number of open file descriptors, since some tests use - # more FDs than the default limit. - - ulimit -n 8192 + - sudo apt-get install -y openjdk-8-jdk || exit $? + - export PATH=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/bin:$PATH + - export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture) + - echo "JAVA_HOME=${JAVA_HOME}" + - which java && java -version + - which javac && javac -version script: - - date; ${CXX} --version - - if [ `command -v ccache` ]; then ccache -C; fi - - case $TEST_GROUP in - platform_dependent) - OPT=-DTRAVIS LIB_MODE=shared V=1 ROCKSDBTESTS_PLATFORM_DEPENDENT=only make -j4 all_but_some_tests check_some - ;; - 1) - OPT=-DTRAVIS LIB_MODE=shared V=1 ROCKSDBTESTS_PLATFORM_DEPENDENT=exclude ROCKSDBTESTS_END=backupable_db_test make -j4 check_some - ;; - 2) - OPT="-DTRAVIS -DROCKSDB_NAMESPACE=alternative_rocksdb_ns" LIB_MODE=shared V=1 make -j4 tools && OPT="-DTRAVIS -DROCKSDB_NAMESPACE=alternative_rocksdb_ns" LIB_MODE=shared V=1 ROCKSDBTESTS_PLATFORM_DEPENDENT=exclude ROCKSDBTESTS_START=backupable_db_test ROCKSDBTESTS_END=db_universal_compaction_test make -j4 check_some - ;; - 3) - OPT=-DTRAVIS LIB_MODE=shared V=1 ROCKSDBTESTS_PLATFORM_DEPENDENT=exclude ROCKSDBTESTS_START=db_universal_compaction_test ROCKSDBTESTS_END=table_properties_collector_test make -j4 check_some - ;; - 4) - OPT=-DTRAVIS LIB_MODE=shared V=1 ROCKSDBTESTS_PLATFORM_DEPENDENT=exclude ROCKSDBTESTS_START=table_properties_collector_test make -j4 check_some - ;; - esac - - case $JOB_NAME in - java_test) - OPT=-DTRAVIS LIB_MODE=shared V=1 make rocksdbjava jtest - ;; - lite_build) - OPT='-DTRAVIS -DROCKSDB_LITE' LIB_MODE=shared V=1 make -j4 all - ;; - examples) - OPT=-DTRAVIS LIB_MODE=shared V=1 make -j4 static_lib && cd examples && make -j4 - ;; - cmake-mingw) - sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix; - mkdir build && cd build && cmake -DJNI=1 -DWITH_GFLAGS=OFF .. -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows && make -j4 rocksdb rocksdbjni - ;; - cmake*) - case $JOB_NAME in - *-c++20) - OPT=-DCMAKE_CXX_STANDARD=20 - ;; - esac - - mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=0 -DWITH_GFLAGS=0 -DWITH_BENCHMARK_TOOLS=0 -DWITH_TOOLS=0 -DWITH_CORE_TOOLS=1 .. && make -j4 && cd .. && rm -rf build && mkdir build && cd build && cmake -DJNI=1 .. -DCMAKE_BUILD_TYPE=Release $OPT && make -j4 rocksdb rocksdbjni - ;; - make-gcc4.8) - OPT=-DTRAVIS LIB_MODE=shared V=1 SKIP_LINK=1 make -j4 all && [ "Linking broken because libgflags compiled with newer ABI" ] - ;; - status_checked) - OPT=-DTRAVIS LIB_MODE=shared V=1 ASSERT_STATUS_CHECKED=1 make -j4 check_some - ;; - esac -notifications: - email: - - leveldb@fb.com + - make jclean clean $CMD