<commit_before>env:
  global:
    - LRS_BUILD_CONFIG=Debug
    - LRS_RUN_CONFIG=Release
matrix:
  include:
    - name: "Windows Testing - cpp, Win USB (Win7)"
      os: windows
      language: cpp
      env: VS15=false RS_CPP_TEST=true
      script:
        - cmake .. -G "Visual Studio 15 2017 Win64" -DBUILD_UNIT_TESTS=true -DBUILD_EXAMPLES=false -DBUILD_GRAPHICAL_EXAMPLES=false -DBUILD_WITH_TM2=false -DFORCE_RSUSB_BACKEND=true
        - cmake --build . --config $LRS_RUN_CONFIG -- -m
        - cd $LRS_RUN_CONFIG
        - ls
        - ./live-test.exe -d yes -i [software-device]
        - unset LRS_LOG_LEVEL
        - C:/Python38/python.exe ../../unit-tests/run-unit-tests.py --verbose .
        
    - name: "Windows - cpp"
      os: windows
      language: cpp
      env: VS15=true
      script:
        - cmake .. -G "Visual Studio 14 2015 Win64" -DBUILD_EXAMPLES=true -DBUILD_WITH_TM2=true
        - cmake --build . --config $LRS_BUILD_CONFIG -- -m
        - ls $LRS_BUILD_CONFIG

    - name: "Windows - C#"
      os: windows
      language: cpp
      env: VS15=true
      script:
        - cmake .. -G "Visual Studio 14 2015 Win64" -DBUILD_EXAMPLES=false -DBUILD_CSHARP_BINDINGS=true -DDOTNET_VERSION_LIBRARY="4.5" -DDOTNET_VERSION_EXAMPLES="4.5"
        - cmake --build . --config $LRS_BUILD_CONFIG -- -m
        - ls $LRS_BUILD_CONFIG

    - name: "Linux Testing - cpp"
      os: linux
      language: cpp
      sudo: required
      dist: xenial
      env: RS_CPP_TEST=true
      script:
        - cmake .. -DBUILD_UNIT_TESTS=true -DBUILD_EXAMPLES=false -DBUILD_WITH_TM2=false
        - cmake --build . --config $LRS_RUN_CONFIG -- -j4
        - ./unit-tests/live-test -d yes -i [software-device]
        - for i in ./records/single_cam/*; do ./unit-tests/live-test -d yes -i ~[multicam] from "$i"; done
        - for i in ./records/multi_cam/*; do ./unit-tests/live-test -d yes -i [multicam] from "$i"; done

    - name: "Linux - cpp - static"
      os: linux
      language: cpp
      sudo: required
      dist: xenial
      script:
        - cd ../scripts && ./pr_check.sh && cd ../build
        - cmake .. -DBUILD_UNIT_TESTS=true -DBUILD_EXAMPLES=true -DBUILD_WITH_TM2=true -DBUILD_SHARED_LIBS=false
        - cmake --build . --config $LRS_BUILD_CONFIG -- -j4
        - python3 ../unit-tests/run-unit-tests.py --verbose .

    - name: "Linux - python & nodejs"
      os: linux
      language: cpp
      sudo: required
      dist: xenial
      python: "2.7"
      node_js: "6"
      env: LRS_BUILD_NODEJS=true
      script:
        - cmake .. -DBUILD_PYTHON_BINDINGS=true -DBUILD_NODEJS_BINDINGS=true -DPYBIND11_PYTHON_VERSION=2.7
        - cmake --build . --config $LRS_BUILD_CONFIG -- -j4
        - cd ../wrappers/nodejs/
        - npm install
        - cd test
        - wget http://realsense-hw-public.s3.amazonaws.com/rs-tests/nodejs_records.rec
        - mocha test-functional.js --playback nodejs_records.rec

    - name: "Mac - cpp"
      os: osx
      language: cpp
      sudo: required
      osx_image: xcode7
      script:
        - cmake .. -DBUILD_EXAMPLES=true -DBUILD_WITH_OPENMP=false -DHWM_OVER_XU=false
        - cmake --build . --config $LRS_BUILD_CONFIG -- -j4
        - ls

    - name: "Android - cpp"
      os: linux
      language: cpp
      sudo: required
      dist: xenial
      env: LRS_BUILD_ANDROID=true
      script:
        - cmake .. -DCMAKE_TOOLCHAIN_FILE=../android-ndk-r16b/build/cmake/android.toolchain.cmake
        - cmake --build . --config $LRS_BUILD_CONFIG -- -j4
        - ls

before_install:
  - cd scripts && ./api_check.sh && cd ..
  - if [[ "$LRS_BUILD_NODEJS" == "true" ]]; then
      nvm use 6;
      npm install -g node-gyp;
      npm install -g mocha;
      git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git;
      export OLDPATH=$PATH && export PATH=$PATH:$(pwd)/depot_tools;
      cd wrappers/nodejs/tools && npm install && cd ..;
      node ./tools/linter.js;
      export PATH=$OLDPATH && unset OLDPATH && cd ../../;
    fi
  - if [[ "$LRS_BUILD_ANDROID" == "true" ]]; then
      wget https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip;
      unzip -q android-ndk-r16b-linux-x86_64.zip -d ./;
    fi
  - mkdir build && cd build
  - if [[ "$RS_CPP_TEST" == "true" ]]; then
      export LRS_LOG_LEVEL="DEBUG";
      url_records_path="http://realsense-hw-public.s3.amazonaws.com/rs-tests/lrs_2.8.3/";
      records_name="records_test.txt";
      url_records_list=$url_records_path$records_name;
      wget $url_records_path$records_name;
      tests_list=`cat $records_name`;
      for record in $tests_list; do echo $url_records_path$record; wget $url_records_path$record -P "records/"$(echo $record | cut -d '/' -f 1); done;
    fi

install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
      sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
      sudo apt-get update;
      sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev;
      sudo apt-get install -qq libusb-1.0-0-dev;
      sudo apt-get install -qq libgtk-3-dev;
      sudo apt-get install gcc-5 g++-5;
      sudo apt-get install cmake;
      sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5;
      sudo apt-get install libglfw3-dev libglfw3;
    fi

  - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
      choco install -y python3 --version 3.8.1;
      if [[ "$VS15" == "true" ]]; then
        choco install -y vcbuildtools --version 2015.4 --force;
      fi;
    fi

  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      brew uninstall xctool;
      brew install xctool --HEAD;
      brew install homebrew/core/glfw3;
      brew list libusb || brew install libusb;
    fi
<commit_msg>Revert "try to add cmake update to Travis"<commit_after>env:
  global:
    - LRS_BUILD_CONFIG=Debug
    - LRS_RUN_CONFIG=Release
matrix:
  include:
    - name: "Windows Testing - cpp, Win USB (Win7)"
      os: windows
      language: cpp
      env: VS15=false RS_CPP_TEST=true
      script:
        - cmake .. -G "Visual Studio 15 2017 Win64" -DBUILD_UNIT_TESTS=true -DBUILD_EXAMPLES=false -DBUILD_GRAPHICAL_EXAMPLES=false -DBUILD_WITH_TM2=false -DFORCE_RSUSB_BACKEND=true
        - cmake --build . --config $LRS_RUN_CONFIG -- -m
        - cd $LRS_RUN_CONFIG
        - ls
        - ./live-test.exe -d yes -i [software-device]
        - unset LRS_LOG_LEVEL
        - C:/Python38/python.exe ../../unit-tests/run-unit-tests.py --verbose .
        
    - name: "Windows - cpp"
      os: windows
      language: cpp
      env: VS15=true
      script:
        - cmake .. -G "Visual Studio 14 2015 Win64" -DBUILD_EXAMPLES=true -DBUILD_WITH_TM2=true
        - cmake --build . --config $LRS_BUILD_CONFIG -- -m
        - ls $LRS_BUILD_CONFIG

    - name: "Windows - C#"
      os: windows
      language: cpp
      env: VS15=true
      script:
        - cmake .. -G "Visual Studio 14 2015 Win64" -DBUILD_EXAMPLES=false -DBUILD_CSHARP_BINDINGS=true -DDOTNET_VERSION_LIBRARY="4.5" -DDOTNET_VERSION_EXAMPLES="4.5"
        - cmake --build . --config $LRS_BUILD_CONFIG -- -m
        - ls $LRS_BUILD_CONFIG

    - name: "Linux Testing - cpp"
      os: linux
      language: cpp
      sudo: required
      dist: xenial
      env: RS_CPP_TEST=true
      script:
        - cmake .. -DBUILD_UNIT_TESTS=true -DBUILD_EXAMPLES=false -DBUILD_WITH_TM2=false
        - cmake --build . --config $LRS_RUN_CONFIG -- -j4
        - ./unit-tests/live-test -d yes -i [software-device]
        - for i in ./records/single_cam/*; do ./unit-tests/live-test -d yes -i ~[multicam] from "$i"; done
        - for i in ./records/multi_cam/*; do ./unit-tests/live-test -d yes -i [multicam] from "$i"; done

    - name: "Linux - cpp - static"
      os: linux
      language: cpp
      sudo: required
      dist: xenial
      script:
        - cd ../scripts && ./pr_check.sh && cd ../build
        - cmake .. -DBUILD_UNIT_TESTS=true -DBUILD_EXAMPLES=true -DBUILD_WITH_TM2=true -DBUILD_SHARED_LIBS=false
        - cmake --build . --config $LRS_BUILD_CONFIG -- -j4
        - python3 ../unit-tests/run-unit-tests.py --verbose .

    - name: "Linux - python & nodejs"
      os: linux
      language: cpp
      sudo: required
      dist: xenial
      python: "2.7"
      node_js: "6"
      env: LRS_BUILD_NODEJS=true
      script:
        - cmake .. -DBUILD_PYTHON_BINDINGS=true -DBUILD_NODEJS_BINDINGS=true -DPYBIND11_PYTHON_VERSION=2.7
        - cmake --build . --config $LRS_BUILD_CONFIG -- -j4
        - cd ../wrappers/nodejs/
        - npm install
        - cd test
        - wget http://realsense-hw-public.s3.amazonaws.com/rs-tests/nodejs_records.rec
        - mocha test-functional.js --playback nodejs_records.rec

    - name: "Mac - cpp"
      os: osx
      language: cpp
      sudo: required
      osx_image: xcode7
      script:
        - cmake .. -DBUILD_EXAMPLES=true -DBUILD_WITH_OPENMP=false -DHWM_OVER_XU=false
        - cmake --build . --config $LRS_BUILD_CONFIG -- -j4
        - ls

    - name: "Android - cpp"
      os: linux
      language: cpp
      sudo: required
      dist: xenial
      env: LRS_BUILD_ANDROID=true
      script:
        - cmake .. -DCMAKE_TOOLCHAIN_FILE=../android-ndk-r16b/build/cmake/android.toolchain.cmake
        - cmake --build . --config $LRS_BUILD_CONFIG -- -j4
        - ls

before_install:
  - cd scripts && ./api_check.sh && cd ..
  - if [[ "$LRS_BUILD_NODEJS" == "true" ]]; then
      nvm use 6;
      npm install -g node-gyp;
      npm install -g mocha;
      git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git;
      export OLDPATH=$PATH && export PATH=$PATH:$(pwd)/depot_tools;
      cd wrappers/nodejs/tools && npm install && cd ..;
      node ./tools/linter.js;
      export PATH=$OLDPATH && unset OLDPATH && cd ../../;
    fi
  - if [[ "$LRS_BUILD_ANDROID" == "true" ]]; then
      wget https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip;
      unzip -q android-ndk-r16b-linux-x86_64.zip -d ./;
    fi
  - mkdir build && cd build
  - if [[ "$RS_CPP_TEST" == "true" ]]; then
      export LRS_LOG_LEVEL="DEBUG";
      url_records_path="http://realsense-hw-public.s3.amazonaws.com/rs-tests/lrs_2.8.3/";
      records_name="records_test.txt";
      url_records_list=$url_records_path$records_name;
      wget $url_records_path$records_name;
      tests_list=`cat $records_name`;
      for record in $tests_list; do echo $url_records_path$record; wget $url_records_path$record -P "records/"$(echo $record | cut -d '/' -f 1); done;
    fi

install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
      sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
      sudo apt-get update;
      sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev;
      sudo apt-get install -qq libusb-1.0-0-dev;
      sudo apt-get install -qq libgtk-3-dev;
      sudo apt-get install gcc-5 g++-5;
      sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5;
      sudo apt-get install libglfw3-dev libglfw3;
    fi

  - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
      choco install -y python3 --version 3.8.1;
      if [[ "$VS15" == "true" ]]; then
        choco install -y vcbuildtools --version 2015.4 --force;
      fi;
    fi

  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      brew uninstall xctool;
      brew install xctool --HEAD;
      brew install homebrew/core/glfw3;
      brew list libusb || brew install libusb;
    fi

{'fraction_non_alphanumeric': 0.13408207343412526, 'fraction_numerical': 0.017624190064794817, 'mean_word_length': 2.1328822733423545, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '852465', 'n_tokens_mistral': 4411, 'n_tokens_neox': 4186, 'n_words': 929}