mach: switch to uv for managing python venv (#34504)

This patch switches servo to use `uv` for both installing a pinned
Python version as well as installing the dependency packages using
`uv`'s pip compatible interface. It also introduces a new 'composite'
GitHub action to setup python in the different CI workflows.

There is no support for externally managed python installations and
virtual environments. These could be added in the future.

Fixes #34095

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Mukilan Thiyagarajan 2024-12-09 20:22:06 +05:30 committed by GitHub
parent a0743f60b3
commit 4103421ba5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 100 additions and 80 deletions

View file

@ -77,18 +77,14 @@ jobs:
if: github.event_name == 'pull_request_target'
with:
ref: ${{ github.event.pull_request.head.sha }}
# Python 3.13 breaks wptrunner, so pin the version until
# web-platform-tests/wpt#48585 is fixed.
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.6
- name: Install crown
run: cargo install --path support/crown
- name: Bootstrap
run: |
python3 -m pip install --upgrade pip
python3 ./mach bootstrap --skip-lints
brew install gnu-tar
- name: Build (${{ inputs.profile }})