From 004f8aa70045e24d40cc0c0b0e8984f972b75544 Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Thu, 6 Feb 2025 20:14:31 +0200 Subject: [PATCH] Pin Python version in Windows CI. (#5441) Should fix CI failures on GCS. --- TYPE: NO_HISTORY --- .github/workflows/build-windows.yml | 4 ++++ scripts/install-run-gcs-emu.ps1 | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 7a84f5d65ed..98cd669c75d 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -122,6 +122,10 @@ jobs: uses: seanmiddleditch/gha-setup-ninja@v4 - name: Prevent vcpkg from building debug variants run: python $env:GITHUB_WORKSPACE/scripts/ci/patch_vcpkg_triplets.py + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' - name: Configure TileDB shell: pwsh diff --git a/scripts/install-run-gcs-emu.ps1 b/scripts/install-run-gcs-emu.ps1 index 6d181561d43..c9a3b0028fe 100644 --- a/scripts/install-run-gcs-emu.ps1 +++ b/scripts/install-run-gcs-emu.ps1 @@ -41,9 +41,9 @@ if (!$RunTestbench) { Write-Host "Installing Google Cloud Storage Testbench..." git clone --branch $version --depth 1 https://github.com/googleapis/storage-testbench.git $testbenchPath Write-Host "Setting up Python virtual environment..." - py -m venv $venvPath + python -m venv $venvPath & $venvPath\Scripts\activate - py -m pip install -e $testbenchPath + python -m pip install -e $testbenchPath } } @@ -53,7 +53,7 @@ $env:CLOUD_STORAGE_EMULATOR_ENDPOINT = "http://localhost:9000" # Run the testbench & $venvPath\Scripts\activate # $testbenchCmd = "start `"Google Cloud Storage Testbench`" py testbench_run.py localhost 9000 10" -$testbenchCmd = "start `"Google Cloud Storage Testbench`" /D `"$testbenchPath`" py testbench_run.py localhost 9000 10" +$testbenchCmd = "start `"Google Cloud Storage Testbench`" /D `"$testbenchPath`" python testbench_run.py localhost 9000 10" cmd /c $testbenchCmd # Wait for the testbench to be prepared. This was added to fix failures in the windows-2019-gcs job.