<commit_before># This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0
#
# http://docs.travis-ci.com/user/customizing-the-build/
# http://lint.travis-ci.org/

os:       linux
dist:     xenial
language: generic
services: docker

cache:
  directories:
    - ~/cache/
    # We use $PIPELINE to carry cache context along job pipelines (workflows)
    # https://docs.travis-ci.com/user/caching/

# Job pipelines
jobs:
  include:

    # == 'Gcc' Pipeline ==
    # Build a highly optimized Gcc and upload it.
    - stage: Stage1
      name: "GCC (gcc appimage + check + bintray)"
      env: PIPELINE=Gcc
      before_install: |
        travis_retry git fetch --unshallow --tags
      script: |
        misc/cibuild.sh gcc release all appimage check && {
          echo "$BINTRAY_API_KEY" > .bintray_api_key &&
          test "$TRAVIS_BRANCH^$TRAVIS_PULL_REQUEST" != "master^false" ||
          misc/cibuild.sh bintray ; }

    # == 'Linting' Pipeline ==
    # Generate all possible source code linting reports,
    # sort slow jobs into separate stages to avoid timeouts.
    - stage: Stage1
      name: "Linting-1 (clang cppcheck + scan-build)"
      env: PIPELINE=linting
      before_install: |
        rm -v -rf ~/cache/$TRAVIS_BUILD_NUMBER/ ~/beast &&
        travis_retry git fetch --unshallow --tags &&
        cd .. && mv beast ~/ && cd ~/beast/
      script: |
        misc/cibuild.sh quick cppcheck scan-build
      before_cache: |
        mkdir -p ~/cache/$TRAVIS_BUILD_NUMBER/ &&
        cd ~ && mv ~/beast/ ~/cache/$TRAVIS_BUILD_NUMBER/ &&
        (cd ~/cache/ && pwd && ls -al )
    - stage: Stage2
      name: "Linting-2 (clang-tidy + listunused + listhacks + bintray)"
      env: PIPELINE=linting
      before_install: |
        mv ~/cache/$TRAVIS_BUILD_NUMBER/beast ~/ && cd ~/beast/
      script: |
        misc/cibuild.sh clang-tidy &&
        echo "$BINTRAY_API_KEY" > .bintray_api_key &&
        misc/cibuild.sh listunused listhacks bintray
      before_cache: |
        rm -rf ~/cache/

    # == Stage2 Fedora ==
    # Fedora build tests, runs *after* the 'appimage' succeeded
    - stage: Stage1
      name: "Fedora-27 (build + check)"
      env: PIPELINE=Fedora-27
      before_install: |
        travis_retry git fetch --unshallow --tags
      script: |
        docker build --build-arg DIST=fedora:27 -f misc/Dockerfile-yum -t beast-fedora-27 .

    # == 'Asan' Pipeline ==
    # Run checks with asan turned on.
    - stage: Stage2
      name: "Asan check"
      env: PIPELINE=asan
      before_install: |
        travis_retry git fetch --unshallow --tags
      before_script: |
        echo "$BINTRAY_API_KEY" > .bintray_api_key
      script: |
        misc/ciwitness.sh out/asan/build.log asan all check bintray

    # == 'Ubsan' Pipeline ==
    # Run checks with ubsan turned on.
    - stage: Stage2
      name: "Ubsan check"
      env: PIPELINE=ubsan
      before_install: |
        travis_retry git fetch --unshallow --tags
      before_script: |
        echo "$BINTRAY_API_KEY" > .bintray_api_key
      script: |
        misc/ciwitness.sh out/ubsan/build.log ubsan all check bintray

  # == allow_failures ==
  allow_failures:
    - script: |
        misc/ciwitness.sh out/asan/build.log asan all check bintray
    - script: |
        misc/ciwitness.sh out/ubsan/build.log ubsan all check bintray

notifications:
  irc:
    channels:
      - "irc.gimp.org#beast"
    on_success: always
    on_failure: always
    skip_join: true
  email: false
    #recipients:
    #  - <EMAIL>
    #on_success: never
    #on_failure: change<commit_msg>.travis.yml: do not provide .bintray_api_key for pull requests<commit_after># This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0
#
# http://docs.travis-ci.com/user/customizing-the-build/
# http://lint.travis-ci.org/

os:       linux
dist:     xenial
language: generic
services: docker

cache:
  directories:
    - ~/cache/
    # We use $PIPELINE to carry cache context along job pipelines (workflows)
    # https://docs.travis-ci.com/user/caching/

before_script: |
  test  "$TRAVIS_BRANCH^$TRAVIS_PULL_REQUEST" != "master^false" -o \
        -z "$BINTRAY_API_KEY" || echo "$BINTRAY_API_KEY" > .bintray_api_key

# Job pipelines
jobs:
  include:

    # == 'Gcc' Pipeline ==
    # Build a highly optimized Gcc and upload it.
    - stage: Stage1
      name: "GCC (gcc appimage + check + bintray)"
      env: PIPELINE=Gcc
      before_install: |
        travis_retry git fetch --unshallow --tags
      script: |
        misc/cibuild.sh gcc release all appimage check bintray

    # == 'Linting' Pipeline ==
    # Generate all possible source code linting reports,
    # sort slow jobs into separate stages to avoid timeouts.
    - stage: Stage1
      name: "Linting-1 (clang cppcheck + scan-build)"
      env: PIPELINE=linting
      before_install: |
        rm -v -rf ~/cache/$TRAVIS_BUILD_NUMBER/ ~/beast &&
        travis_retry git fetch --unshallow --tags &&
        cd .. && mv beast ~/ && cd ~/beast/
      script: |
        misc/cibuild.sh quick cppcheck scan-build
      before_cache: |
        mkdir -p ~/cache/$TRAVIS_BUILD_NUMBER/ &&
        cd ~ && mv ~/beast/ ~/cache/$TRAVIS_BUILD_NUMBER/ &&
        (cd ~/cache/ && pwd && ls -al )
    - stage: Stage2
      name: "Linting-2 (clang-tidy + listunused + listhacks + bintray)"
      env: PIPELINE=linting
      before_install: |
        mv ~/cache/$TRAVIS_BUILD_NUMBER/beast ~/ && cd ~/beast/
      script: |
        misc/cibuild.sh clang-tidy &&
        misc/cibuild.sh listunused listhacks bintray
      before_cache: |
        rm -rf ~/cache/

    # == Stage2 Fedora ==
    # Fedora build tests, runs *after* the 'appimage' succeeded
    - stage: Stage1
      name: "Fedora-27 (build + check)"
      env: PIPELINE=Fedora-27
      before_install: |
        travis_retry git fetch --unshallow --tags
      script: |
        docker build --build-arg DIST=fedora:27 -f misc/Dockerfile-yum -t beast-fedora-27 .

    # == 'Asan' Pipeline ==
    # Run checks with asan turned on.
    - stage: Stage2
      name: "Asan check"
      env: PIPELINE=asan
      before_install: |
        travis_retry git fetch --unshallow --tags
      script: |
        misc/ciwitness.sh out/asan/build.log asan all check bintray

    # == 'Ubsan' Pipeline ==
    # Run checks with ubsan turned on.
    - stage: Stage2
      name: "Ubsan check"
      env: PIPELINE=ubsan
      before_install: |
        travis_retry git fetch --unshallow --tags
      script: |
        misc/ciwitness.sh out/ubsan/build.log ubsan all check bintray

  # == allow_failures ==
  allow_failures:
    - script: |
        misc/ciwitness.sh out/asan/build.log asan all check bintray
    - script: |
        misc/ciwitness.sh out/ubsan/build.log ubsan all check bintray

notifications:
  irc:
    channels:
      - "irc.gimp.org#beast"
    on_success: always
    on_failure: always
    skip_join: true
  email: false
    #recipients:
    #  - <EMAIL>
    #on_success: never
    #on_failure: change
{'fraction_non_alphanumeric': 0.11715959422774683, 'fraction_numerical': 0.006000857265323617, 'mean_word_length': 2.2771535580524342, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 2, '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': '4907347', 'n_tokens_mistral': 2517, 'n_tokens_neox': 2444, 'n_words': 598}