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