Skip to content

Commit 067a66b

Browse files
AkihiroSudadmcgowan
authored andcommitted
.travis.yml: run test with crun
Relates to containerd#3727 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
1 parent b9fad5e commit 067a66b

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ go:
1515
env:
1616
- TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v1 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic GOPROXY=direct
1717
- 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.runc.v2 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic GOPROXY=direct RUNC_FLAVOR=crun
1819
- TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic GOPROXY=direct
1920
- TRAVIS_GOOS=darwin TRAVIS_CGO_ENABLED=0 GOPROXY=direct
2021

script/setup/install-runc

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,33 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
1817
#
1918
# Builds and installs runc to /usr/local/go/bin based off
2019
# the commit defined in vendor.conf
2120
#
2221
set -eu -o pipefail
2322

24-
RUNC_COMMIT=$(grep opencontainers/runc "$GOPATH"/src/github.com/containerd/containerd/vendor.conf | awk '{print $2}')
25-
26-
go get -d github.com/opencontainers/runc
27-
cd "$GOPATH"/src/github.com/opencontainers/runc
28-
git checkout $RUNC_COMMIT
29-
make BUILDTAGS='apparmor seccomp' runc install
23+
function install_runc() {
24+
RUNC_COMMIT=$(grep opencontainers/runc "$GOPATH"/src/github.com/containerd/containerd/vendor.conf | awk '{print $2}')
25+
26+
go get -d github.com/opencontainers/runc
27+
cd "$GOPATH"/src/github.com/opencontainers/runc
28+
git checkout $RUNC_COMMIT
29+
make BUILDTAGS='apparmor seccomp' runc install
30+
}
31+
32+
function install_crun() {
33+
CRUN_VERSION=0.11
34+
curl -o /usr/local/sbin/runc -L https://github.com/containers/crun/releases/download/${CRUN_VERSION}/crun-${CRUN_VERSION}-static-$(uname -m)
35+
chmod +x /usr/local/sbin/runc
36+
}
37+
38+
: ${RUNC_FLAVOR=runc}
39+
case ${RUNC_FLAVOR} in
40+
runc) install_runc ;;
41+
crun) install_crun ;;
42+
*)
43+
echo >&2 "unknown runc flavor: ${RUNC_FLAVOR}"
44+
exit 1
45+
;;
46+
esac

0 commit comments

Comments
 (0)