diff --git a/.github/workflows/centos-test.yml b/.github/workflows/centos-test.yml new file mode 100644 index 000000000..41b1f3a6e --- /dev/null +++ b/.github/workflows/centos-test.yml @@ -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 }} diff --git a/scripts/ci/Makefile b/scripts/ci/Makefile index 098ed1e14..b75314a0a 100644 --- a/scripts/ci/Makefile +++ b/scripts/ci/Makefile @@ -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 diff --git a/scripts/ci/run-ci-tests.sh b/scripts/ci/run-ci-tests.sh index 29a0524d2..e470bf62a 100755 --- a/scripts/ci/run-ci-tests.sh +++ b/scripts/ci/run-ci-tests.sh @@ -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 @@ -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