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

This reverts commit 4103421ba5.

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

View file

@ -1,20 +0,0 @@
name: Setup Python and uv
inputs:
skip-python-setup:
required: false
description: "Whether to skip installing python using Github's `setup-python` action"
default: false
runs:
using: "composite"
steps:
# Use the setup-python action to take advantage of the cache. uv will
# symlink to this version.
- name: Setup system python
if: ${{ inputs.skip-python-setup != 'true' }}
uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.6"

View file

@ -59,8 +59,8 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.6
- name: Install crown
run: cargo install --path support/crown
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Bootstrap Python
run: python3 -m pip install --upgrade pip virtualenv
- name: Bootstrap dependencies
run: sudo apt update && python3 ./mach bootstrap --skip-lints
- name: Set up JDK 17

View file

@ -13,10 +13,9 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Bootstrap
run: |
python3 -m pip install --upgrade pip
sudo apt update
python3 ./mach bootstrap --skip-lints
- name: Set LIBCLANG_PATH # This is needed for bindgen in mozangle.

View file

@ -31,8 +31,9 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.6
- name: Set LIBCLANG_PATH env # needed for bindgen in mozangle
run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV
- name: Setup Python
uses: ./.github/actions/setup-python
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install taplo
uses: baptiste0928/cargo-install@v3
with:
@ -45,6 +46,8 @@ jobs:
locked: true
# 0.16.2 requires Rust 1.81 or newer.
version: '0.16.1'
- name: Bootstrap Python
run: python3 -m pip install --upgrade pip
- name: Bootstrap dependencies
run: |
sudo apt update
@ -54,4 +57,4 @@ jobs:
run: |
python3 ./mach clippy --use-crown --locked -- -- --deny warnings
- name: Tidy
run: python3 ./mach test-tidy --no-progress --all
run: python3 ./mach test-tidy --no-progress --all

View file

@ -52,10 +52,9 @@ jobs:
path: ${{ inputs.profile }}-binary-linux
- name: unPackage binary
run: tar -xzf ${{ inputs.profile }}-binary-linux/target.tar.gz
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Bootstrap dependencies
run: |
python3 -m pip install --upgrade pip
sudo apt update
sudo apt install -qy --no-install-recommends mesa-vulkan-drivers
python3 ./mach bootstrap --skip-lints

View file

@ -139,10 +139,13 @@ jobs:
- name: Set LIBCLANG_PATH env # needed for bindgen in mozangle
if: ${{ ! fromJSON(needs.runner-select.outputs.is-self-hosted) && !inputs.upload }} # not needed on ubuntu 20.04 used for nightly
run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV
- name: Setup Python
uses: ./.github/actions/setup-python
- uses: actions/setup-python@v5
if: ${{ ! fromJSON(needs.runner-select.outputs.is-self-hosted) }}
with:
skip-python-setup: ${{ fromJSON(needs.runner-select.outputs.is-self-hosted) }}
python-version: '3.10'
- name: Bootstrap Python
if: ${{ ! fromJSON(needs.runner-select.outputs.is-self-hosted) }}
run: python3 -m pip install --upgrade pip
- name: Bootstrap dependencies
if: ${{ ! fromJSON(needs.runner-select.outputs.is-self-hosted) }}
run: |

View file

@ -41,11 +41,15 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: ${{ inputs.profile }}-binary-macos
- name: Setup Python
uses: ./.github/actions/setup-python
# 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: Prep test environment
run: |
gtar -xzf target.tar.gz
python3 -m pip install --upgrade pip
python3 ./mach bootstrap --skip-lints
- name: Smoketest
run: python3 ./mach smoketest --${{ inputs.profile }}

View file

@ -77,14 +77,18 @@ jobs:
if: github.event_name == 'pull_request_target'
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Python
uses: ./.github/actions/setup-python
# 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: 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 }})

View file

@ -20,16 +20,15 @@ jobs:
outputs:
configuration: ${{ steps.configuration.outputs.result }}
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/checkout@v4
with:
fetch-depth: 1
sparse-checkout: |
python/servo/try_parser.py
.github/actions/setup-python
.python-version
sparse-checkout-cone-mode: false
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Get Configuration
id: configuration
run: |

View file

@ -53,8 +53,8 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.6
- name: Install crown
run: cargo install --path support/crown
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Bootstrap Python
run: python3 -m pip install --upgrade pip virtualenv
- name: Bootstrap dependencies
run: sudo apt update && python3 ./mach bootstrap --skip-lints
- name: Setup OpenHarmony SDK

View file

@ -28,16 +28,10 @@ jobs:
# using the token specified here.
# See https://github.com/actions/checkout/issues/162.
token: ${{ secrets.WPT_SYNC_TOKEN }}
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Install requirements
run: |
uv venv
uv pip install -r servo/python/requirements.txt
run: pip install -r servo/python/requirements.txt
- name: Process pull request
run: |
source .venv/bin/activate
servo/python/wpt/export.py
run: servo/python/wpt/export.py
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
WPT_SYNC_TOKEN: ${{ secrets.WPT_SYNC_TOKEN }}

View file

@ -35,10 +35,9 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: wpt-full-logs-linux-layout-2020
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Prep environment
run: |
python3 -m pip install --upgrade pip
sudo apt update
python3 ./mach bootstrap
- name: Add upstream remote

View file

@ -77,15 +77,14 @@ jobs:
}
return try_string;
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/checkout@v4
with:
sparse-checkout: |
python/servo/try_parser.py
.github/actions/setup-python
.python-version
sparse-checkout-cone-mode: false
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Parse Labels
if: ${{ steps.try_string.outputs.result }}
id: configuration

View file

@ -32,16 +32,15 @@ jobs:
outputs:
configuration: ${{ steps.configuration.outputs.result }}
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/checkout@v4
with:
fetch-depth: 1
sparse-checkout: |
python/servo/try_parser.py
.github/actions/setup-python
.python-version
sparse-checkout-cone-mode: false
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Get Full Configuration
id: full_config
run: |

View file

@ -114,13 +114,13 @@ jobs:
choco install wixtoolset
echo "C:\\Program Files (x86)\\WiX Toolset v3.11\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- uses: actions/setup-python@v5
- name: Setup Python
uses: ./.github/actions/setup-python
if: ${{ ! fromJSON(needs.runner-select.outputs.is-self-hosted) }}
with:
skip-python-setup: ${{ fromJSON(needs.runner-select.outputs.is-self-hosted) }}
python-version: "3.10"
- name: Bootstrap
if: ${{ ! fromJSON(needs.runner-select.outputs.is-self-hosted) }}
run: |
python -m pip install --upgrade pip
python mach fetch
python mach bootstrap-gstreamer
# For some reason WiX isn't currently on the GitHub runner path. This is a