From bfacf7fd9e7568221bd2d41084a895c0fb2e936c Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 26 Jan 2021 09:50:06 -0800 Subject: [PATCH] ci: add i386 unit test run Signed-off-by: Kir Kolyshkin --- .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 484c5b24e9c..e27bd19cbfa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -154,3 +154,34 @@ jobs: # FIXME: rootless is skipped because of EPERM on writing cgroup.procs if: false run: ssh default "sudo -i make -C /vagrant localrootlessintegration" + + # We need to continue support for 32-bit ARM. + # However, we do not have 32-bit ARM CI, so we use i386 for testing 32bit stuff. + # We are not interested in providing official support for i386. + cross-i386: + runs-on: ubuntu-20.04 + + steps: + + - name: checkout + uses: actions/checkout@v2 + + - name: install deps + run: | + # enable i386 arch + sudo dpkg --add-architecture i386 + # add skopeo repo + echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list + wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_10/Release.key -O- | sudo apt-key add - + # add criu repo + sudo add-apt-repository -y ppa:criu/ppa + # apt-add-repository runs apt update so we don't have to + sudo apt -q install libseccomp-dev libseccomp-dev:i386 criu skopeo + + - name: install go + uses: actions/setup-go@v2 # use default Go version + + - name: unit test + run: | + # cgo is disabled by default when cross-compiling + sudo -E PATH="$PATH" -- make GOARCH=386 CGO_ENABLED=1 localunittest