Skip to content

Commit

Permalink
ci: switch centos7 to github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Reber <[email protected]>
  • Loading branch information
adrianreber authored and avagin committed Nov 8, 2020
1 parent 369e17b commit 4074042
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/centos-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CentOS Test

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
target: [centos7]

steps:
- uses: actions/checkout@v2
- name: Run CentOS ${{ matrix.target }} Test
run: sudo -E make -C scripts/ci ${{ matrix.target }}
12 changes: 11 additions & 1 deletion scripts/ci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,20 @@ endef

export DOCKER_JSON

ifeq ($(GITHUB_ACTIONS),true)
# GitHub Actions does not give us a real TTY and errors out with
# 'the input device is not a TTY' if using '-t'
CONTAINER_TERMINAL := -i
else
CONTAINER_TERMINAL := -it
endif

export CONTAINER_TERMINAL

ifeq ($(UNAME),x86_64)
# On anything besides x86_64 Travis is running unprivileged LXD
# containers which do not support running docker with '--privileged'.
CONTAINER_OPTS := --rm -it --privileged -v /lib/modules:/lib/modules --tmpfs /run
CONTAINER_OPTS := --rm $(CONTAINER_TERMINAL) --privileged -v /lib/modules:/lib/modules --tmpfs /run
else
CONTAINER_OPTS := --rm -v /lib/modules:/lib/modules --tmpfs /run
endif
Expand Down
8 changes: 5 additions & 3 deletions scripts/ci/run-ci-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ if [ -z "$SKIP_EXT_DEV_TEST" ]; then
fi
#make -C test/others/exec/ run
make -C test/others/make/ run CC="$CC"
make -C test/others/shell-job/ run
if [ -n "$TRAVIS" ]; then
# GitHub Actions does not provide a real TTY and CRIU will fail with:
# Error (criu/tty.c:1014): tty: Don't have tty to inherit session from, aborting
make -C test/others/shell-job/ run
fi
make -C test/others/rpc/ run

./test/zdtm.py run -t zdtm/static/env00 --sibling
Expand Down Expand Up @@ -223,5 +227,3 @@ make -C test/others/libcriu run

# external namespace testing
make -C test/others/ns_ext run

make -C test/others/shell-job

0 comments on commit 4074042

Please sign in to comment.