Skip to content

Commit 700a939

Browse files
author
Matthias Koeppe
committed
.github/workflows/macos.yml: Use tox via 'pipx run'
1 parent 52654ea commit 700a939

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/macos.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,16 @@ jobs:
8383
repository: ${{ inputs.sage_repo }}
8484
ref: ${{ inputs.sage_ref }}
8585
fetch-depth: 10000
86-
86+
- uses: actions/setup-python@v5
87+
# As of 2024-02-03, the macOS M1 runners do not have preinstalled python or pipx.
88+
# Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743
89+
id: python
90+
with:
91+
python-version: "3.8 - 3.12"
92+
update-environment: false
8793
- name: Install test prerequisites
8894
run: |
89-
pipx install tox
95+
"${{ steps.python.outputs.python-path }}" -m pip install pipx
9096
- name: Download upstream artifact
9197
uses: actions/download-artifact@v3
9298
with:
@@ -139,7 +145,7 @@ jobs:
139145
;;
140146
esac
141147
(sleep ${{ inputs.timeout }}; pkill make) &
142-
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS
148+
MAKE="make -j12" "${{ steps.python.outputs.python-path }}" -m pipx run tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS
143149
- name: Prepare logs artifact
144150
run: |
145151
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"

0 commit comments

Comments
 (0)