Commit Graph

17 Commits

Author SHA1 Message Date
Akihiro Suda 066ac1823e Merge pull request #2743 from kolyshkin/speedup-runcimage
gha: cache docker layers to speed up make runcimage
2021-01-22 13:15:40 +09:00
Mrunal Patel 1a90116894 Merge pull request #2745 from kolyshkin/test-tt
GHA: use ssh -tt instead of script tool (and fix CI failure reporting)
2021-01-19 21:00:49 -08:00
Kir Kolyshkin 8ce51611ce GHA: tune timeouts for VM jobs
The fedora job usually completes within 15-16 minutes,
and the centos-7 one needs 7-8 minutes.

Set the timeouts to twice those values.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-16 00:41:27 -08:00
Kir Kolyshkin a91210f499 gha: use ssh -tt to have a tty
Github Actions execution environments lack tty, which is needed for
integration tests. We have used script utility before to provide a fake
tty, but it appears to be buggy on CentOS 7.

Since we use ssh anyway to access Vagant VM, add -tt to forcefully
allocate a tty.

Apparently, neither "TERM=xterm" nor "stty size" is needed for
any tests to work, so remove those, too.

Finally, unit tests do not need a terminal, so remove the "script"
from those.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-16 00:40:44 -08:00
Kir Kolyshkin 1f4a3b1e9f gha: don't check commits on push
This check (for commit subject being short) only make sense for pull
requests, and it fails on pushes to master (i.e. on merges).

Make sure it's only run for pull requests.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-15 14:31:10 -08:00
Kir Kolyshkin 4a30ada494 gha: cache docker layers to speed up make runcimage
It currently takes close to 2 minutes to build docker image
(which is currently only used for cross compilation).

Let's see if caching docker layers will help.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-15 12:39:31 -08:00
Kir Kolyshkin 2dc1bf91a4 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>
2021-01-05 21:03:12 -08:00
Kir Kolyshkin e431fe60f8 ci: move misc validate tasks from travis to gha
Note that `make ci` in Travis included `make test`, but we're already
doing that elsewhere (see .github/workflows/test.yml).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-05 21:01:32 -08:00
Kir Kolyshkin 7ecba232e9 ci: move cross compile check from travis to gha
In here we have to use Docker, as Ubuntu does not support
all the architectures we're compile-testing here.

Since this is the only step that is using Docker,
there is no sense to separate `make runcimage` from
the rest of it. In case we'll have to use Docker image
more, it will make sense to do so.

While at it, ditch script/tmpmount (added by commit 1735ad788f),
because
 - it required root (because mount);
 - it is probably no longer needed.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-05 20:45:28 -08:00
Kir Kolyshkin 8ccd39a91b ci: move commit length check from travis to gha
Using https://github.com/tim-actions/commit-message-checker-with-regex

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-05 20:44:55 -08:00
Kir Kolyshkin 5d1b0268dd .github/workflows/validate: nits
1. Use ubuntu-20.04 instead of ubuntu-latest to fix warnings like

> Ubuntu-latest workflows will use Ubuntu-20.04 soon. For more details,
> see https://github.com/actions/virtual-environments/issues/1816

2. Minor formatting fixes, remove redundant name: etc.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-12-01 17:24:18 -08:00
Kir Kolyshkin c1ef0cf62c ci: add integration+unit tests to github actions
This is Ubuntu 20.04 so cgroup v1 testing only :(
The upside is, it's pretty fast (currently all the tests finish
within 5 minutes).

rootless tests take longer time so we run them in parallel
with non-rootless ones. Also, to balance the time, we run
unit tests when rootless is not set. IOW, 'rootless' in job
name means it's only rootless integration tests, and no rootless
means it's unit tests, integration tests with fs driver, and
integration tests with systemd driver.

Note, `script` is used to run integration tests to provide a tty
(which by default is not available on gh actions).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-11-27 21:35:02 -08:00
Kir Kolyshkin c6ed18542d ci: add shellcheck to github actions
Note that

1. No golang caching is required, since we do not build any go code,
   and it does not look like it make sense to cache a single binary
   we donwload from github.

2. Use a problem matcher, so the PRs will be annotated with
   shellcheck warnings.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-11-20 10:35:56 -08:00
Kir Kolyshkin 33bda24ac3 ci: move verify-deps from travis to github actions
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-11-20 10:35:56 -08:00
Kir Kolyshkin c60f23b335 ci: add shfmt to github actions
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-11-20 10:35:56 -08:00
Kir Kolyshkin 717a73b397 ci: renamed golangci-lint to validate
...so we can add more validation-type jobs.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-11-20 10:35:56 -08:00
Kir Kolyshkin 2a644a7d76 CI: add golangci-lint via github actions
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-09-30 11:17:52 -07:00