<commit_before>machine:
  xcode:
    version: 7.3
  environment:
    XCODE_SCHEME: "no"
    XCODE_WORKSPACE: "no"
    JOBS: 8
    CCACHE_TEMPDIR: /tmp/.ccache-temp
    CCACHE_COMPRESS: 1
    LLVM_VERSION: 3.9.1

checkout:
  post:
    - git submodule update --init

dependencies:
  cache_directories:
    - "~/.ccache"
    - "~/.apt-cache"
  pre:
    # https://discuss.circleci.com/t/add-ability-to-cache-apt-get-programs/598/3
    - sudo rm -rf /var/cache/apt/archives && sudo ln -s ~/.apt-cache /var/cache/apt/archives && mkdir -p ~/.apt-cache/partial
    - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
  override:
    - sudo apt-get update -y
    - sudo apt-get install -y libstdc++-5-dev xutils-dev

database:
  pre:
    - ./bootstrap.sh
    - ./.mason/mason install clang++ ${LLVM_VERSION}
    - ./.mason/mason link clang++ ${LLVM_VERSION}
    - ./configure CC="$(pwd)/mason_packages/.link/bin/clang" CXX="$(pwd)/mason_packages/.link/bin/ccache $(pwd)/mason_packages/.link/bin/clang++ -Qunused-arguments"
    - make
  override:
    - psql -c 'create database template_postgis;'
    - psql -c 'create extension postgis;' -d template_postgis

test:
  override:
    - make test<commit_msg>also dump glibcxx symbols on circle<commit_after>machine:
  xcode:
    version: 7.3
  environment:
    XCODE_SCHEME: "no"
    XCODE_WORKSPACE: "no"
    JOBS: 8
    CCACHE_TEMPDIR: /tmp/.ccache-temp
    CCACHE_COMPRESS: 1
    LLVM_VERSION: 3.9.1

checkout:
  post:
    - git submodule update --init

dependencies:
  cache_directories:
    - "~/.ccache"
    - "~/.apt-cache"
  pre:
    # https://discuss.circleci.com/t/add-ability-to-cache-apt-get-programs/598/3
    - sudo rm -rf /var/cache/apt/archives && sudo ln -s ~/.apt-cache /var/cache/apt/archives && mkdir -p ~/.apt-cache/partial
    - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
  override:
    - sudo apt-get update -y
    - sudo apt-get install -y libstdc++-5-dev xutils-dev

database:
  pre:
    - ./bootstrap.sh
    - ./.mason/mason install clang++ ${LLVM_VERSION}
    - ./.mason/mason link clang++ ${LLVM_VERSION}
    - ./configure CC="$(pwd)/mason_packages/.link/bin/clang" CXX="$(pwd)/mason_packages/.link/bin/ccache $(pwd)/mason_packages/.link/bin/clang++ -Qunused-arguments"
    - make
    - nm src/libmapnik* | grep "GLIBCXX_3.4.2[0-9]" || true
  override:
    - psql -c 'create database template_postgis;'
    - psql -c 'create extension postgis;' -d template_postgis

test:
  override:
    - make test
{'fraction_non_alphanumeric': 0.15431103948428687, 'fraction_numerical': 0.011684125705076551, 'mean_word_length': 2.6568483063328423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7334525', 'n_tokens_mistral': 992, 'n_tokens_neox': 956, 'n_words': 189}