mach: recreate .venv when .python-version changes (#34712)

The new images published in servo/ci-runners#12 should have `uv`
installed already and the initial build of servo triggered during the
base image construction will force the installation of the Python
version mentioned at the time of the image construction (3.12). When
.python-version changes, we can no longer use the .venv baked into the
image and must recreate the it to avoid activating the environment.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Mukilan Thiyagarajan 2024-12-20 15:25:21 +05:30 committed by GitHub
parent 50c9c72778
commit adfee3daa5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 46 additions and 46 deletions

View file

@ -57,7 +57,7 @@ jobs:
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Bootstrap dependencies
run: sudo apt update && python3 ./mach bootstrap --skip-lints
run: sudo apt update && ./mach bootstrap --skip-lints
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
@ -95,7 +95,7 @@ jobs:
APK_SIGNING_KEY_ALIAS: ${{ secrets.APK_SIGNING_KEY_ALIAS }}
APK_SIGNING_KEY_PASS: ${{ secrets.APK_SIGNING_KEY_PASS }}
run: |
python3 ./mach build --use-crown --locked --target ${{ matrix.target }} --${{ inputs.profile }}
./mach build --use-crown --locked --target ${{ matrix.target }} --${{ inputs.profile }}
cp -r target/cargo-timings target/cargo-timings-android-${{ matrix.target }}
# TODO: This is disabled since APK crashes during startup.
# See https://github.com/servo/servo/issues/31134
@ -110,7 +110,7 @@ jobs:
- name: Upload nightly
if: ${{ inputs.upload && contains(matrix.target, 'aarch64') }}
run: |
python3 ./mach upload-nightly android \
./mach upload-nightly android \
--secret-from-environment \
--github-release-id ${{ inputs.github-release-id }}
env: