<commit_before>sudo: true  # Only to move mysql onto ramdisk.

language: go

addons:
  apt:
    packages:
      - softhsm

cache:
  directories:
    - "$HOME/google-cloud-sdk/"

os:
  - linux

go:
  - 1.9.x

env:
  - GCE_CI=${ENABLE_GCE_CI}
  - TRILLIAN_SQL_DRIVER=mysql WITH_COVERAGE=true
  - GOFLAGS='-race' TRILLIAN_SQL_DRIVER=mysql
  - GOFLAGS='-race --tags batched_queue' TRILLIAN_SQL_DRIVER=mysql
  - GOFLAGS='-race' TRILLIAN_SQL_DRIVER=mysql WITH_ETCD=true
  - GOFLAGS='-race --tags pkcs11' TRILLIAN_SQL_DRIVER=mysql WITH_PKCS11=true

matrix:
  fast_finish: true

services:
  - mysql
  - docker

install:
  - |
    if [ ! -d "$HOME/gopath/src/github.com/google" ]; then
      mkdir -p "$HOME/gopath/src/github.com/google"
      ln -s "$TRAVIS_BUILD_DIR" "$HOME/gopath/src/github.com/google/trillian"
    fi
  - mkdir ../protoc
  - |
    (
      cd ../protoc
      wget "https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-${TRAVIS_OS_NAME}-x86_64.zip"
      unzip "protoc-3.2.0-${TRAVIS_OS_NAME}-x86_64.zip"
    )
  - export PATH="$(pwd)/../protoc/bin:$PATH"
  # googleapis is not Go code, but it's required for .pb.go regeneration because of API dependencies.
  - git clone --depth=1 https://github.com/googleapis/googleapis.git "$GOPATH/src/github.com/googleapis/googleapis"
  - go get ${GOFLAGS} -d -t ./...
  - go get github.com/golang/protobuf/proto
  - go get github.com/golang/protobuf/protoc-gen-go
  - go get golang.org/x/tools/cmd/stringer
  - go get github.com/google/certificate-transparency-go
  - go get -d -t github.com/google/certificate-transparency-go/...
  - go install github.com/golang/{mock/mockgen,protobuf/protoc-gen-go}<commit_msg>travis: use go_import_path (#1062)<commit_after>sudo: true  # Only to move mysql onto ramdisk.

language: go

addons:
  apt:
    packages:
      - softhsm

cache:
  directories:
    - "$HOME/google-cloud-sdk/"

os:
  - linux

go:
  - 1.9.x

go_import_path: github.com/google/trillian

env:
  - GCE_CI=${ENABLE_GCE_CI}
  - TRILLIAN_SQL_DRIVER=mysql WITH_COVERAGE=true
  - GOFLAGS='-race' TRILLIAN_SQL_DRIVER=mysql
  - GOFLAGS='-race --tags batched_queue' TRILLIAN_SQL_DRIVER=mysql
  - GOFLAGS='-race' TRILLIAN_SQL_DRIVER=mysql WITH_ETCD=true
  - GOFLAGS='-race --tags pkcs11' TRILLIAN_SQL_DRIVER=mysql WITH_PKCS11=true

matrix:
  fast_finish: true

services:
  - mysql
  - docker

install:
  - mkdir ../protoc
  - |
    (
      cd ../protoc
      wget "https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-${TRAVIS_OS_NAME}-x86_64.zip"
      unzip "protoc-3.2.0-${TRAVIS_OS_NAME}-x86_64.zip"
    )
  - export PATH="$(pwd)/../protoc/bin:$PATH"
  # googleapis is not Go code, but it's required for .pb.go regeneration because of API dependencies.
  - git clone --depth=1 https://github.com/googleapis/googleapis.git "$GOPATH/src/github.com/googleapis/googleapis"
  - go get ${GOFLAGS} -d -t ./...
  - go get github.com/golang/protobuf/proto
  - go get github.com/golang/protobuf/protoc-gen-go
  - go get golang.org/x/tools/cmd/stringer
  - go get github.com/google/certificate-transparency-go
  - go get -d -t github.com/google/certificate-transparency-go/...
  - go install github.com/golang/{mock/mockgen,protobuf/protoc-gen-go}
{'fraction_non_alphanumeric': 0.14639430516867843, 'fraction_numerical': 0.016094088517486844, 'mean_word_length': 3.0756620428751575, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1004202', 'n_tokens_mistral': 1341, 'n_tokens_neox': 1245, 'n_words': 218}