@@ -13,16 +13,19 @@ on: # yamllint disable-line rule:truthy
13
13
description : A custom name for the Checks API-reported status
14
14
required : false
15
15
type : string
16
- cython-tracing :
17
- description : Whether to build Cython modules with line tracing
18
- default : ' 0'
16
+ environment-variables :
17
+ description : >-
18
+ A newline-delimited blob of text with environment variables
19
+ to be set using `${GITHUB_ENV}`
19
20
required : false
20
21
type : string
21
22
qemu :
22
- description : Emulated QEMU architecture
23
- default : ' '
23
+ default : false
24
+ description : >-
25
+ Whether this job needs to configure QEMU to emulate a foreign
26
+ architecture before running `cibuildwheel`. Defaults to "false".
24
27
required : false
25
- type : string
28
+ type : boolean
26
29
runner-vm-os :
27
30
description : VM OS to use
28
31
default : ubuntu-latest
@@ -36,11 +39,6 @@ on: # yamllint disable-line rule:truthy
36
39
description : Deadline for the job to complete
37
40
required : true
38
41
type : number
39
- wheel-tags-to-skip :
40
- description : Wheel tags to skip building
41
- default : ' '
42
- required : false
43
- type : string
44
42
45
43
env :
46
44
FORCE_COLOR : " 1" # Make tools pretty.
@@ -55,14 +53,21 @@ jobs:
55
53
inputs.check-name
56
54
&& inputs.check-name
57
55
|| format(
58
- 'Build wheels on {0} {1}',
56
+ 'Build wheels on {0}{1}',
59
57
inputs.runner-vm-os,
60
- inputs.qemu
58
+ inputs.qemu && ' under QEMU' || ''
61
59
)
62
60
}}
63
61
runs-on : ${{ inputs.runner-vm-os }}
64
62
timeout-minutes : ${{ fromJSON(inputs.timeout-minutes) }}
65
63
steps :
64
+ - name : Export requested job-global environment variables
65
+ if : inputs.environment-variables != ''
66
+ env :
67
+ INPUT_ENVIRONMENT_VARIABLES : ${{ inputs.environment-variables }}
68
+ run : echo "${INPUT_ENVIRONMENT_VARIABLES}" >> "${GITHUB_ENV}"
69
+ shell : bash
70
+
66
71
- name : Compute GHA artifact name ending
67
72
id : gha-artifact-name
68
73
run : |
@@ -93,39 +98,16 @@ jobs:
93
98
uses : docker/setup-qemu-action@v3
94
99
with :
95
100
platforms : all
96
- # This should be temporary
97
- # xref https://github.com/docker/setup-qemu-action/issues/188
98
- # xref https://github.com/tonistiigi/binfmt/issues/215
99
- image : tonistiigi/binfmt:qemu-v8.1.5
100
- id : qemu
101
- - name : Prepare emulation
102
- if : inputs.qemu
103
- run : |
104
- # Build emulated architectures only if QEMU is set,
105
- # use default "auto" otherwise
106
- echo "CIBW_ARCHS_LINUX=${{ inputs.qemu }}" >> "${GITHUB_ENV}"
107
- shell : bash
108
-
109
- - name : Skip building some wheel tags
110
- if : inputs.wheel-tags-to-skip
111
- run : |
112
- echo "CIBW_SKIP=${{ inputs.wheel-tags-to-skip }}" >> "${GITHUB_ENV}"
113
- shell : bash
114
101
115
102
- name : Build wheels
116
103
117
- env :
118
- CIBW_ARCHS_MACOS : x86_64 arm64 universal2
119
- CIBW_CONFIG_SETTINGS : >- # Cython line tracing for coverage collection
120
- pure-python=false
121
- with-cython-tracing=${{ inputs.cython-tracing }}
122
104
123
105
- name : Upload built artifacts for testing and publishing
124
106
uses : actions/upload-artifact@v4
125
107
with :
126
108
name : ${{ inputs.dists-artifact-name }}-
127
109
${{ inputs.runner-vm-os }}-
128
- ${{ inputs.qemu }}-
110
+ ${{ inputs.qemu && 'qemu-' || '' }}
129
111
${{ steps.gha-artifact-name.outputs.hash }}
130
112
path : ./wheelhouse/*.whl
131
113
0 commit comments