ci: move Fedora 33 and CentOS 7 tests to gha

...and remove .travis.yml as GHA now covers everything it used to
(unless I overlooked something).

Inspired by https://github.com/containerd/containerd/pull/4279

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-01-05 13:42:43 -08:00
parent e431fe60f8
commit 2dc1bf91a4
2 changed files with 69 additions and 67 deletions
+69
View File
@@ -80,3 +80,72 @@ jobs:
# can't use systemd driver with cgroupv1
if: matrix.rootless != 'rootless'
run: sudo -E PATH="$PATH" script -e -c /bin/bash -c 'stty rows 40 cols 80; TERM=xterm make RUNC_USE_SYSTEMD=yes local${{ matrix.rootless }}integration'
# cgroup v2 unified hierarchy + very recent kernel (openat2)
fedora:
# nested virtualization is only available on macOS hosts
runs-on: macos-10.15
timeout-minutes: 60
# only run it if others have passed
needs: [test]
steps:
- uses: actions/checkout@v2
- name: prepare vagrant
run: |
ln -sf Vagrantfile.fedora33 Vagrantfile
vagrant up
vagrant ssh-config >> ~/.ssh/config
- name: system info
run: ssh default 'sh -exc "uname -a && systemctl --version && df -T"'
- name: unit tests
run: ssh default 'cd /vagrant && sudo make localunittest'
# The integration tests require tty which GH actions lack;
# wrap those in "script" to emulate tty.
- name: cgroupv2 with systemd
run: ssh default "script -e -c /bin/bash -c 'stty rows 40 cols 80; TERM=xterm sudo make -C /vagrant localintegration RUNC_USE_SYSTEMD=yes'"
- name: cgroupv2 with fs2
run: ssh default "script -e -c /bin/bash -c 'stty rows 40 cols 80; TERM=xterm sudo make -C /vagrant localintegration'"
- name: cgroupv2 with systemd (rootless)
run: ssh default "script -e -c /bin/bash -c 'stty rows 40 cols 80; TERM=xterm sudo make -C /vagrant localrootlessintegration RUNC_USE_SYSTEMD=yes'"
- name: cgroupv2 with fs2 (rootless)
run: ssh default "script -e -c /bin/bash -c 'stty rows 40 cols 80; TERM=xterm sudo make -C /vagrant localrootlessintegration'"
# kernel 3.10 (frankenized), systemd 219
centos7:
# nested virtualization is only available on macOS hosts
runs-on: macos-10.15
timeout-minutes: 60
# only run it if others have passed
needs: [test]
steps:
- uses: actions/checkout@v2
- name: prepare vagrant
run: |
ln -sf Vagrantfile.centos7 Vagrantfile
vagrant up
vagrant ssh-config >> ~/.ssh/config
- name: system info
run: ssh default 'rpm -q centos-release kernel systemd'
- name: unit tests
run: ssh default 'sudo -i make -C /vagrant localunittest'
- name: integration tests (fs cgroup driver)
run: ssh default "script -e -c /bin/bash -c 'stty rows 40 cols 80; TERM=xterm sudo -i make -C /vagrant localintegration'"
- name: integration tests (systemd cgroup driver)
run: ssh default "script -e -c /bin/bash -c 'stty rows 40 cols 80; TERM=xterm sudo -i make -C /vagrant localintegration RUNC_USE_SYSTEMD=1'"
- name: rootless integration
# FIXME: rootless is skipped because of EPERM on writing cgroup.procs
if: false
run: ssh default "script -e -c /bin/bash -c 'stty rows 40 cols 80; TERM=xterm sudo -i make -C /vagrant localrootlessintegration'"
-67
View File
@@ -1,67 +0,0 @@
dist: bionic
language: go
os: linux
go:
- 1.15.x
- 1.14.x
- tip
cache:
directories:
- /home/travis/.vagrant.d/boxes
jobs:
include:
- go: 1.15.x
name: "cgroup-systemd"
env:
- RUNC_USE_SYSTEMD=1
script:
- make all
- sudo PATH="$PATH" make localintegration RUNC_USE_SYSTEMD=1
- name: "fedora33"
before_install:
- sudo ./script/install-vagrant.sh
- ln -sf Vagrantfile.fedora33 Vagrantfile
- sudo vagrant up && sudo mkdir -p /root/.ssh && sudo sh -c "vagrant ssh-config >> /root/.ssh/config"
script:
- sudo ssh default 'sh -exc "uname -a && systemctl --version && df -T"'
- sudo ssh default -t 'cd /vagrant && sudo 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'
# same setup but with fs2 driver instead of systemd
- sudo ssh default -t 'cd /vagrant && sudo make localintegration'
# cgroupv2+systemd (rootless)
- sudo ssh default -t 'cd /vagrant && sudo make localrootlessintegration RUNC_USE_SYSTEMD=yes'
# same setup but with fs2 driver (rootless) instead of systemd
- sudo ssh default -t 'cd /vagrant && sudo make localrootlessintegration'
- name: "centos7"
before_install:
- sudo ./script/install-vagrant.sh
- ln -sf Vagrantfile.centos7 Vagrantfile
- sudo vagrant up && sudo mkdir -p /root/.ssh && sudo sh -c "vagrant ssh-config >> /root/.ssh/config"
script:
# kernel 3.10 (frankenized), systemd 219
- sudo ssh default 'rpm -q centos-release kernel systemd'
- sudo ssh default -t 'sudo -i make -C /vagrant localunittest'
- sudo ssh default -t 'sudo -i make -C /vagrant localintegration'
- sudo ssh default -t 'sudo -i make -C /vagrant localintegration RUNC_USE_SYSTEMD=1'
# FIXME: rootless is skipped because of EPERM on writing cgroup.procs
# - sudo ssh default -t 'sudo -i make -C /vagrant localrootlessintegration'
allow_failures:
- go: tip
go_import_path: github.com/opencontainers/runc
# `make ci` uses Docker.
services:
- docker
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libseccomp-dev
- GO111MODULE=off go get -u golang.org/x/lint/golint
- (cd ~ && GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt@v3.2.0)
- env | grep TRAVIS_
script:
- make