@@ -5,39 +5,33 @@ inputs:
55 version :
66 type : choice
77 description : ' Python Version to use'
8- options :
8+ options :
99 - ' 3.7'
1010 - ' 3.8'
1111 - ' 3.9'
1212 - ' 3.10'
1313 - ' 3.11'
1414 - ' 3.12'
15+ default : ' 3.9'
1516 kind :
1617 type : choice
1718 description : ' Kind of asset to install, "cp" or "pp"'
18- options :
19- - cp
20- - pp
19+ options :
20+ - cp
21+ - pp
2122 default : ' cp'
23+ test :
24+ type : string
25+ description : ' Test command to pass through to cibuildwheel'
26+ default : ' echo "Skipping tests, run on separate actions"'
2227
2328runs :
2429 using : ' composite'
2530 steps :
26- - name : Display cibuildwheel cache dir
27- id : cibuildwheel-cache
28- run : |
29- from platformdirs import user_cache_path
30- import os
31-
32- with open(os.getenv('GITHUB_OUTPUT'), 'w') as f:
33- f.write(f"dir={str(user_cache_path(appname='cibuildwheel', appauthor='pypa'))}")
34- shell : python
35-
36- - name : Cache cibuildwheel tools
37- uses : actions/cache@v3
31+ - name : Setup cibuildwheel caching
32+ uses : actions-ext/python/setup-cibuildwheel@v1
3833 with :
39- path : ${{ steps.cibuildwheel-cache.outputs.dir }}
40- key : ${{ runner.os }}-cibuildwheel-${{ inputs.version }}
34+ version : ${{ inputs.version }}
4135
4236 - name : Install cibuildwheel
4337 run : pip install -U cibuildwheel
@@ -48,141 +42,141 @@ runs:
4842 shell : bash
4943 env :
5044 CIBW_BUILD : " ${{ inputs.kind }}37-*x86_64" # only build x86_64, skip i686
51- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
45+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
5246 if : ${{ runner.os == 'Linux' && inputs.version == '3.7'}}
5347
5448 - name : Build wheels (Linux 3.8)
5549 run : make dist-cibw
5650 shell : bash
5751 env :
5852 CIBW_BUILD : " ${{ inputs.kind }}38-*x86_64" # only build x86_64, skip i686
59- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
53+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
6054 if : ${{ runner.os == 'Linux' && inputs.version == '3.8'}}
6155
6256 - name : Build wheels (Linux 3.9)
6357 run : make dist-cibw
6458 shell : bash
6559 env :
6660 CIBW_BUILD : " ${{ inputs.kind }}39-*x86_64" # only build x86_64, skip i686
67- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
61+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
6862 if : ${{ runner.os == 'Linux' && inputs.version == '3.9'}}
6963
7064 - name : Build wheels (Linux 3.10)
7165 run : make dist-cibw
7266 shell : bash
7367 env :
7468 CIBW_BUILD : " ${{ inputs.kind }}310-*x86_64" # only build x86_64, skip i686
75- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
69+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
7670 if : ${{ runner.os == 'Linux' && inputs.version == '3.10'}}
7771
7872 - name : Build wheels (Linux 3.11)
7973 run : make dist-cibw
8074 shell : bash
8175 env :
8276 CIBW_BUILD : " ${{ inputs.kind }}311-*x86_64" # only build x86_64, skip i686
83- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
77+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
8478 if : ${{ runner.os == 'Linux' && inputs.version == '3.11'}}
8579
8680 - name : Build wheels (Linux 3.12)
8781 run : make dist-cibw
8882 shell : bash
8983 env :
9084 CIBW_BUILD : " ${{ inputs.kind }}312-*x86_64" # only build x86_64, skip i686
91- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
85+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
9286 if : ${{ runner.os == 'Linux' && inputs.version == '3.12'}}
9387
9488 - name : Build wheels (Mac 3.7)
9589 run : make dist-cibw
9690 shell : bash
9791 env :
9892 CIBW_BUILD : " ${{ inputs.kind }}37-*" # build x86_64, arm64, and universal2
99- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
93+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
10094 if : ${{ runner.os == 'macOS' && inputs.version == '3.7'}}
10195
10296 - name : Build wheels (Mac 3.8)
10397 run : make dist-cibw
10498 shell : bash
10599 env :
106100 CIBW_BUILD : " ${{ inputs.kind }}38-*" # build x86_64, arm64, and universal2
107- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
101+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
108102 if : ${{ runner.os == 'macOS' && inputs.version == '3.8'}}
109103
110104 - name : Build wheels (Mac 3.9)
111105 run : make dist-cibw
112106 shell : bash
113107 env :
114108 CIBW_BUILD : " ${{ inputs.kind }}39-*" # build x86_64, arm64, and universal2
115- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
109+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
116110 if : ${{ runner.os == 'macOS' && inputs.version == '3.9'}}
117111
118112 - name : Build wheels (Mac 3.10)
119113 run : make dist-cibw
120114 shell : bash
121115 env :
122116 CIBW_BUILD : " ${{ inputs.kind }}310-*" # build x86_64, arm64, and universal2
123- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
117+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
124118 if : ${{ runner.os == 'macOS' && inputs.version == '3.10'}}
125119
126120 - name : Build wheels (Mac 3.11)
127121 run : make dist-cibw
128122 shell : bash
129123 env :
130124 CIBW_BUILD : " ${{ inputs.kind }}311-*" # build x86_64, arm64, and universal2
131- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
125+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
132126 if : ${{ runner.os == 'macOS' && inputs.version == '3.11'}}
133127
134128 - name : Build wheels (Mac 3.12)
135129 run : make dist-cibw
136130 shell : bash
137131 env :
138132 CIBW_BUILD : " ${{ inputs.kind }}312-*" # build x86_64, arm64, and universal2
139- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
133+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
140134 if : ${{ runner.os == 'macOS' && inputs.version == '3.12'}}
141135
142136 - name : Build wheels (Windows 3.7)
143137 run : make dist-cibw
144138 shell : bash
145139 env :
146140 CIBW_BUILD : " ${{ inputs.kind }}37-*amd64" # build amd64, skip win32 and arm64
147- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
141+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
148142 if : ${{ runner.os == 'Windows' && inputs.version == '3.7'}}
149143
150144 - name : Build wheels (Windows 3.8)
151145 run : make dist-cibw
152146 shell : bash
153147 env :
154148 CIBW_BUILD : " ${{ inputs.kind }}38-*amd64" # build amd64, skip win32 and arm64
155- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
149+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
156150 if : ${{ runner.os == 'Windows' && inputs.version == '3.8'}}
157151
158152 - name : Build wheels (Windows 3.9)
159153 run : make dist-cibw
160154 shell : bash
161155 env :
162156 CIBW_BUILD : " ${{ inputs.kind }}39-*amd64" # build amd64, skip win32 and arm64
163- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
157+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
164158 if : ${{ runner.os == 'Windows' && inputs.version == '3.9'}}
165159
166160 - name : Build wheels (Windows 3.10)
167161 run : make dist-cibw
168162 shell : bash
169163 env :
170164 CIBW_BUILD : " ${{ inputs.kind }}310-*amd64" # build amd64, skip win32 and arm64
171- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
165+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
172166 if : ${{ runner.os == 'Windows' && inputs.version == '3.10'}}
173167
174168 - name : Build wheels (Windows 3.11)
175169 run : make dist-cibw
176170 shell : bash
177171 env :
178172 CIBW_BUILD : " ${{ inputs.kind }}311-*amd64" # build amd64, skip win32 and arm64
179- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
173+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
180174 if : ${{ runner.os == 'Windows' && inputs.version == '3.11'}}
181175
182176 - name : Build wheels (Windows 3.12)
183177 run : make dist-cibw
184178 shell : bash
185179 env :
186180 CIBW_BUILD : " ${{ inputs.kind }}312-*amd64" # build amd64, skip win32 and arm64
187- CIBW_TEST_COMMAND : " echo 'Skipping tests, run on separate actions' "
181+ CIBW_TEST_COMMAND : " ${{ inputs.test }} "
188182 if : ${{ runner.os == 'Windows' && inputs.version == '3.12'}}
0 commit comments