Skip to content

ci: replace travis with GHA for Fedora 33 and CentOS 7#2721

Merged
kolyshkin merged 5 commits intoopencontainers:masterfrom
kolyshkin:gha-vm
Jan 6, 2021
Merged

ci: replace travis with GHA for Fedora 33 and CentOS 7#2721
kolyshkin merged 5 commits intoopencontainers:masterfrom
kolyshkin:gha-vm

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin commented Jan 5, 2021

This PR moves away from travis-ci.org entirely, replacing it with github actions based jobs.

This, together with some older PRs (#2618, #2687, #2690 etc.) completes the task of revamping the CI.

Brief description (see commit messages for more info):

1. tests/events.bats: unify duplicated code

This also fixes the "events --interval 100ms" test which was previously stalling on GHA.

2. ci: move commit length check from travis to gha

Retiring vbatts/git-validation.

3. ci: move cross compile check from travis to gha

This is now the only ci job that uses Docker (as Ubuntu
does not support all the arches we want).

4. ci: move misc validate tasks from travis to gha

These "misc" ones are actually make validate and make release
that somehow do not belong elsewhere.

5. ci: move Fedora 33 and CentOS 7 tests to gha

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

Inspired by containerd/containerd#4279

@kolyshkin kolyshkin force-pushed the gha-vm branch 4 times, most recently from 95c9736 to 50b1e42 Compare January 5, 2021 23:52
@kolyshkin kolyshkin changed the title ci/gha: run fedora 33 in VM [WIP] ci/gha: replace travis with GHA for Fedora 33 and CentOS 7 Jan 5, 2021
@kolyshkin kolyshkin force-pushed the gha-vm branch 4 times, most recently from 5f96fde to 6d1b06e Compare January 6, 2021 02:58
@kolyshkin kolyshkin force-pushed the gha-vm branch 3 times, most recently from 1d83f6d to ff939ef Compare January 6, 2021 04:11
There are three tests that only differ in delays (and a few other
minor details line whitespace formatting and number of retries).

Let's unify those so maintaining this code will be easier.

This also implicitly increases the number of retries from 3 to 10
for the non-default --interval tests.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
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 1735ad7),
because
 - it required root (because mount);
 - it is probably no longer needed.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin force-pushed the gha-vm branch 3 times, most recently from 112850e to eb310da Compare January 6, 2021 05:00
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>
...and remove .travis.yml as GHA now covers everything it used to
(unless I overlooked something).

Inspired by containerd/containerd#4279

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Copy Markdown
Contributor Author

Almost ready. TODO: check that commit length check works, otherwise looks ready for the prime time.

@AkihiroSuda AkihiroSuda added this to the 1.0.0-rc93 milestone Jan 6, 2021
@kolyshkin
Copy link
Copy Markdown
Contributor Author

validate / commit fails if the subject is long.

re-checking when such commit is not the last one in the series.

@kolyshkin kolyshkin changed the title [WIP] ci/gha: replace travis with GHA for Fedora 33 and CentOS 7 ci: replace travis with GHA for Fedora 33 and CentOS 7 Jan 6, 2021
@kolyshkin
Copy link
Copy Markdown
Contributor Author

re-checking when such commit is not the last one in the series.

works either way (i.e. all commits are being checked).

This one is ready. @AkihiroSuda @mrunalp PTAL

# 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'"
Copy link
Copy Markdown
Member

@AkihiroSuda AkihiroSuda Jan 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe script and ssty stuff should be moved to Makefile, but it can be worked out later

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this looks kinda ugly. I thought about a shell script or a program that checks if tty is available, and re-executes itself through script (and does other needed things) if not, and then execute whatever is passed on in arguments.

GHA is the only environment without a tty, so it does not make sense to have this in Makefile (at least unconditionally).

Let's do it later.

# the second sub process waits for an event that includes test_busybox then
# kills the test_busybox container which causes the event logger to exit
(__runc events test_busybox >events.log) &
# Spawn two subshels:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: subshells

@kolyshkin kolyshkin merged commit 04b7b7d into opencontainers:master Jan 6, 2021
@thaJeztah
Copy link
Copy Markdown
Member

Nice, good to see it worked; thanks!

@kolyshkin
Copy link
Copy Markdown
Contributor Author

Nice, good to see it worked; thanks!

Thank you so much for your help @thaJeztah!

AkihiroSuda added a commit to AkihiroSuda/runc that referenced this pull request Jan 8, 2021
The script is no longer needed as we migrated from Travis to GHA in opencontainers#2721

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
dqminh pushed a commit to dqminh/runc that referenced this pull request Feb 3, 2021
The script is no longer needed as we migrated from Travis to GHA in opencontainers#2721

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants