Skip to content

Commit

Permalink
apacheGH-44396: [CI][C++] Use setup-python on hosted runner
Browse files Browse the repository at this point in the history
We can't install packages globally with Ubuntu 24.04's pip by default.
  • Loading branch information
kou committed Oct 15, 2024
1 parent 27e56f0 commit 118fc73
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 118fc73

Please sign in to comment.