This is an automated email from the ASF dual-hosted git repository.

raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 04ea3d8d3c GH-44396: [CI][C++] Use setup-python on hosted runner 
(#44411)
04ea3d8d3c is described below

commit 04ea3d8d3c3334bfc7395b8acf173fe794248f74
Author: Sutou Kouhei <[email protected]>
AuthorDate: Tue Oct 15 20:49:00 2024 +0900

    GH-44396: [CI][C++] Use setup-python on hosted runner (#44411)
    
    ### Rationale for this change
    
    We can't install packages by `pip install` with Ubuntu 24.04's pip by 
default.
    
    ### What changes are included in this PR?
    
    Use `actions/setup-python` instead. We can install packages by `pip 
install` with `actions/setup-python` by default.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    No.
    * GitHub Issue: #44396
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Raúl Cumplido <[email protected]>
---
 .github/workflows/cpp.yml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index 93bc723cd4..b3ee95bc32 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -141,7 +141,15 @@ jobs:
           path: .docker
           key: ${{ matrix.image }}-${{ hashFiles('cpp/**') }}
           restore-keys: ${{ matrix.image }}-
-      - name: Setup Python
+      - name: Setup Python on hosted runner
+        if: |
+          matrix.runs-on == 'ubuntu-latest'
+        uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # 
v5.2.0
+        with:
+          python-version: 3
+      - name: Setup Python on self-hosted runner
+        if: |
+          contains(matrix.runs-on, 'self-hosted')
         run: |
           sudo apt update
           sudo apt install -y --no-install-recommends python3 python3-dev 
python3-pip

Reply via email to