mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
84583eb1a4
Those needs to be run on the (Vagrant Fedora 31) host
(since we need real systemd running), and so we have
to have all the tools needed to compile runc and run
the tests.
The good news is Fedora packages a decent and recent release
of bats-core (1.1.0), which we can use (Debian does not),
and we can also use golang (currently 1.13.9) from Fedora.
The bad news are
1. Currently cgroups tests are only working with
RUNC_USE_SYSTEMD=yes (addressed by #2299, #2305)
2. Tests in events.bats do not work (need cgroupv2
memory.events support)
3. Fedora 31 image is 6 months old (and has broken
container-selinux policy) so we need `dnf update`,
which adds ~5 min to test time.
[v2: add -t to ssh to enforce pty]
[v3: disable events tests for cgroupv2]
[v4: update fedora packages, use a single dnf transation]
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
dist: bionic
|
|
language: go
|
|
go:
|
|
- 1.14.x
|
|
- 1.13.x
|
|
- tip
|
|
cache:
|
|
directories:
|
|
- /home/travis/.vagrant.d/boxes
|
|
matrix:
|
|
include:
|
|
- go: 1.14.x
|
|
name: "verify-dependencies"
|
|
script:
|
|
- make verify-dependencies
|
|
- go: 1.13.x
|
|
name: "cgroup-systemd"
|
|
env:
|
|
- RUNC_USE_SYSTEMD=1
|
|
script:
|
|
- make BUILDTAGS="${BUILDTAGS}" all
|
|
- sudo PATH="$PATH" make localintegration RUNC_USE_SYSTEMD=1
|
|
- go: 1.13.x
|
|
name: "cgroup-v2"
|
|
env:
|
|
- VAGRANT_VERSION=2.2.7
|
|
before_install:
|
|
- cat /proc/cpuinfo
|
|
# https://github.com/alvistack/ansible-role-virtualbox/blob/6887b020b0ca5c59ddb6620d73f053ffb84f4126/.travis.yml#L30
|
|
- sudo apt-get install -q -y bridge-utils dnsmasq-base ebtables libvirt-bin libvirt-dev qemu-kvm qemu-utils ruby-dev && wget https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}_$(uname -m).deb && sudo dpkg -i vagrant_${VAGRANT_VERSION}_$(uname -m).deb && rm -f vagrant_${VAGRANT_VERSION}_$(uname -m).deb
|
|
- sudo vagrant plugin install vagrant-libvirt
|
|
- sudo vagrant up && sudo mkdir -p /root/.ssh && sudo sh -c "vagrant ssh-config >> /root/.ssh/config"
|
|
script:
|
|
- sudo ssh default sudo podman build -t test /vagrant
|
|
# Mounting /lib/modules into the container is necessary as CRIU wants to load (via iptables) additional modules
|
|
- sudo ssh default sudo podman run --privileged --cgroupns=private -v /lib/modules:/lib/modules:ro test make localunittest
|
|
# cgroupv2+systemd: test on vagrant host itself as we need systemd
|
|
- sudo ssh default -t 'cd /vagrant && sudo make localintegration RUNC_USE_SYSTEMD=yes'
|
|
allow_failures:
|
|
- go: tip
|
|
|
|
go_import_path: github.com/opencontainers/runc
|
|
|
|
# `make ci` uses Docker.
|
|
sudo: required
|
|
services:
|
|
- docker
|
|
|
|
env:
|
|
global:
|
|
- BUILDTAGS="seccomp apparmor selinux"
|
|
|
|
before_install:
|
|
- sudo apt-get -qq update
|
|
- sudo apt-get install -y libseccomp-dev
|
|
- GO111MODULE=off go get -u golang.org/x/lint/golint
|
|
- GO111MODULE=off go get -u github.com/vbatts/git-validation
|
|
- env | grep TRAVIS_
|
|
|
|
script:
|
|
- git-validation -run DCO,short-subject -v
|
|
- make BUILDTAGS="${BUILDTAGS}"
|
|
- make BUILDTAGS="${BUILDTAGS}" clean ci cross
|