Skip to content

Commit 88d432c

Browse files
authored
Merge pull request #1114 from mayeut/action-tool-cache
action: use the most recent python from tool cache to run the GitHub Action
2 parents e50075b + de53d48 commit 88d432c

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: ${{ matrix.os }}
3838
strategy:
3939
matrix:
40-
os: [ubuntu-latest, windows-latest, macos-11]
40+
os: [ubuntu-18.04, windows-latest, macos-11]
4141
python_version: ['3.10']
4242
timeout-minutes: 180
4343
steps:
@@ -63,21 +63,21 @@ jobs:
6363
run: |
6464
python -m pip install ".[test]"
6565
66-
- name: Sample build
67-
if: "contains(github.event.pull_request.labels.*.name, 'CI: Sample build')"
68-
run: |
69-
python bin/sample_build.py
70-
71-
- name: Get some sample wheels
66+
- name: Generate a sample project
7267
run: |
7368
python -m test.test_projects test.test_0_basic.basic_project sample_proj
74-
cibuildwheel --output-dir wheelhouse sample_proj
69+
70+
- name: Run a sample build (GitHub Action)
71+
uses: ./
72+
with:
73+
package-dir: sample_proj
74+
output-dir: wheelhouse
7575
env:
7676
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
7777

7878
- uses: actions/upload-artifact@v3
7979
with:
80-
name: sample_wheels
80+
name: sample_wheels_action
8181
path: wheelhouse
8282

8383
- name: Test cibuildwheel

action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,17 @@ branding:
2020
runs:
2121
using: composite
2222
steps:
23+
# Set up a non-EOL, cibuildwheel & pipx supported Python version
24+
- uses: actions/setup-python@v4
25+
id: python
26+
with:
27+
python-version: "3.7 - 3.10"
28+
update-environment: false
2329

2430
# Redirecting stderr to stdout to fix interleaving issue in Actions.
2531
- run: >
2632
pipx run
33+
--python '${{ steps.python.outputs.python-path }}'
2734
--spec '${{ github.action_path }}'
2835
cibuildwheel
2936
${{ inputs.package-dir }}

0 commit comments

Comments
 (0)