diff options
author | Ilya Maximets <i.maximets@ovn.org> | 2021-03-12 18:04:57 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2021-03-30 21:16:27 +0200 |
commit | 9801d7c4b8e71df56c439c06f8bab8b74cab5248 (patch) | |
tree | d6e2590a8e7cd92b32b39b7aaebee2ba6a0dd8c4 /.ci | |
parent | c3690ccbce3e6ac009ff7695099fdd47705145db (diff) | |
download | openvswitch-9801d7c4b8e71df56c439c06f8bab8b74cab5248.tar.gz |
github: Fix handling of python packages.
GitHub Actions doesn't have python locations in PATH and different
runners might have different configuration for default python
location and versions. For example, on some runners python2 might
be installed or not.
Missing PATH causes weird situations on older branches where during
one run our scripts can locate just installed flake8 and can't do
that on a different run. But this might also create other
unpredictable issues on all branches.
It's required to use actions/setup-python@v2 in order to have
predictable version of python installed and paths correctly configured.
Due to some bugs in GHA itself it doesn't set $HOME/.local/bin into
PATH, so we have to do that manually for now in order to use '--user'.
This might be fixed later in actions/setup-python or in base runners.
We already setting it for DPDK 20.11 (I think the issue was spotted
but not fully investigated). Moving PATH updates to a separate step
to make them more explicit and available for all steps of the job.
Unfortunately actions/setup-python@v2 also makes invisible python
packages installed from Ubuntu repositories. Switching them to
'pip3 install'.
Fixes: 6cb2f5a630e3 ("github: Add GitHub Actions workflow.")
Reported-by: Numan Siddique <numans@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to '.ci')
-rwxr-xr-x | .ci/linux-prepare.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/.ci/linux-prepare.sh b/.ci/linux-prepare.sh index 69a40011f..c55125cf7 100755 --- a/.ci/linux-prepare.sh +++ b/.ci/linux-prepare.sh @@ -20,7 +20,8 @@ cd sparse make -j4 HAVE_LLVM= HAVE_SQLITE= install cd .. -pip3 install --disable-pip-version-check --user flake8 hacking +pip3 install --disable-pip-version-check --user \ + flake8 hacking sphinx pyOpenSSL wheel setuptools pip3 install --user --upgrade docutils pip3 install --user 'meson==0.47.1' |