<commit_before>dist: trusty
sudo: required
# setup travis so that we can run containers for integration tests
services:
  - docker

language: go

go:
  - "1.10"

go_import_path: github.com/containerd/containerd

addons:
  apt:
    packages:
      - btrfs-tools
      - libnl-3-dev
      - libnet-dev
      - protobuf-c-compiler
      # - protobuf-compiler
      - python-minimal
      - libcap-dev
      - libaio-dev
      - libprotobuf-c0-dev
      - libprotobuf-dev
      - socat

env:
  - TRAVIS_GOOS=linux TRAVIS_CGO_ENABLED=1
  - TRAVIS_GOOS=darwin TRAVIS_CGO_ENABLED=0

before_install:
  - uname -r
  - sudo apt-get -q update
  - sudo apt-get install -y libseccomp-dev/trusty-backports
  # Use jpetazzo/nsenter to install nsenter on ubuntu trusty.
  - docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter

install:
  - sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-protobuf
  - sudo chmod +x /usr/local/bin/protoc
  - sudo chmod og+rx /usr/local/include/google /usr/local/include/google/protobuf /usr/local/include/google/protobuf/compiler
  - sudo chmod -R og+r /usr/local/include/google/protobuf/
  - protoc --version
  - go get -u github.com/vbatts/git-validation
  - go get -u github.com/kunalkushwaha/ltag
  - sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-runc
  - sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-cni
  - sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-critools
  - wget https://github.com/xemul/criu/archive/v3.0.tar.gz -O /tmp/criu.tar.gz
  - tar -C /tmp/ -zxf /tmp/criu.tar.gz
  - cd /tmp/criu-3.0 && sudo make install-criu
  - cd $TRAVIS_BUILD_DIR

script:
  - export GOOS=$TRAVIS_GOOS
  - export CGO_ENABLED=$TRAVIS_CGO_ENABLED
  - DCO_VERBOSITY=-q script/validate/dco
  - script/validate/fileheader
  - GOOS=linux script/setup/install-dev-tools
  - script/validate/vendor
  - go build -i .
  - make check
  - if [[ "$GOOS" = "linux" && "$TRAVIS_GO_VERSION" != "1.9"* ]]; then make check-protos check-api-descriptors; fi
  - make build
  - make binaries
  - if [ "$GOOS" = "linux" ]; then sudo make install ; fi
  - if [ "$GOOS" = "linux" ]; then make coverage ; fi
  - if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make root-coverage ; fi
  - if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make integration ; fi
  # Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759
  - if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH TESTFLAGS_PARALLEL=1 make integration ; fi
  - if [ "$GOOS" = "linux" ]; then
      sudo PATH=$PATH containerd -log-level debug &> /tmp/containerd-cri.log &
      sudo ctr version ;
      sudo PATH=$PATH GOPATH=$GOPATH critest --runtime-endpoint=/var/run/containerd/containerd.sock --parallel=8 ;
      exit_code=$? ;
      test $exit_code -ne 0 && cat /tmp/containerd-cri.log ;
      sudo pkill containerd ;
      exit $exit_code ;
    fi

after_success:
  - bash <(curl -s https://codecov.io/bash) -F linux

before_deploy:
  - make release

deploy:
  provider: releases
  api_key:
    secure: <KEY>
  file_glob: true
  file: releases/*.tar.gz
  skip_cleanup: true
  on:
    repo: containerd/containerd
    tags: true<commit_msg>Test whether use of `exit` is hiding errors<commit_after>dist: trusty
sudo: required
# setup travis so that we can run containers for integration tests
services:
  - docker

language: go

go:
  - "1.10"

go_import_path: github.com/containerd/containerd

addons:
  apt:
    packages:
      - btrfs-tools
      - libnl-3-dev
      - libnet-dev
      - protobuf-c-compiler
      # - protobuf-compiler
      - python-minimal
      - libcap-dev
      - libaio-dev
      - libprotobuf-c0-dev
      - libprotobuf-dev
      - socat

env:
  - TRAVIS_GOOS=linux TRAVIS_CGO_ENABLED=1
  - TRAVIS_GOOS=darwin TRAVIS_CGO_ENABLED=0

before_install:
  - uname -r
  - sudo apt-get -q update
  - sudo apt-get install -y libseccomp-dev/trusty-backports
  # Use jpetazzo/nsenter to install nsenter on ubuntu trusty.
  - docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter

install:
  - sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-protobuf
  - sudo chmod +x /usr/local/bin/protoc
  - sudo chmod og+rx /usr/local/include/google /usr/local/include/google/protobuf /usr/local/include/google/protobuf/compiler
  - sudo chmod -R og+r /usr/local/include/google/protobuf/
  - protoc --version
  - go get -u github.com/vbatts/git-validation
  - go get -u github.com/kunalkushwaha/ltag
  - sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-runc
  - sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-cni
  - sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-critools
  - wget https://github.com/xemul/criu/archive/v3.0.tar.gz -O /tmp/criu.tar.gz
  - tar -C /tmp/ -zxf /tmp/criu.tar.gz
  - cd /tmp/criu-3.0 && sudo make install-criu
  - cd $TRAVIS_BUILD_DIR

script:
  - export GOOS=$TRAVIS_GOOS
  - export CGO_ENABLED=$TRAVIS_CGO_ENABLED
  - DCO_VERBOSITY=-q script/validate/dco
  - script/validate/fileheader
  - GOOS=linux script/setup/install-dev-tools
  - script/validate/vendor
  - go build -i .
  - make check
  - if [[ "$GOOS" = "linux" && "$TRAVIS_GO_VERSION" != "1.9"* ]]; then make check-protos check-api-descriptors; fi
  - make build
  - make binaries
  - if [ "$GOOS" = "linux" ]; then sudo make install ; fi
  - if [ "$GOOS" = "linux" ]; then make coverage ; fi
  - if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make root-coverage ; fi
  - if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make integration ; fi
  # Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759
  - if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH TESTFLAGS_PARALLEL=1 make integration ; fi
  - if [ "$GOOS" = "linux" ]; then
      sudo PATH=$PATH containerd -log-level debug &> /tmp/containerd-cri.log &
      sudo ctr version ;
      sudo PATH=$PATH GOPATH=$GOPATH critest --runtime-endpoint=/var/run/containerd/containerd.sock --parallel=8 ;
      test $? -ne 0 && cat /tmp/containerd-cri.log ;
      sudo pkill containerd ;
    fi

after_success:
  - bash <(curl -s https://codecov.io/bash) -F linux

before_deploy:
  - make release

deploy:
  provider: releases
  api_key:
    secure: <KEY>
  file_glob: true
  file: releases/*.tar.gz
  skip_cleanup: true
  on:
    repo: containerd/containerd
    tags: true
{'fraction_non_alphanumeric': 0.12858261550509006, 'fraction_numerical': 0.006264682850430697, 'mean_word_length': 2.8962782184258695, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '5026195', 'n_tokens_mistral': 2420, 'n_tokens_neox': 2327, 'n_words': 546}