From ce113a1fd6f09f51b2ed89b773dc64c93cbcf7f2 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 22 May 2022 14:32:04 +0200 Subject: [PATCH] action: use the most recent python from tool cache to run the GitHub Action --- .github/workflows/test.yml | 13 +++++++++++++ action.yml | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a588b5268..af03e3f40 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,6 +66,19 @@ jobs: name: sample_wheels path: wheelhouse + - name: Get some sample wheels (GitHub Action) + uses: ./ + with: + package-dir: sample_proj + output-dir: wheelhouse_action + env: + CIBW_ARCHS_MACOS: x86_64 universal2 arm64 + + - uses: actions/upload-artifact@v3 + with: + name: sample_wheels_action + path: wheelhouse_action + - name: Test cibuildwheel run: | python ./bin/run_tests.py diff --git a/action.yml b/action.yml index 703cb33a5..ecb12ed2a 100644 --- a/action.yml +++ b/action.yml @@ -20,10 +20,17 @@ branding: runs: using: composite steps: + # Set up a non-EOL, cibuildwheel & pipx supported Python version + - uses: mayeut/setup-python@no-envvar + id: python + with: + python-version: "3.7 - 3.10" + update-environment: false # Redirecting stderr to stdout to fix interleaving issue in Actions. - run: > pipx run + --python '${{ steps.python.outputs.python-path }}' --spec '${{ github.action_path }}' cibuildwheel ${{ inputs.package-dir }}