<commit_before>language: cpp

# OS config, depends on actual 'os' in build matrix
dist: xenial

stages:
  - check
  - build

env:
  global:
    - SCONS_CACHE=$HOME/.scons_cache/$TRAVIS_BRANCH
    - SCONS_CACHE_LIMIT=1024
    - OPTIONS="debug_symbols=no verbose=yes progress=no builtin_libpng=yes"
    - secure: "<KEY>

cache:
  directories:
    - $SCONS_CACHE

matrix:
  include:
    - name: Static checks (clang-format) + Documentation checks
      stage: check
      env: STATIC_CHECKS=yes
      os: linux
      compiler: gcc
      addons:
        apt:
          sources:
            - llvm-toolchain-xenial-8
          packages:
            - clang-format-8

    - name: Linux editor (debug, GCC 9, with Mono)
      stage: build
      env: PLATFORM=x11 TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc-9 MATRIX_EVAL="CC=gcc-9 && CXX=g++-9" EXTRA_ARGS="module_mono_enabled=yes mono_glue=no warnings=extra werror=yes"
      os: linux
      compiler: gcc-9
      addons:
        apt:
          sources:
            - mono
            - ubuntu-toolchain-r-test
          packages:
            - &gcc9_deps [gcc-9, g++-9]
            - &linux_deps [libasound2-dev, libgl1-mesa-dev, libglu1-mesa-dev, libx11-dev, libxcursor-dev, libxi-dev, libxinerama-dev, libxrandr-dev]
            - &linux_mono_deps [mono-devel, msbuild, nuget]

    - name: Linux export template (release, Clang)
      stage: build
      env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
      os: linux
      compiler: clang
      addons:
        apt:
          packages:
            - *linux_deps

    - name: Android export template (release_debug, Clang)
      stage: build
      env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
      os: linux
      compiler: clang
      addons:
        apt:
          packages:
            - openjdk-8-jdk

    - name: macOS editor (debug, Clang)
      stage: build
      env: PLATFORM=osx TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-clang EXTRA_ARGS="warnings=extra werror=yes"
      os: osx
      compiler: clang

    - name: iOS export template (debug, Clang)
      stage: build
      env: PLATFORM=iphone TOOLS=no TARGET=debug CACHE_NAME=${PLATFORM}-clang
      os: osx
      compiler: clang

    - name: Linux headless editor (release_debug, GCC 9, testing project exporting and script running)
      stage: build
      env: PLATFORM=server TOOLS=yes TARGET=release_debug CACHE_NAME=${PLATFORM}-tools-gcc-9 MATRIX_EVAL="CC=gcc-9 && CXX=g++-9" EXTRA_ARGS="warnings=extra werror=yes" TEST_PROJECT=yes
      os: linux
      compiler: gcc-9
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - *gcc9_deps
            - *linux_deps

    - name: Linux export template (release_debug, GCC 5, without 3D support)
      stage: build
      env: PLATFORM=x11 TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-5 EXTRA_ARGS="CXXFLAGS=-fno-strict-aliasing disable_3d=yes"
      os: linux
      compiler: gcc
      addons:
        apt:
          packages:
            - *linux_deps

before_install:
  - eval "${MATRIX_EVAL}"
  - if [ "$STATIC_CHECKS" = "yes" ]; then
      unset SCONS_CACHE;
    fi

install:
  - pip install --user scons;
  - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$PLATFORM" = "android" ]; then
      export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64;
      export PATH=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:${PATH};
      java -version;
      misc/travis/android-tools-linux.sh;
    fi
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
      export PATH=${PATH}:/Users/travis/Library/Python/2.7/bin;
    fi

before_script:
  - if [ "$PLATFORM" = "android" ]; then
      export ANDROID_HOME=$TRAVIS_BUILD_DIR/godot-dev/build-tools/android-sdk;<commit_msg>Travis: Use Python 3 for SCons<commit_after>language: cpp

# OS config, depends on actual 'os' in build matrix
dist: xenial

stages:
  - check
  - build

env:
  global:
    - SCONS_CACHE=$HOME/.scons_cache/$TRAVIS_BRANCH
    - SCONS_CACHE_LIMIT=1024
    - OPTIONS="debug_symbols=no verbose=yes progress=no builtin_libpng=yes"
    - secure: "<KEY>

cache:
  directories:
    - $SCONS_CACHE

matrix:
  include:
    - name: Static checks (clang-format) + Documentation checks
      stage: check
      env: STATIC_CHECKS=yes
      os: linux
      compiler: gcc
      addons:
        apt:
          sources:
            - llvm-toolchain-xenial-8
          packages:
            - clang-format-8

    - name: Linux editor (debug, GCC 9, with Mono)
      stage: build
      env: PLATFORM=x11 TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc-9 MATRIX_EVAL="CC=gcc-9 && CXX=g++-9" EXTRA_ARGS="module_mono_enabled=yes mono_glue=no warnings=extra werror=yes"
      os: linux
      compiler: gcc-9
      addons:
        apt:
          sources:
            - mono
            - ubuntu-toolchain-r-test
          packages:
            - &gcc9_deps [gcc-9, g++-9]
            - &linux_deps [libasound2-dev, libgl1-mesa-dev, libglu1-mesa-dev, libx11-dev, libxcursor-dev, libxi-dev, libxinerama-dev, libxrandr-dev]
            - &linux_mono_deps [mono-devel, msbuild, nuget]

    - name: Linux export template (release, Clang)
      stage: build
      env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
      os: linux
      compiler: clang
      addons:
        apt:
          packages:
            - *linux_deps

    - name: Android export template (release_debug, Clang)
      stage: build
      env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
      os: linux
      compiler: clang
      addons:
        apt:
          packages:
            - openjdk-8-jdk

    - name: macOS editor (debug, Clang)
      stage: build
      env: PLATFORM=osx TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-clang EXTRA_ARGS="warnings=extra werror=yes"
      os: osx
      compiler: clang
      addons:
        homebrew:
          packages:
            - scons

    - name: iOS export template (debug, Clang)
      stage: build
      env: PLATFORM=iphone TOOLS=no TARGET=debug CACHE_NAME=${PLATFORM}-clang
      os: osx
      compiler: clang
      addons:
        homebrew:
          packages:
            - scons

    - name: Linux headless editor (release_debug, GCC 9, testing project exporting and script running)
      stage: build
      env: PLATFORM=server TOOLS=yes TARGET=release_debug CACHE_NAME=${PLATFORM}-tools-gcc-9 MATRIX_EVAL="CC=gcc-9 && CXX=g++-9" EXTRA_ARGS="warnings=extra werror=yes" TEST_PROJECT=yes
      os: linux
      compiler: gcc-9
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - *gcc9_deps
            - *linux_deps

    - name: Linux export template (release_debug, GCC 5, without 3D support)
      stage: build
      env: PLATFORM=x11 TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-5 EXTRA_ARGS="CXXFLAGS=-fno-strict-aliasing disable_3d=yes"
      os: linux
      compiler: gcc
      addons:
        apt:
          packages:
            - *linux_deps

before_install:
  - eval "${MATRIX_EVAL}"
  - if [ "$STATIC_CHECKS" = "yes" ]; then
      unset SCONS_CACHE;
    fi

install:
  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then
      pyenv global 3.7.1 system;
      pip3 install --user scons;
    fi
  - scons --version
  - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$PLATFORM" = "android" ]; then
      export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64;
      export PATH=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:${PATH};
      java -version;
      misc/travis/android-tools-linux.sh;
    fi

before_script:
  - if [ "$PLATFORM" = "android" ]; then
      export ANDROID_HOME=$TRAVIS_BUILD_DIR/godot-dev/build-tools/android-sdk;
{'fraction_non_alphanumeric': 0.11217424147047715, 'fraction_numerical': 0.011456628477905073, 'mean_word_length': 2.3789876648234793, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '1909990', 'n_tokens_mistral': 2906, 'n_tokens_neox': 2784, 'n_words': 586}