Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action: use the most recent python from tool cache to run the GitHub Action #1114

Merged
merged 5 commits into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-11]
os: [ubuntu-18.04, windows-latest, macos-11]
python_version: ['3.10']
timeout-minutes: 180
steps:
Expand All @@ -63,21 +63,21 @@ jobs:
run: |
python -m pip install ".[test]"

- name: Sample build
if: "contains(github.event.pull_request.labels.*.name, 'CI: Sample build')"
run: |
python bin/sample_build.py

- name: Get some sample wheels
- name: Generate a sample project
run: |
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:
CIBW_ARCHS_MACOS: x86_64 universal2 arm64

- uses: actions/upload-artifact@v3
with:
name: sample_wheels
name: sample_wheels_action
path: wheelhouse

- name: Test cibuildwheel
Expand Down
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,17 @@ branding:
runs:
using: composite
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"
mayeut marked this conversation as resolved.
Show resolved Hide resolved
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 }}
Expand Down