Skip to content

Commit 211d33a

Browse files
authored
Fix GH Actions job to run on Ubuntu 24.04 (#37063)
* docbuild: Run sphinx in venv, update python version Pip cannot upgrade pip on Ubuntu 24.04. Instead create and use a venv to run the sphinx job. Also bump Python version to 3.12. Signed-off-by: Maciej Grela <m.grela@samsung.com> * Post-review updates: - do not update pip - use a venv also in cancel_workflows_for_pr.yaml and protocol_compatibility.yaml - bump python version where applicable Signed-off-by: Maciej Grela <m.grela@samsung.com> --------- Signed-off-by: Maciej Grela <m.grela@samsung.com>
1 parent 77bfbbc commit 211d33a

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.github/workflows/cancel_workflows_for_pr.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,16 @@ jobs:
3535
python-version: '3.12'
3636
- name: Setup pip modules we use
3737
run: |
38-
pip install \
38+
python3 -m venv venv
39+
venv/bin/pip3 install \
3940
click \
4041
coloredlogs \
4142
python-dateutil \
4243
pygithub \
43-
&& echo "DONE installint python prerequisites"
44+
&& echo "DONE installing python prerequisites"
4445
- name: Cancel runs
4546
run: |
46-
scripts/tools/cancel_workflows_for_pr.py \
47+
venv/bin/python3 scripts/tools/cancel_workflows_for_pr.py \
4748
--gh-api-token "${{ secrets.GITHUB_TOKEN }}" \
4849
--require "Restyled" \
4950
--require "Lint Code Base" \

.github/workflows/docbuild.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,18 @@ jobs:
2929
- name: Install Python
3030
uses: actions/setup-python@v5
3131
with:
32-
python-version: 3.8
32+
python-version: 3.12
3333
cache-dependency-path: matter/docs/requirements.txt
3434
cache: pip
3535
- name: Install base dependencies
3636
working-directory: matter
3737
run: |
38-
sudo pip3 install -U pip
39-
pip3 install -r docs/requirements.txt
38+
python3 -m venv venv
39+
venv/bin/pip3 install -r docs/requirements.txt
4040
- name: Build documentation
4141
working-directory: matter/docs
4242
run: |
43+
source ../venv/bin/activate
4344
mkdir -p _build/src
4445
make html
4546
touch _build/html/.nojekyll

.github/workflows/protocol_compatibility.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ jobs:
3030
- name: Setup python
3131
uses: actions/setup-python@v5
3232
with:
33-
python-version: 3.11
33+
python-version: 3.12
3434
- name: Install dependencies
3535
run: |
36-
python -m pip install --upgrade pip
37-
pip install click coloredlogs lark
36+
python3 -m venv venv
37+
venv/bin/pip3 install click coloredlogs lark
3838
- name: Create old/new copies
3939
run: |
4040
mkdir -p out
@@ -45,5 +45,4 @@ jobs:
4545
patch -p1 <out/patch.diff
4646
- name: Check backwards compatibility
4747
run: |
48-
scripts/backwards_compatibility_checker.py out/old_version.matter out/new_version.matter
49-
48+
venv/bin/python3 scripts/backwards_compatibility_checker.py out/old_version.matter out/new_version.matter

0 commit comments

Comments
 (0)