-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
144 lines (133 loc) · 4.53 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
dist: bionic
language: go
go:
- "1.13.x"
cache:
directories:
- $HOME/.ccache
env:
global:
- PACKAGE_NAME=docker-runu
- RELEASE_VERSION=0.2
- BINTRAY_REPO_NAME=debian
- BINTRAY_ORG=ukontainer
- BINTRAY_LICENSE=Apache-2.0
- GO111MODULE=on
jobs:
include:
- os: linux
cache:
directories:
- $HOME/.cache/go-build
env:
- DEB_ARCH=amd64
before_install:
- sudo apt-get install jq bridge-utils
- os: linux
cache:
directories:
- $HOME/.cache/go-build
arch: arm64
env:
- DEB_ARCH=armhf
before_install:
- sudo dpkg --add-architecture armhf
- sudo apt-get update && sudo apt-get install jq libc6:armhf crossbuild-essential-armhf
- export CC=arm-linux-gnueabihf-gcc
- export CGO_ENABLED=1
- export GOARCH=arm
- export RUNU_PATH="linux_arm/"
- export PATH=$GOPATH/bin/linux_arm:$PATH
- export DOCKER_RUN_ARGS_ARCH="--platform=linux/arm"
- os: linux
cache:
directories:
- $HOME/.cache/go-build
arch: arm64
env:
- DEB_ARCH=arm64
before_install:
- sudo apt-get update && sudo apt-get install jq
- export CGO_ENABLED=1
- export GOARCH=arm64
- os: osx
osx_image: xcode12.5
cache:
directories:
- $HOME/Library/Caches/go-build
before_install:
- HOMEBREW_NO_AUTO_UPDATE=1 brew install jq
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ukontainer/lkl/dockerd-darwin
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ukontainer/lkl/nerdctl
- mkdir -p ~/.local/bin
- export PATH=/usr/local/opt/ccache/libexec:$HOME/.local/bin:$PATH
- ln -sf /usr/local/bin/gsha256sum ~/.local/bin/sha256sum
#- os: osx
# osx_image: xcode10.1
# cache:
# directories:
# - $HOME/Library/Caches/go-build
# before_install:
# - HOMEBREW_NO_AUTO_UPDATE=1 brew install jq
# - HOMEBREW_NO_AUTO_UPDATE=1 brew cask info tuntap
# - HOMEBREW_NO_AUTO_UPDATE=1 brew install ukontainer/lkl/dockerd-darwin
# - mkdir -p ~/.local/bin
# - export PATH=/usr/local/opt/ccache/libexec:$HOME/.local/bin:$PATH
# - ln -sf /usr/local/bin/gsha256sum ~/.local/bin/sha256sum
#- os: osx
# osx_image: xcode10.2
# cache:
# directories:
# - $HOME/Library/Caches/go-build
# before_install:
# - HOMEBREW_NO_AUTO_UPDATE=1 brew install jq
# - HOMEBREW_NO_AUTO_UPDATE=1 brew cask info tuntap
# - HOMEBREW_NO_AUTO_UPDATE=1 brew install ukontainer/lkl/dockerd-darwin
# - mkdir -p ~/.local/bin
# - export PATH=/usr/local/opt/ccache/libexec:$HOME/.local/bin:$PATH
# - ln -sf /usr/local/bin/gsha256sum ~/.local/bin/sha256sum
before_script:
- export -f travis_nanoseconds
- export -f travis_fold
- export -f travis_time_start
- export -f travis_time_finish
- export GO111MODULE=auto
- go get -u github.com/gojp/goreportcard/cmd/goreportcard-cli
- GO111MODULE=off go get -u github.com/alecthomas/gometalinter
- go get -u github.com/gordonklaus/ineffassign
- go get -u github.com/fzipp/gocyclo/cmd/gocyclo
- go get -u github.com/client9/misspell/cmd/misspell
- go get -u golang.org/x/lint/golint
# Export variables containing versions and filename
- export BUILD_VERSION=$RELEASE_VERSION.$TRAVIS_BUILD_NUMBER
- export BUILD_DATE=$(date "+%Y%m%d")
- export PACKAGE_NAME_VERSION=$PACKAGE_NAME-$BUILD_VERSION-$DEB_ARCH.deb
# TODO: for dockerd which use runtime name 'io.containerd.runtime.v1.linux'
- if [ $TRAVIS_OS_NAME = "osx" ] ; then cp $GOPATH/bin/containerd-shim-runu-v1 ~/.local/bin/containerd-shim-v1-linux ; fi
script:
- if [ $TRAVIS_ARCH = "amd64" ] && [ $TRAVIS_OS_NAME = "linux" ] ; then GO111MODULE=on goreportcard-cli -t 100.0 -v ; fi
- bash -e test/standalone-test.sh
- bash -e test/docker-oci-test.sh
- bash -e test/containerd-ctr-test.sh
- bash -e test/docker-more-test.sh
- bash -e test/docker-volume-test.sh
- bash -e test/k8s-test.sh
after_failure:
- cat /tmp/dockerd.log
- cat /tmp/containerd.log
- cat /tmp/docker-manifest.log
## package deploy to github release (TODO: look for bintray alt.)
before_deploy:
- bash -ex pkg/pre-deploy-deb.sh
- bash -ex pkg/pre-deploy-test-deb.sh
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file: $PACKAGE_NAME_VERSION
skip_cleanup: true
on:
condition: $TRAVIS_OS_NAME = linux
branch: master
after_deploy:
- bash -ex pkg/post-deploy-deb.sh
- bash -ex pkg/post-deploy-kind-img.sh