Merge pull request #1114 from mayeut/action-tool-cache
action: use the most recent python from tool cache to run the GitHub Action
This commit is contained in:
@@ -37,7 +37,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-11]
|
os: [ubuntu-18.04, windows-latest, macos-11]
|
||||||
python_version: ['3.10']
|
python_version: ['3.10']
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
steps:
|
steps:
|
||||||
@@ -63,21 +63,21 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install ".[test]"
|
python -m pip install ".[test]"
|
||||||
|
|
||||||
- name: Sample build
|
- name: Generate a sample project
|
||||||
if: "contains(github.event.pull_request.labels.*.name, 'CI: Sample build')"
|
|
||||||
run: |
|
|
||||||
python bin/sample_build.py
|
|
||||||
|
|
||||||
- name: Get some sample wheels
|
|
||||||
run: |
|
run: |
|
||||||
python -m test.test_projects test.test_0_basic.basic_project sample_proj
|
python -m test.test_projects test.test_0_basic.basic_project sample_proj
|
||||||
cibuildwheel --output-dir wheelhouse sample_proj
|
|
||||||
|
- name: Run a sample build (GitHub Action)
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
package-dir: sample_proj
|
||||||
|
output-dir: wheelhouse
|
||||||
env:
|
env:
|
||||||
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
|
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: sample_wheels
|
name: sample_wheels_action
|
||||||
path: wheelhouse
|
path: wheelhouse
|
||||||
|
|
||||||
- name: Test cibuildwheel
|
- name: Test cibuildwheel
|
||||||
|
|||||||
@@ -20,10 +20,17 @@ branding:
|
|||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
|
# Set up a non-EOL, cibuildwheel & pipx supported Python version
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
id: python
|
||||||
|
with:
|
||||||
|
python-version: "3.7 - 3.10"
|
||||||
|
update-environment: false
|
||||||
|
|
||||||
# Redirecting stderr to stdout to fix interleaving issue in Actions.
|
# Redirecting stderr to stdout to fix interleaving issue in Actions.
|
||||||
- run: >
|
- run: >
|
||||||
pipx run
|
pipx run
|
||||||
|
--python '${{ steps.python.outputs.python-path }}'
|
||||||
--spec '${{ github.action_path }}'
|
--spec '${{ github.action_path }}'
|
||||||
cibuildwheel
|
cibuildwheel
|
||||||
${{ inputs.package-dir }}
|
${{ inputs.package-dir }}
|
||||||
|
|||||||
Reference in New Issue
Block a user