Skip to content

Commit

Permalink
fix(action): install pipx
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Jan 30, 2024
1 parent d7db575 commit 8cfdebc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-latest, macos-11]
os: [ubuntu-20.04, windows-latest, macos-11, macos-14]
python_version: ['3.12']
include:
- os: ubuntu-22.04
Expand Down
20 changes: 18 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,25 @@ runs:
python-version: "3.8 - 3.12"
update-environment: false

- id: pipx
run: |
'${{ steps.python.outputs.python-path }}' -m venv --without-pip '${{ runner.temp }}/pipx4cibw'
'${{ steps.python.outputs.python-path }}' -m pip install --python '${{ runner.temp }}/pipx4cibw/bin/python' pipx
echo 'pipx-path=${{ runner.temp }}/pipx4cibw/bin/pipx' >> $GITHUB_OUTPUT
shell: bash
if: runner.os != 'Windows'

- id: pipx-win
run: |
"${{ steps.python.outputs.python-path }}" -m venv --without-pip "${{ runner.temp }}\pipx4cibw"
"${{ steps.python.outputs.python-path }}" -m pip install --python "${{ runner.temp }}\pipx4cibw\Scripts\python.exe" pipx
echo "pipx-path=${{ runner.temp }}\pipx4cibw\Scripts\pipx.exe" >> $GITHUB_OUTPUT
shell: pwsh
if: runner.os == 'Windows'

# Redirecting stderr to stdout to fix interleaving issue in Actions.
- run: >
pipx run
'${{ steps.pipx-unix.outputs.pipx-path }}' run
--python '${{ steps.python.outputs.python-path }}'
--spec '${{ github.action_path }}'
cibuildwheel
Expand All @@ -47,7 +63,7 @@ runs:
# Windows needs powershell to interact nicely with Meson
- run: >
pipx run
"${{ steps.pipx-win.outputs.pipx-path }}" run
--python "${{ steps.python.outputs.python-path }}"
--spec "${{ github.action_path }}"
cibuildwheel
Expand Down

0 comments on commit 8cfdebc

Please sign in to comment.