@@ -37,30 +37,34 @@ jobs:
37
37
strategy :
38
38
matrix :
39
39
include :
40
- - { os: ubuntu-latest, python: 3.9, arch: x64 }
41
- - { os: ubuntu-latest, python: 3.8, arch: x64 }
42
- - { os: ubuntu-latest, python: 3.7, arch: x64 }
43
- - { os: ubuntu-latest, python: 3.6, arch: x64 }
44
-
45
- - { os: macos-latest, python: 3.9, arch: x64 }
46
- - { os: macos-latest, python: 3.8, arch: x64 }
47
- - { os: macos-latest, python: 3.7, arch: x64 }
48
- - { os: macos-latest, python: 3.6, arch: x64 }
49
-
50
- - { os: windows-latest, python: 3.9, arch: x64 }
51
- - { os: windows-latest, python: 3.8, arch: x64 }
52
- - { os: windows-latest, python: 3.7, arch: x64 }
53
- - { os: windows-latest, python: 3.6, arch: x64 }
54
-
55
- - { os: windows-latest, python: 3.9, arch: x86 }
56
- - { os: windows-latest, python: 3.8, arch: x86 }
57
- - { os: windows-latest, python: 3.7, arch: x86 }
58
- - { os: windows-latest, python: 3.6, arch: x86 }
40
+ - { os: ubuntu-latest, python: '3.11', arch: x64, conda: true}
41
+ - { os: ubuntu-latest, python: '3.10', arch: x64, conda: true }
42
+ - { os: ubuntu-latest, python: '3.9', arch: x64, conda: true }
43
+ - { os: ubuntu-latest, python: '3.8', arch: x64, conda: true }
44
+ - { os: ubuntu-latest, python: '3.7', arch: x64, conda: true }
45
+
46
+ - { os: macos-11, python: '3.11', arch: x64, conda: true }
47
+ - { os: macos-11, python: '3.10', arch: x64, conda: true }
48
+ - { os: macos-11, python: '3.9', arch: x64, conda: true }
49
+ - { os: macos-11, python: '3.8', arch: x64, conda: true }
50
+ - { os: macos-11, python: '3.7', arch: x64, conda: true }
51
+
52
+ - { os: windows-latest, python: '3.11', arch: x64, conda: true }
53
+ - { os: windows-latest, python: '3.10', arch: x64, conda: true }
54
+ - { os: windows-latest, python: '3.9', arch: x64, conda: true }
55
+ - { os: windows-latest, python: '3.8', arch: x64, conda: true }
56
+ - { os: windows-latest, python: '3.7', arch: x64, conda: true }
57
+
58
+ - { os: windows-latest, python: '3.11', arch: x86, conda: false } # conda not yet available
59
+ - { os: windows-latest, python: '3.10', arch: x86, conda: true }
60
+ - { os: windows-latest, python: '3.9', arch: x86, conda: true }
61
+ - { os: windows-latest, python: '3.8', arch: x86, conda: true }
62
+ - { os: windows-latest, python: '3.7', arch: x86, conda: true }
59
63
60
64
if : github.repository == 'labscript-suite/labscript-c-extensions' && (github.event_name != 'create' || github.event.ref_type != 'branch')
61
65
steps :
62
66
- name : Checkout
63
- uses : actions/checkout@v2
67
+ uses : actions/checkout@v3
64
68
with :
65
69
fetch-depth : 0
66
70
69
73
run : git tag -d $(git tag --points-at HEAD)
70
74
71
75
- name : Install Python
72
- uses : actions/setup-python@v2
76
+ uses : actions/setup-python@v4
73
77
with :
74
78
python-version : ${{ matrix.python }}
75
79
architecture : ${{ matrix.arch }}
@@ -89,12 +93,13 @@ jobs:
89
93
90
94
- name : Upload Artifact
91
95
if : strategy.job-index == 0 || (env.PURE == 'false' && runner.os != 'Linux')
92
- uses : actions/upload-artifact@v2
96
+ uses : actions/upload-artifact@v3
93
97
with :
94
98
name : dist
95
99
path : ./dist
96
100
97
101
- name : Set Variables for Conda Build
102
+ if : matrix.conda
98
103
shell : bash
99
104
run : |
100
105
if [ $NOARCH == true ]; then
@@ -105,38 +110,37 @@ jobs:
105
110
echo "CONDA_BUILD_ARGS=$CONDA_BUILD_ARGS" >> $GITHUB_ENV
106
111
107
112
- name : Install Miniconda
108
- # We need https://github.com/conda-incubator/setup-miniconda/pull/189 in order
109
- # to be able to install 32-bit miniconda on Windows. Once setup-miniconda 2.1.2
110
- # is released with this fix, can change to @v2.
111
- uses : conda-incubator/setup-miniconda@1a875d105ac03256664b54c882c8c374ce617ef6
113
+ if : matrix.conda
114
+ uses : conda-incubator/setup-miniconda@v2
112
115
with :
113
116
auto-update-conda : true
114
117
python-version : ${{ matrix.python }}
115
118
architecture : ${{ matrix.arch }}
116
119
miniconda-version : " latest"
117
120
118
- - name : Workaround conda-build incompatibility with xcode >12
121
+ - name : Workaround conda-build incompatibility with xcode 12+
119
122
if : runner.os == 'macOS'
120
123
uses : maxim-lobanov/setup-xcode@v1
121
124
with :
122
125
xcode-version : 11.7
123
126
124
127
- name : Conda package (Unix)
125
- if : runner.os != 'Windows'
128
+ if : (matrix.conda && runner.os != 'Windows')
126
129
shell : bash -l {0}
127
130
run : |
128
131
conda install -c labscript-suite setuptools-conda
129
132
setuptools-conda build $CONDA_BUILD_ARGS .
130
133
131
134
- name : Conda Package (Windows)
132
- if : runner.os == 'Windows'
135
+ if : (matrix.conda && runner.os == 'Windows')
133
136
shell : cmd /C CALL {0}
134
137
run : |
135
138
conda install -c labscript-suite setuptools-conda && ^
136
139
setuptools-conda build %CONDA_BUILD_ARGS% --croot ${{ runner.temp }}\cb .
137
140
138
141
- name : Upload Artifact
139
- uses : actions/upload-artifact@v2
142
+ if : matrix.conda
143
+ uses : actions/upload-artifact@v3
140
144
with :
141
145
name : conda_packages
142
146
path : ./conda_packages
@@ -145,16 +149,11 @@ jobs:
145
149
manylinux :
146
150
name : Build Manylinux
147
151
runs-on : ubuntu-latest
148
- strategy :
149
- matrix :
150
- include :
151
- - { python: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39' }
152
-
153
152
if : github.repository == 'labscript-suite/labscript-c-extensions' && (github.event_name != 'create' || github.event.ref_type != 'branch')
154
153
steps :
155
154
- name : Checkout
156
155
if : env.PURE == 'false'
157
- uses : actions/checkout@v2
156
+ uses : actions/checkout@v3
158
157
with :
159
158
fetch-depth : 0
160
159
@@ -166,11 +165,12 @@ jobs:
166
165
if : env.PURE == 'false'
167
166
168
167
with :
169
- python-versions : ${{ matrix.python }}
168
+ python-versions : ' cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311'
169
+ pre-build-command : ' git config --global --add safe.directory "*"'
170
170
171
171
- name : Upload Artifact
172
172
if : env.PURE == 'false'
173
- uses : actions/upload-artifact@v2
173
+ uses : actions/upload-artifact@v3
174
174
with :
175
175
name : dist
176
176
path : dist/*manylinux*.whl
@@ -182,56 +182,45 @@ jobs:
182
182
steps :
183
183
184
184
- name : Download Artifact
185
- uses : actions/download-artifact@v2
185
+ uses : actions/download-artifact@v3
186
186
with :
187
187
name : dist
188
188
path : ./dist
189
189
190
190
- name : Download Artifact
191
- uses : actions/download-artifact@v2
191
+ uses : actions/download-artifact@v3
192
192
with :
193
193
name : conda_packages
194
194
path : ./conda_packages
195
195
196
- - name : Publish on TestPyPI
197
- uses : pypa/gh-action-pypi-publish@release/v1
198
- with :
199
- user : __token__
200
- password : ${{ secrets.testpypi }}
201
- repository_url : https://test.pypi.org/legacy/
202
-
203
196
- name : Get Version Number
204
197
if : github.event.ref_type == 'tag'
205
198
run : |
206
199
VERSION="${GITHUB_REF/refs\/tags\/v/}"
207
200
echo "VERSION=$VERSION" >> $GITHUB_ENV
208
201
209
- - name : Create GitHub Release
202
+ - name : Create GitHub Release and Upload Release Asset
210
203
if : github.event.ref_type == 'tag'
211
- id : create_release
212
- uses : actions/create-release@latest
204
+ uses : softprops/action-gh-release@v1
213
205
env :
214
206
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
215
207
with :
216
208
tag_name : ${{ github.event.ref }}
217
- release_name : ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
209
+ name : ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
218
210
draft : true
219
211
prerelease : ${{ contains(github.event.ref, 'rc') }}
212
+ files : ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
220
213
221
- - name : Upload Release Asset
222
- if : github.event.ref_type == 'tag'
223
- uses : actions/upload-release-asset@v1
224
- env :
225
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
214
+ - name : Publish on TestPyPI
215
+ uses : pypa/gh-action-pypi-publish@release/v1
226
216
with :
227
- upload_url : ${{ steps.create_release.outputs.upload_url }}
228
- asset_path : ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
229
- asset_name : ${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
230
- asset_content_type : application/gzip
217
+ user : __token__
218
+ password : ${{ secrets.testpypi }}
219
+ repository-url : https://test.pypi.org/legacy/
231
220
232
221
- name : Publish on PyPI
233
222
if : github.event.ref_type == 'tag'
234
- uses : pypa/gh-action-pypi-publish@master
223
+ uses : pypa/gh-action-pypi-publish@release/v1
235
224
with :
236
225
user : __token__
237
226
password : ${{ secrets.pypi }}
0 commit comments