summaryrefslogtreecommitdiff
path: root/.ci/linux-prepare.sh
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2020-11-23 23:34:28 +0100
committerIlya Maximets <i.maximets@ovn.org>2020-11-26 18:57:46 +0100
commit6cb2f5a630e32a2c521de95eaf97e0faea6c764c (patch)
treefc3c32919eca48ce55fb2aaddf0ba706ebc1796a /.ci/linux-prepare.sh
parent629283a8eb1eea0b9d82f8549fe48f2b8209934f (diff)
downloadopenvswitch-6cb2f5a630e32a2c521de95eaf97e0faea6c764c.tar.gz
github: Add GitHub Actions workflow.
This is an initial version of GitHub Actions support. It mostly mimics our current Travis CI build matrix with slight differences. The main issue is that we don't have ARM support here. Minor difference that we can not install 32-bit versions of libunwind and libunbound since those are not avaialble in repository. Higher concurrency level allows to finish all tests less than in 20 minutes. Which is 3 times faster than in Travis. .travis folder renamed to .ci to highlight that it used not only for Travis CI. Travis CI support will be reduced to only test ARM builds soon and will be completely removed when travis-ci.org will be turned into read-only mode. What happened to Travis CI: https://mail.openvswitch.org/pipermail/ovs-dev/2020-November/377773.html Acked-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to '.ci/linux-prepare.sh')
-rwxr-xr-x.ci/linux-prepare.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/.ci/linux-prepare.sh b/.ci/linux-prepare.sh
new file mode 100755
index 000000000..fea905a83
--- /dev/null
+++ b/.ci/linux-prepare.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+set -ev
+
+if [ "$DEB_PACKAGE" ]; then
+ # We're not using sparse for debian packages, tests are skipped and
+ # all extra dependencies tracked by mk-build-deps.
+ exit 0
+fi
+
+# Build and install sparse.
+#
+# Explicitly disable sparse support for llvm because some travis
+# environments claim to have LLVM (llvm-config exists and works) but
+# linking against it fails.
+# Disabling sqlite support because sindex build fails and we don't
+# really need this utility being installed.
+git clone git://git.kernel.org/pub/scm/devel/sparse/sparse.git
+cd sparse
+make -j4 HAVE_LLVM= HAVE_SQLITE= install
+cd ..
+
+pip3 install --disable-pip-version-check --user flake8 hacking
+pip3 install --user --upgrade docutils
+
+if [ "$M32" ]; then
+ # Installing 32-bit libraries.
+ pkgs="gcc-multilib"
+ if [ -z "$GITHUB_WORKFLOW" ]; then
+ # 32-bit and 64-bit libunwind can not be installed at the same time.
+ # This will remove the 64-bit libunwind and install 32-bit version.
+ # GitHub Actions doesn't have 32-bit versions of these libs.
+ pkgs=$pkgs" libunwind-dev:i386 libunbound-dev:i386"
+ fi
+
+ sudo apt-get install -y $pkgs
+fi
+
+# IPv6 is supported by kernel but disabled in TravisCI images:
+# https://github.com/travis-ci/travis-ci/issues/8891
+# Enable it to avoid skipping of IPv6 related tests.
+sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0