Skip to content

Commit 7178d9d

Browse files
ldoraulukaszstolarczuk
authored andcommitted
[CI] Fix all pip installations
Latest distros do not allow global pip installation. Python packages have to be installed in venv, on Linux. Signed-off-by: Lukasz Dorau <[email protected]>
1 parent 8e55047 commit 7178d9d

File tree

5 files changed

+45
-17
lines changed

5 files changed

+45
-17
lines changed

.github/workflows/docs.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ jobs:
2929
sudo apt-get update
3030
sudo apt-get install -y doxygen
3131
32-
- name: Install pip requirements
33-
run: python3 -m pip install -r third_party/requirements.txt
32+
# Latest distros do not allow global pip installation
33+
- name: Install Python requirements in venv
34+
run: |
35+
python3 -m venv .venv
36+
. .venv/bin/activate
37+
echo "$PATH" >> $GITHUB_PATH
38+
python3 -m pip install -r third_party/requirements.txt
3439
3540
- name: Setup PATH for python
3641
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

.github/workflows/reusable_checks.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ jobs:
2222
run: |
2323
sudo apt-get update
2424
sudo apt-get install -y black cmake clang-format-15 cmake-format libhwloc-dev
25+
26+
# Latest distros do not allow global pip installation
27+
- name: Install Python requirements in venv
28+
run: |
29+
python3 -m venv .venv
30+
. .venv/bin/activate
31+
echo "$PATH" >> $GITHUB_PATH
2532
python3 -m pip install bandit
2633
2734
- name: Configure CMake

.github/workflows/reusable_codeql.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,34 @@ jobs:
4444
with:
4545
languages: cpp
4646

47-
- name: Initialize vcpkg
48-
if: ${{ matrix.os == 'windows-latest' }}
47+
- name: "[Win] Initialize vcpkg"
48+
if: matrix.os == 'windows-latest'
4949
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
5050
with:
5151
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
5252
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
5353
vcpkgJsonGlob: '**/vcpkg.json'
5454

55-
- name: Install dependencies
56-
if: ${{ matrix.os == 'windows-latest' }}
57-
run: vcpkg install
58-
shell: pwsh # Specifies PowerShell as the shell for running the script.
55+
- name: "[Win] Install dependencies"
56+
if: matrix.os == 'windows-latest'
57+
run: |
58+
vcpkg install
59+
python3 -m pip install -r third_party/requirements.txt
5960
60-
- name: Install apt packages
61+
- name: "[Lin] Install apt packages"
6162
if: matrix.os == 'ubuntu-latest'
6263
run: |
6364
sudo apt-get update
6465
sudo apt-get install -y cmake clang libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev
6566
66-
- name: Install pip packages
67-
run: python3 -m pip install -r third_party/requirements.txt
67+
# Latest distros do not allow global pip installation
68+
- name: "[Lin] Install Python requirements in venv"
69+
if: matrix.os == 'ubuntu-latest'
70+
run: |
71+
python3 -m venv .venv
72+
. .venv/bin/activate
73+
echo "$PATH" >> $GITHUB_PATH
74+
python3 -m pip install -r third_party/requirements.txt
6875
6976
- name: Configure CMake
7077
run: >

.github/workflows/reusable_docs_build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ jobs:
2121
sudo apt-get update
2222
sudo apt-get install -y doxygen
2323
24-
- name: Install pip requirements
25-
run: python3 -m pip install -r third_party/requirements.txt
26-
27-
- name: Setup PATH for python
28-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
24+
# Latest distros do not allow global pip installation
25+
- name: Install Python requirements in venv
26+
run: |
27+
python3 -m venv .venv
28+
. .venv/bin/activate
29+
echo "$PATH" >> $GITHUB_PATH
30+
python3 -m pip install -r third_party/requirements.txt
2931
3032
- name: Build the documentation
3133
working-directory: scripts

.github/workflows/reusable_qemu.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ jobs:
2929
sudo apt-get update
3030
sudo apt-get install -y qemu-system genisoimage qemu-utils \
3131
libvirt-clients libvirt-daemon-system libvirt-daemon virtinst bridge-utils
32-
pip install -r umf/scripts/qemu/requirements.txt
32+
33+
# Latest distros do not allow global pip installation
34+
- name: Install Python requirements in venv
35+
run: |
36+
python3 -m venv .venv
37+
. .venv/bin/activate
38+
echo "$PATH" >> $GITHUB_PATH
39+
python3 -m pip install -r umf/scripts/qemu/requirements.txt
3340
3441
- name: Add user to kvm group
3542
run: sudo usermod -a -G kvm,libvirt $USER

0 commit comments

Comments
 (0)