Skip to content

Commit 4539512

Browse files
andy31415pull[bot]
authored andcommitted
Update python builds to latest CI image (ubuntu 24.04 build) (#35534)
* Switch python builds to latest CI image * Switch logic for pip updates and wheel installation: do not hardcode paths * More fixes for new python, where pip cannot just be used
1 parent 34857f0 commit 4539512

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.github/workflows/build.yaml

+8-6
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ jobs:
283283
if: github.actor != 'restyled-io[bot]'
284284

285285
container:
286-
image: ghcr.io/project-chip/chip-build:54
286+
image: ghcr.io/project-chip/chip-build:74
287287
volumes:
288288
- "/:/runner-root-volume"
289289
- "/tmp/log_output:/tmp/test_logs"
@@ -316,9 +316,10 @@ jobs:
316316
run: |
317317
scripts/run_in_build_env.sh 'virtualenv pyenv'
318318
source pyenv/bin/activate
319-
pip3 install ./out/controller/python/chip_core-0.0-cp37-abi3-linux_x86_64.whl
320-
pip3 install ./out/controller/python/chip_clusters-0.0-py3-none-any.whl
321-
pip3 install ./out/controller/python/chip_repl-0.0-py3-none-any.whl
319+
python -m ensurepip --upgrade
320+
python -m pip install ./out/controller/python/chip_core-0.0-cp37-abi3-linux_x86_64.whl
321+
python -m pip install ./out/controller/python/chip_clusters-0.0-py3-none-any.whl
322+
python -m pip install ./out/controller/python/chip_repl-0.0-py3-none-any.whl
322323
323324
- name: Run Python tests
324325
shell: bash
@@ -334,7 +335,8 @@ jobs:
334335
scripts/run_in_build_env.sh 'scripts/examples/gn_build_example.sh examples/chip-tool out/'
335336
scripts/run_in_build_env.sh 'virtualenv pyenv'
336337
source pyenv/bin/activate
337-
pip3 install -r scripts/setup/requirements.setuppayload.txt
338+
python -m ensurepip --upgrade
339+
python -m pip install -r scripts/setup/requirements.setuppayload.txt
338340
python3 src/setup_payload/tests/run_python_setup_payload_test.py out/chip-tool
339341
340342
build_linux_python_lighting_device:
@@ -344,7 +346,7 @@ jobs:
344346
if: github.actor != 'restyled-io[bot]'
345347

346348
container:
347-
image: ghcr.io/project-chip/chip-build:54
349+
image: ghcr.io/project-chip/chip-build:74
348350
volumes:
349351
- "/:/runner-root-volume"
350352
- "/tmp/log_output:/tmp/test_logs"

scripts/build_python.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ if [ -n "$install_virtual_env" ]; then
217217
fi
218218

219219
source "$ENVIRONMENT_ROOT"/bin/activate
220-
"$ENVIRONMENT_ROOT"/bin/python -m pip install --upgrade pip
221-
"$ENVIRONMENT_ROOT"/bin/pip install --upgrade "${WHEEL[@]}"
220+
"$ENVIRONMENT_ROOT"/bin/python -m ensurepip --upgrade
221+
"$ENVIRONMENT_ROOT"/bin/python -m pip install --upgrade "${WHEEL[@]}"
222222

223223
if [ "$install_pytest_requirements" = "yes" ]; then
224224
YAMLTESTS_GN_LABEL="//scripts:matter_yamltests_distribution._build_wheel"

scripts/build_python_device.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ virtualenv --clear "$ENVIRONMENT_ROOT"
104104
WHEEL=("$OUTPUT_ROOT"/controller/python/chip_core*.whl)
105105

106106
source "$ENVIRONMENT_ROOT"/bin/activate
107-
"$ENVIRONMENT_ROOT"/bin/python -m pip install --upgrade pip
108-
"$ENVIRONMENT_ROOT"/bin/pip install --upgrade --force-reinstall --no-cache-dir "${WHEEL[@]}"
107+
"$ENVIRONMENT_ROOT"/bin/python -m ensurepip --upgrade
108+
"$ENVIRONMENT_ROOT"/bin/python -m pip install --upgrade --force-reinstall --no-cache-dir "${WHEEL[@]}"
109109

110110
echo ""
111111
echo_green "Compilation completed and WHL package installed in: "

0 commit comments

Comments
 (0)