<commit_before>language: node_js

sudo: false

# build options and AWS keys for publishing binaries
# note: you'll need to generate your own keys for publishing a separate project
env:
  global:
   - secure: "<KEY>LTThKQV6AOei3e4="

install:
  # set up the environment by installing mason and clang++
  - ./scripts/setup.sh --config local.env
  # put mason and clang++ on PATH
  - source local.env
  - node -v
  - which node
  - clang++ -v
  - which clang++
  - make distclean
  - make ${BUILDTYPE}
  # Build should be standalone now, so remove mason deps
  - rm -rf mason_packages

# run tests
# we use before_script rather than script to ensure fast failure (the script section continues even after an error)
# https://docs.travis-ci.com/user/customizing-the-build#Breaking-the-Build
before_script:
  - source scripts/postgis/setup_and_run.sh
  - npm test
  # after successful tests, publish binaries if specified in commit message
  - ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")

# override script default (npm test) to do nothing (we test in before_script)
script:
  - true

# the matrix allows you to specify different operating systems and environments to
# run your tests and build binaries
matrix:
  include:
    # linux publishable node v10
    - os: linux
      env: BUILDTYPE=release
      node_js: 10
    # linux publishable node v12
    - os: linux
      env: BUILDTYPE=release
      node_js: 12
    # linux publishable node v13
    - os: linux
      env: BUILDTYPE=release
      node_js: 13
    # linux publishable node v14
    - os: linux
      env: BUILDTYPE=release
      node_js: 14
    # osx publishable node v10
    - os: osx
      osx_image: xcode8.2
      env: BUILDTYPE=release
      node_js: 10
    # osx publishable node v12
    - os: osx
      osx_image: xcode8.2
      env: BUILDTYPE=release
      node_js: 12
    # Sanitizer build node v10/Debug
    - os: linux
      env: BUILDTYPE=debug TOOLSET=-asan
      node_js: 10
      # Overrides `install` to set up custom asan flags
      install:
        - ./scripts/setup.sh --config local.env
        # put mason and clang++ on PATH
        - source local.env
        # Note: to build without stopping on errors remove the -fno-sanitize-recover=all flag
        # You might want to do this if there are multiple errors and you want to see them all before fixing
        - export CXXFLAGS="${MASON_SANITIZE_CXXFLAGS} -fno-sanitize-recover=all"
        - export LDFLAGS="${MASON_SANITIZE_LDFLAGS}"
        - make distclean
        - make ${BUILDTYPE}
      # Overrides `script` to disable asan LD_PRELOAD before publishing<commit_msg>N-API drop node v13 build<commit_after>language: node_js

sudo: false

# build options and AWS keys for publishing binaries
# note: you'll need to generate your own keys for publishing a separate project
env:
  global:
   - secure: "<KEY>

install:
  # set up the environment by installing mason and clang++
  - ./scripts/setup.sh --config local.env
  # put mason and clang++ on PATH
  - source local.env
  - node -v
  - which node
  - clang++ -v
  - which clang++
  - make distclean
  - make ${BUILDTYPE}
  # Build should be standalone now, so remove mason deps
  - rm -rf mason_packages

# run tests
# we use before_script rather than script to ensure fast failure (the script section continues even after an error)
# https://docs.travis-ci.com/user/customizing-the-build#Breaking-the-Build
before_script:
  - source scripts/postgis/setup_and_run.sh
  - npm test
  # after successful tests, publish binaries if specified in commit message
  - ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")

# override script default (npm test) to do nothing (we test in before_script)
script:
  - true

# the matrix allows you to specify different operating systems and environments to
# run your tests and build binaries
matrix:
  include:
    # linux publishable node v10
    - os: linux
      env: BUILDTYPE=release
      node_js: 10
    # linux publishable node v12
    - os: linux
      env: BUILDTYPE=release
      node_js: 12
    # linux publishable node v14
    - os: linux
      env: BUILDTYPE=release
      node_js: 14
    # osx publishable node v10
    - os: osx
      osx_image: xcode8.2
      env: BUILDTYPE=release
      node_js: 10
    # osx publishable node v12
    - os: osx
      osx_image: xcode8.2
      env: BUILDTYPE=release
      node_js: 12
    # Sanitizer build node v10/Debug
    - os: linux
      env: BUILDTYPE=debug TOOLSET=-asan
      node_js: 10
      # Overrides `install` to set up custom asan flags
      install:
        - ./scripts/setup.sh --config local.env
        # put mason and clang++ on PATH
        - source local.env
        # Note: to build without stopping on errors remove the -fno-sanitize-recover=all flag
        # You might want to do this if there are multiple errors and you want to see them all before fixing
        - export CXXFLAGS="${MASON_SANITIZE_CXXFLAGS} -fno-sanitize-recover=all"
        - export LDFLAGS="${MASON_SANITIZE_LDFLAGS}"
        - make distclean
        - make ${BUILDTYPE}
      # Overrides `script` to disable asan LD_PRELOAD before publishing
{'fraction_non_alphanumeric': 0.08540992961765265, 'fraction_numerical': 0.01236446642571809, 'mean_word_length': 2.731724627395316, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1110840', 'n_tokens_mistral': 1698, 'n_tokens_neox': 1618, 'n_words': 585}