From 89b1f5aa1b84cdf4b25db52ca6a6a72b71aa7021 Mon Sep 17 00:00:00 2001 From: Derek Bailey Date: Sat, 10 Sep 2022 12:36:51 -0700 Subject: [PATCH] remove travis config (#7522) * remove travis config * remove more travis and appveyor stuff * remove appveyor specific things --- .github/labeler.yml | 2 - .travis.yml | 215 ------------------------------------- conan/appveyor/build.py | 8 -- conan/appveyor/install.py | 8 -- conan/build.py | 8 -- conan/travis/build.sh | 14 --- conan/travis/install.sh | 22 ---- include/flatbuffers/util.h | 3 - src/flatc_main.cpp | 3 - src/util.cpp | 23 ---- tests/test_assert.cpp | 2 - 11 files changed, 308 deletions(-) delete mode 100644 .travis.yml delete mode 100644 conan/appveyor/build.py delete mode 100644 conan/appveyor/install.py delete mode 100755 conan/travis/build.sh delete mode 100755 conan/travis/install.sh diff --git a/.github/labeler.yml b/.github/labeler.yml index e83f2805c..eb1d7fdf8 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -84,9 +84,7 @@ documentation: CI: - '.github/**/*' - - '.travis/**/*' - '.bazelci/**/*' - - .travis.yml grpc: - grpc/**/* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2e95109dc..000000000 --- a/.travis.yml +++ /dev/null @@ -1,215 +0,0 @@ -env: - global: - # Set at the root level as this is ignored when set under matrix.env. - - GCC_VERSION="4.9" - # Fail on first error if UBSAN or ASAN enabled for a target - - UBSAN_OPTIONS=halt_on_error=1 - - ASAN_OPTIONS=halt_on_error=1 - # Travis machines have 2 cores - - JOBS=2 - - MAKEFLAGS="-j 2" - -conan-linux: &conan-linux - os: linux - dist: xenial - language: python - python: "3.7" - services: - - docker - install: - - ./conan/travis/install.sh - script: - - ./conan/travis/build.sh - if: tag IS present - -conan-linux-master: &conan-linux-master - os: linux - dist: xenial - language: python - python: "3.7" - services: - - docker - install: - - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./conan/travis/install.sh; fi' - script: - - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./conan/travis/build.sh; fi' - branches: - only: - - master - -conan-osx: &conan-osx - os: osx - language: generic - install: - - ./conan/travis/install.sh - script: - - ./conan/travis/build.sh - if: tag IS present - -matrix: - include: - #- language: python - # python: "2.7" - # install: - # - "pip install wheel twine" - # script: - # - "cd python/" - # - 'VERSION="$TRAVIS_TAG" python setup.py sdist bdist_wheel' - # - "cd ../" - # deploy: - # # Checkpointed release builds. - # - provider: script - # script: .travis/deploy-python.sh - # skip_cleanup: true - # on: - # tags: true - # # all_branches must be set with tags: true. See below post: - # # https://stackoverflow.com/a/27775257/1076585 - # all_branches: true - # # Produce a new build for the cutting edge when master changes. - # - provider: script - # script: .travis/deploy-python.sh - # skip_cleanup: true - # on: - # branch: master - - language: cpp - os: - - linux - - addons: - apt: - packages: - - docker-ce - script: - - bash .travis/build-and-run-docker-test-containers.sh - - - language: cpp - os: - - linux - - compiler: - - gcc - - env: - matrix: - - BUILD_TYPE=Debug - - BUILD_TYPE=Release - - before_install: - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq g++-$GCC_VERSION; fi - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq gcc-$GCC_VERSION; fi - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++; fi - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi - - script: - - pip install cmake - - bash .travis/check-sources.sh - - bash grpc/build_grpc.sh - - cmake . - -DCMAKE_BUILD_TYPE=$BUILD_TYPE - -DFLATBUFFERS_BUILD_GRPCTEST=ON - -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install - -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf - -DFLATBUFFERS_CODE_SANITIZE=ON - - cmake --build . --target all --clean-first -- -j${JOBS} - - LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure - - - language: cpp - os: osx - osx_image: xcode9.3 - env: - matrix: - - BUILD_TYPE=Debug - - BUILD_TYPE=Release - - script: - - pip install --user cmake - - mkdir ~/cmake_path - - ln -s $(find ~/Library/Python -name cmake -type f | head -n 1) ~/cmake_path/cmake - - ln -s $(find ~/Library/Python -name ctest -type f | head -n 1) ~/cmake_path/ctest - - export PATH=~/cmake_path:${PATH} - - bash grpc/build_grpc.sh - - cmake . - -DCMAKE_BUILD_TYPE=$BUILD_TYPE - -DFLATBUFFERS_BUILD_GRPCTEST=ON - -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install - -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf - -DFLATBUFFERS_CODE_SANITIZE=ON - - cmake --build . -- -j${JOBS} - - DYLD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure - - - <<: *conan-linux-master - env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/gcc8 - - <<: *conan-linux - env: CONAN_GCC_VERSIONS=4.9 CONAN_DOCKER_IMAGE=conanio/gcc49 - - <<: *conan-linux - env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=conanio/gcc5 - - <<: *conan-linux - env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=conanio/gcc6 - - <<: *conan-linux - env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=conanio/gcc7 - - <<: *conan-linux - env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/gcc8 - - <<: *conan-linux - env: CONAN_GCC_VERSIONS=9 CONAN_DOCKER_IMAGE=conanio/gcc9 - - <<: *conan-linux - env: CONAN_CLANG_VERSIONS=3.9 CONAN_DOCKER_IMAGE=conanio/clang39 - - <<: *conan-linux - env: CONAN_CLANG_VERSIONS=4.0 CONAN_DOCKER_IMAGE=conanio/clang40 - - <<: *conan-linux - env: CONAN_CLANG_VERSIONS=5.0 CONAN_DOCKER_IMAGE=conanio/clang50 - - <<: *conan-linux - env: CONAN_CLANG_VERSIONS=6.0 CONAN_DOCKER_IMAGE=conanio/clang60 - - <<: *conan-linux - env: CONAN_CLANG_VERSIONS=7.0 CONAN_DOCKER_IMAGE=conanio/clang7 - - <<: *conan-linux - env: CONAN_CLANG_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/clang8 - - <<: *conan-osx - osx_image: xcode7.3 - env: CONAN_APPLE_CLANG_VERSIONS=7.3 - - <<: *conan-osx - osx_image: xcode8.3 - env: CONAN_APPLE_CLANG_VERSIONS=8.1 - - <<: *conan-osx - osx_image: xcode9 - env: CONAN_APPLE_CLANG_VERSIONS=9.0 - - <<: *conan-osx - osx_image: xcode9.4 - env: CONAN_APPLE_CLANG_VERSIONS=9.1 - - <<: *conan-osx - osx_image: xcode10.2 - env: CONAN_APPLE_CLANG_VERSIONS=10.0 - - - language: android - sudo: true - dist: trusty - android: - components: - - tools - - platform-tools - - extra-android-m2repository - licenses: - - 'android-sdk-preview-license-52d11cd2' - - 'android-sdk-license-.+' - - 'google-gdk-license-.+' - compiler: - - gcc - before_install: - - echo y | sdkmanager "platforms;android-30" - - echo y | sdkmanager "build-tools;30.0.2" - - echo y | sdkmanager "ndk-bundle" - - echo y | sdkmanager "cmake;3.6.4111459" - script: - - cmake -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF .; make; export PATH="$PATH:${PWD}" - - cd android; ./gradlew clean build - - - language: generic - if: type IN (pull_request) - os: linux - install: - - bash .travis/format_install.sh - - script: - - bash .travis/format_check.sh diff --git a/conan/appveyor/build.py b/conan/appveyor/build.py deleted file mode 100644 index 9bac46dbe..000000000 --- a/conan/appveyor/build.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -import os - -if os.getenv("APPVEYOR_REPO_TAG") != "true": - print("Skip build step. It's not TAG") -else: - os.system("python conan/build.py") diff --git a/conan/appveyor/install.py b/conan/appveyor/install.py deleted file mode 100644 index 962c7da6b..000000000 --- a/conan/appveyor/install.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -import os - -if os.getenv("APPVEYOR_REPO_TAG") != "true": - print("Skip step. It's not TAG") -else: - os.system("pip install conan conan-package-tools") diff --git a/conan/build.py b/conan/build.py index 9a857188c..62a379907 100644 --- a/conan/build.py +++ b/conan/build.py @@ -21,14 +21,6 @@ def get_branch(): def get_version(): version = get_branch() - if os.getenv("TRAVIS", False): - version = os.getenv("TRAVIS_BRANCH") - - if os.getenv("APPVEYOR", False): - version = os.getenv("APPVEYOR_REPO_BRANCH") - if os.getenv("APPVEYOR_REPO_TAG") == "true": - version = os.getenv("APPVEYOR_REPO_TAG_NAME") - match = re.search(r"v(\d+\.\d+\.\d+.*)", version) if match: return match.group(1) diff --git a/conan/travis/build.sh b/conan/travis/build.sh deleted file mode 100755 index 069ced202..000000000 --- a/conan/travis/build.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -e -set -x - -if [[ "$(uname -s)" == 'Darwin' ]]; then - if which pyenv > /dev/null; then - eval "$(pyenv init -)" - fi - pyenv activate conan -fi - -conan user -python conan/build.py diff --git a/conan/travis/install.sh b/conan/travis/install.sh deleted file mode 100755 index f4208d826..000000000 --- a/conan/travis/install.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -e -set -x - -if [[ "$(uname -s)" == 'Darwin' ]]; then - brew update || brew update - brew outdated pyenv || brew upgrade pyenv - brew install pyenv-virtualenv - brew install cmake || true - - if which pyenv > /dev/null; then - eval "$(pyenv init -)" - fi - - pyenv install 2.7.10 - pyenv virtualenv 2.7.10 conan - pyenv rehash - pyenv activate conan -fi - -pip install -U conan_package_tools conan diff --git a/include/flatbuffers/util.h b/include/flatbuffers/util.h index dcc5065f9..73a3ab786 100644 --- a/include/flatbuffers/util.h +++ b/include/flatbuffers/util.h @@ -685,9 +685,6 @@ bool SetGlobalTestLocale(const char *locale_name, bool ReadEnvironmentVariable(const char *var_name, std::string *_value = nullptr); -// MSVC specific: Send all assert reports to STDOUT to prevent CI hangs. -void SetupDefaultCRTReportMode(); - enum class Case { kUnknown = 0, // TheQuickBrownFox diff --git a/src/flatc_main.cpp b/src/flatc_main.cpp index abcab24ae..b4c4251c4 100644 --- a/src/flatc_main.cpp +++ b/src/flatc_main.cpp @@ -52,9 +52,6 @@ void LogCompilerError(const std::string &err) { } // namespace flatbuffers int main(int argc, const char *argv[]) { - // Prevent Appveyor-CI hangs. - flatbuffers::SetupDefaultCRTReportMode(); - const std::string flatbuffers_version(flatbuffers::FLATBUFFERS_VERSION()); std::unique_ptr bfbs_gen_lua = diff --git a/src/util.cpp b/src/util.cpp index 341b8aa6e..df324e837 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -426,29 +426,6 @@ bool ReadEnvironmentVariable(const char *var_name, std::string *_value) { return true; } -void SetupDefaultCRTReportMode() { - // clang-format off - - #ifdef _MSC_VER - // By default, send all reports to STDOUT to prevent CI hangs. - // Enable assert report box [Abort|Retry|Ignore] if a debugger is present. - const int dbg_mode = (_CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG) | - (IsDebuggerPresent() ? _CRTDBG_MODE_WNDW : 0); - (void)dbg_mode; // release mode fix - // CrtDebug reports to _CRT_WARN channel. - _CrtSetReportMode(_CRT_WARN, dbg_mode); - _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT); - // The assert from reports to _CRT_ERROR channel - _CrtSetReportMode(_CRT_ERROR, dbg_mode); - _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDOUT); - // Internal CRT assert channel? - _CrtSetReportMode(_CRT_ASSERT, dbg_mode); - _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDOUT); - #endif - - // clang-format on -} - std::string ConvertCase(const std::string &input, Case output_case, Case input_case) { if (output_case == Case::kKeep) return input; diff --git a/tests/test_assert.cpp b/tests/test_assert.cpp index 596923294..32dece982 100644 --- a/tests/test_assert.cpp +++ b/tests/test_assert.cpp @@ -43,8 +43,6 @@ void InitTestEngine(TestFailEventListener listener) { setvbuf(stdout, nullptr, _IONBF, 0); setvbuf(stderr, nullptr, _IONBF, 0); - flatbuffers::SetupDefaultCRTReportMode(); - // clang-format off #if defined(FLATBUFFERS_MEMORY_LEAK_TRACKING_MSVC)