github.com/demonoid81/containerd@v1.3.4/.travis.yml (about)

     1  dist: bionic
     2  sudo: required
     3  # setup travis so that we can run containers for integration tests
     4  services:
     5    - docker
     6  
     7  language: go
     8  
     9  os:
    10  - linux
    11  
    12  go:
    13    - "1.13.10"
    14  
    15  env:
    16    - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v1 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic GOPROXY=direct
    17    - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic TRAVIS_RELEASE=yes GOPROXY=direct
    18    - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic GOPROXY=direct
    19    - TRAVIS_GOOS=darwin TRAVIS_CGO_ENABLED=0 GOPROXY=direct
    20  
    21  matrix:
    22    include:
    23      # Skip testing previous LTS (Xenial / Ubuntu 16.04 LTS) on pull requests
    24      - if: type != pull_request
    25        os: linux
    26        dist: xenial
    27        env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=xenial GOPROXY=direct
    28  
    29  go_import_path: github.com/containerd/containerd
    30  
    31  addons:
    32    apt:
    33      packages:
    34        - btrfs-tools
    35        - libnl-3-dev
    36        - libnet-dev
    37        - protobuf-c-compiler
    38        # - protobuf-compiler
    39        - python-minimal
    40        - libcap-dev
    41        - libaio-dev
    42        - libprotobuf-c-dev
    43        - libprotobuf-dev
    44        - socat
    45  
    46  before_install:
    47    - uname -r
    48  
    49  install:
    50    - sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-protobuf
    51    - sudo chmod +x /usr/local/bin/protoc
    52    - sudo chmod og+rx /usr/local/include/google /usr/local/include/google/protobuf /usr/local/include/google/protobuf/compiler
    53    - sudo chmod -R og+r /usr/local/include/google/protobuf/
    54    - protoc --version
    55    - go get -u github.com/vbatts/git-validation
    56    - go get -u github.com/kunalkushwaha/ltag
    57    - go get -u github.com/LK4D4/vndr
    58    - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-seccomp ; fi
    59    - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-runc ; fi
    60    - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-cni ; fi
    61    - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-critools ; fi
    62    - if [ "$TRAVIS_GOOS" = "linux" ]; then wget https://github.com/checkpoint-restore/criu/archive/v3.13.tar.gz -O /tmp/criu.tar.gz ; fi
    63    - if [ "$TRAVIS_GOOS" = "linux" ]; then tar -C /tmp/ -zxf /tmp/criu.tar.gz ; fi
    64    - if [ "$TRAVIS_GOOS" = "linux" ]; then cd /tmp/criu-3.13 && sudo make install-criu ; fi
    65    - cd $TRAVIS_BUILD_DIR
    66  
    67  before_script:
    68    - pushd ..; git clone https://github.com/containerd/project; popd
    69  
    70  script:
    71    - export GOOS=$TRAVIS_GOOS
    72    - export CGO_ENABLED=$TRAVIS_CGO_ENABLED
    73    - DCO_VERBOSITY=-q ../project/script/validate/dco
    74    - ../project/script/validate/fileheader ../project/
    75    - travis_wait ../project/script/validate/vendor
    76    - GOOS=linux GO111MODULE=off script/setup/install-dev-tools
    77    - go build -i .
    78    - make check
    79    - if [ "$GOOS" = "linux" ]; then make check-protos check-api-descriptors; fi
    80    - if [ "$TRAVIS_GOOS" = "linux" ]; then make man ; fi
    81    - make build
    82    - make binaries
    83    - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo make install ; fi
    84    - if [ "$TRAVIS_GOOS" = "linux" ]; then make coverage ; fi
    85    - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make root-coverage ; fi
    86    - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make integration EXTRA_TESTFLAGS=-no-criu ; fi
    87    # Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759
    88    - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH TESTFLAGS_PARALLEL=1 make integration EXTRA_TESTFLAGS=-no-criu ; fi
    89    - |
    90      if [ "$TRAVIS_GOOS" = "linux" ]; then
    91        sudo mkdir -p /etc/containerd
    92        sudo bash -c "cat > /etc/containerd/config.toml <<EOF
    93        [plugins.cri.containerd.default_runtime]
    94          runtime_type = \"${TEST_RUNTIME}\"
    95      EOF"
    96        sudo PATH=$PATH containerd -log-level debug &> /tmp/containerd-cri.log &
    97        sudo ctr version
    98        sudo PATH=$PATH GOPATH=$GOPATH critest --runtime-endpoint=/var/run/containerd/containerd.sock --parallel=8
    99        TEST_RC=$?
   100        test $TEST_RC -ne 0 && cat /tmp/containerd-cri.log
   101        sudo pkill containerd
   102        sudo rm -rf /etc/containerd
   103        test $TEST_RC -eq 0 || /bin/false
   104      fi
   105  
   106  after_success:
   107    - bash <(curl -s https://codecov.io/bash) -F linux
   108  
   109  before_deploy:
   110    - if [ "$TRAVIS_RELEASE" = "yes" ]; then make release cri-release; fi
   111  
   112  deploy:
   113    - provider: releases
   114      api_key:
   115        secure: HO+WSIVVUMMsbU74x+YyFsTP3ahqnR4xjwKAziedJ5lZXKJszQBhiYTFmcTeVBoouNjTISd07GQzpoLChuGC20U3+1NbT+CkK8xWR/x1ao2D3JY3Ds6AD9ubWRNWRLptt/xOn5Vq3F8xZyUYchwvDMl4zKCuTKxQGVdHKsINb2DehKcP5cVL6MMvqzEdfj2g99vqXAqs8uuo6dOmvxmHV43bfzDaAJSabjZZs6TKlWTqCQMet8uxyx2Dmjl2lxLwdqv12oJdrszacasn41NYuEyHI2bXyef1mhWGYN4n9bU/Y5winctZ8DOSOZvYg/2ziAaUN0+CTn1IESwVesrPz23P2Sy7wdLxu8dSIZ2yUHl7OsA5T5a5rDchAGguRVNBWvoGtuepEhdRacxTQUo1cMFZsEXjgRKKjdfc1emYQPVdN8mBv8GJwndty473ZXdvFt5R0kNVFtvWuYCa6UYJD2cKrsPSAfbZCDC/LiR3FOoTaUPMZUVkR2ACEO7Dn4+KlmBajqT40Osk/A7k1XA/TzVhMIpLtE0Vk2DfPmGsjCv8bC+MFd+R2Sc8SFdE92oEWRdoPQY5SxMYQtGxA+cbKVlT1kSw6y80yEbx5JZsBnT6+NTHwmDO3kVU9ztLdawOozTElKNAK8HoAyFmzIZ3wL64oThuDrv/TUuY8Iyn814=
   116      file_glob: true
   117      file:
   118        - releases/*.tar.gz
   119        - releases/*.tar.gz.sha256sum
   120      skip_cleanup: true
   121      on:
   122        repo: containerd/containerd
   123        tags: true
   124        condition: $TRAVIS_GOOS = linux
   125    - provider: script
   126      script: bash script/release/deploy-cri
   127      skip_cleanup: true
   128      on:
   129        repo: containerd/containerd
   130        tags: true
   131        condition: $TRAVIS_GOOS = linux