1717 tags :
1818 - " *.*.*"
1919
20+ concurrency :
21+ group : ${{ github.workflow }}-${{ github.ref }}
22+ cancel-in-progress : true
23+
2024env :
2125 USE_QEMU : ${{ fromJSON(github.event.inputs.use_qemu || 'false') || (github.event_name == 'schedule') || startsWith(github.ref, 'refs/tags/') }}
2226
@@ -25,11 +29,11 @@ jobs:
2529 name : Lint
2630 runs-on : ubuntu-22.04
2731 steps :
28- - uses : actions/checkout@v3
29- - uses : actions/setup-python@v4
32+ - uses : actions/checkout@v4
33+ - uses : actions/setup-python@v5
3034 with :
3135 python-version : " 3.x"
32- -
uses :
pre-commit/[email protected] .0 36+ -
uses :
pre-commit/[email protected] .1 3337
3438
3539 build_wheels :
8488 arch : " AMD64"
8589 build : " "
8690 use_qemu : false
91+ - os : windows-2022
92+ arch : " ARM64"
93+ build : " "
94+ use_qemu : false
8795 - os : windows-2019
8896 arch : " x86"
8997 build : " "
@@ -94,25 +102,26 @@ jobs:
94102 use_qemu : false
95103
96104 steps :
97- - uses : actions/checkout@v3
105+ - uses : actions/checkout@v4
98106 if : (!matrix.use_qemu) || fromJSON(env.USE_QEMU)
99107 with :
100108 fetch-depth : 0 # required for versioneer to find tags
101109
102110 - name : Set up QEMU
103- uses : docker/setup-qemu-action@v2.1 .0
111+ uses : docker/setup-qemu-action@v3.0 .0
104112 if : matrix.use_qemu && fromJSON(env.USE_QEMU)
105113
106114 - name : Build wheels
107- uses : pypa/cibuildwheel@v2.11.2
115+ uses : pypa/cibuildwheel@v2.16.5
108116 if : (!matrix.use_qemu) || fromJSON(env.USE_QEMU)
109117 env :
110118 CIBW_ARCHS : " ${{ matrix.arch }}"
111119 CIBW_BUILD : " cp39-${{ matrix.build }}*"
112120
113- - uses : actions/upload-artifact@v3
121+ - uses : actions/upload-artifact@v4
114122 if : (!matrix.use_qemu) || fromJSON(env.USE_QEMU)
115123 with :
124+ name : Wheel-${{ matrix.os }}-${{ matrix.build }}${{ matrix.arch }}
116125 path : ./wheelhouse/*.whl
117126
118127 build_manylinux2010_wheels :
@@ -127,36 +136,38 @@ jobs:
127136 - arch : " i686"
128137
129138 steps :
130- - uses : actions/checkout@v3
139+ - uses : actions/checkout@v4
131140 with :
132141 fetch-depth : 0 # required for versioneer to find tags
133142
134143 - name : Build wheels
135- uses : pypa/cibuildwheel@v2.11.2
144+ uses : pypa/cibuildwheel@v2.16.5
136145 env :
137146 CIBW_ARCHS : " ${{ matrix.arch }}"
138147 CIBW_BUILD : " cp39-manylinux_*"
139148 CIBW_MANYLINUX_X86_64_IMAGE : " manylinux2010"
140149 CIBW_MANYLINUX_I686_IMAGE : " manylinux2010"
141150
142- - uses : actions/upload-artifact@v3
151+ - uses : actions/upload-artifact@v4
143152 with :
153+ name : Wheel-manylinux2010-${{ matrix.arch }}
144154 path : ./wheelhouse/*.whl
145155
146156 build_sdist :
147157 name : Build source distribution
148158 needs : [lint]
149159 runs-on : ubuntu-22.04
150160 steps :
151- - uses : actions/checkout@v3
161+ - uses : actions/checkout@v4
152162 with :
153163 fetch-depth : 0 # required for versioneer to find tags
154164
155165 - name : Build SDist
156166 run : pipx run build --sdist
157167
158- - uses : actions/upload-artifact@v3
168+ - uses : actions/upload-artifact@v4
159169 with :
170+ name : SDist
160171 path : dist/*.tar.gz
161172
162173 test_sdist :
@@ -167,24 +178,35 @@ jobs:
167178 strategy :
168179 fail-fast : false
169180 matrix :
170- python : ["2.7", "3.6", "3.7", "3.11 "]
181+ python : ["2.7", "3.6", "3.7", "3.12 "]
171182
172183 steps :
173- - uses : actions/checkout@v3
174- - uses : actions/setup-python@v4
184+ - uses : actions/checkout@v4
185+ - uses : actions/setup-python@v5
186+ if : matrix.python != '2.7'
175187 name : Install Python ${{ matrix.python }}
176188 with :
177189 python-version : ${{ matrix.python }}
178190
191+ - name : Install Ubuntu Python 2.7
192+ if : matrix.python == '2.7'
193+ run : |
194+ sudo apt-get update
195+ sudo apt-get install -y --no-install-recommends python2 python3-virtualenv
196+ virtualenv -p python2 ${HOME}/cp27
197+ ${HOME}/cp27/bin/python -m pip install -U pip
198+ ${HOME}/cp27/bin/python -m pip install -U setuptools wheel
199+ echo "${HOME}/cp27/bin" >> $GITHUB_PATH
200+
179201 - name : Install dependencies
180202 run : |
181203 sudo apt-get update
182204 sudo apt-get install -y --no-install-recommends libssl-dev
183205 pip install pytest pytest-virtualenv virtualenv pytest-cov
184206
185- - uses : actions/download-artifact@v3
207+ - uses : actions/download-artifact@v4
186208 with :
187- name : artifact
209+ name : SDist
188210 path : dist
189211
190212 - name : Install SDist
@@ -203,25 +225,30 @@ jobs:
203225 needs : [build_wheels, build_manylinux2010_wheels, build_sdist, test_sdist]
204226 runs-on : ubuntu-22.04
205227 steps :
206- - uses : actions/download-artifact@v3
228+ - uses : actions/download-artifact@v4
207229 with :
208- name : artifact
209- path : dist
230+ path : all
210231
211- - run : pipx run twine check --strict dist /*
232+ - run : pipx run twine check --strict all/* /*
212233
213234 upload_pypi :
214235 name : Upload to PyPI
215236 needs : [check_dist]
216237 runs-on : ubuntu-latest
217238 if : github.event_name == 'push' && github.repository == 'scikit-build/cmake-python-distributions' && startsWith(github.ref, 'refs/tags/')
239+ environment :
240+ name : pypi
241+ url : https://pypi.org/p/cmake
242+ permissions :
243+ id-token : write
218244 steps :
219- - uses : actions/download-artifact@v3
245+ - uses : actions/download-artifact@v4
220246 with :
221- name : artifact
222- path : dist
247+ path : all
223248
224- - name : Upload to PyPI
225- 226- with :
227- password : ${{ secrets.PYPI_RELEASE_PASSWORD }}
249+ - name : Merge files
250+ run : |
251+ mkdir dist
252+ mv all/*/* dist/.
253+
254+ - uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments