@@ -37,25 +37,29 @@ jobs:
37
37
strategy :
38
38
matrix :
39
39
include :
40
- # - { os: ubuntu-latest, python: '3.10', arch: x64 }
41
- # - { os: ubuntu-latest, python: '3.9', arch: x64 }
42
- - { os: ubuntu-latest, python: '3.8', arch: x64 }
43
- # - { os: ubuntu-latest, python: '3.7', arch: x64 }
44
-
45
- # - { os: macos-latest, python: '3.10', arch: x64 }
46
- # - { os: macos-latest, python: '3.9', arch: x64 }
47
- # - { os: macos-latest, python: '3.8', arch: x64 }
48
- # - { os: macos-latest, python: '3.7', arch: x64 }
49
-
50
- # - { os: windows-latest, python: '3.10', arch: x64 }
51
- # - { os: windows-latest, python: '3.9', arch: x64 }
52
- # - { os: windows-latest, python: '3.8', arch: x64 }
53
- # - { os: windows-latest, python: '3.7', arch: x64 }
54
-
55
- # - { os: windows-latest, python: '3.10', arch: x86 }
56
- # - { os: windows-latest, python: '3.9', arch: x86 }
57
- # - { os: windows-latest, python: '3.8', arch: x86 }
58
- # - { os: windows-latest, python: '3.7', 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-devices' && (github.event_name != 'create' || github.event.ref_type != 'branch')
61
65
steps :
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,37 +110,36 @@ 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
142
+ if : matrix.conda
139
143
uses : actions/upload-artifact@v3
140
144
with :
141
145
name : conda_packages
@@ -161,7 +165,7 @@ jobs:
161
165
if : env.PURE == 'false'
162
166
uses : RalfG/python-wheels-manylinux-build@v0.4.2
163
167
with :
164
- python-versions : ' cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
168
+ python-versions : ' cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 '
165
169
pre-build-command : ' git config --global --add safe.directory "*"'
166
170
167
171
- name : Upload Artifact
@@ -189,45 +193,34 @@ jobs:
189
193
name : conda_packages
190
194
path : ./conda_packages
191
195
192
- - name : Publish on TestPyPI
193
- uses : pypa/gh-action-pypi-publish@release/v1
194
- with :
195
- user : __token__
196
- password : ${{ secrets.testpypi }}
197
- repository_url : https://test.pypi.org/legacy/
198
-
199
196
- name : Get Version Number
200
197
if : github.event.ref_type == 'tag'
201
198
run : |
202
199
VERSION="${GITHUB_REF/refs\/tags\/v/}"
203
200
echo "VERSION=$VERSION" >> $GITHUB_ENV
204
201
205
- - name : Create GitHub Release
202
+ - name : Create GitHub Release and Upload Release Asset
206
203
if : github.event.ref_type == 'tag'
207
- id : create_release
208
- uses : actions/create-release@latest
204
+ uses : softprops/action-gh-release@v1
209
205
env :
210
206
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
211
207
with :
212
208
tag_name : ${{ github.event.ref }}
213
- release_name : ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
209
+ name : ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
214
210
draft : true
215
211
prerelease : ${{ contains(github.event.ref, 'rc') }}
212
+ files : ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
216
213
217
- - name : Upload Release Asset
218
- if : github.event.ref_type == 'tag'
219
- uses : actions/upload-release-asset@v1
220
- env :
221
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
214
+ - name : Publish on TestPyPI
215
+ uses : pypa/gh-action-pypi-publish@release/v1
222
216
with :
223
- upload_url : ${{ steps.create_release.outputs.upload_url }}
224
- asset_path : ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
225
- asset_name : ${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
226
- asset_content_type : application/gzip
217
+ user : __token__
218
+ password : ${{ secrets.testpypi }}
219
+ repository-url : https://test.pypi.org/legacy/
227
220
228
221
- name : Publish on PyPI
229
222
if : github.event.ref_type == 'tag'
230
- uses : pypa/gh-action-pypi-publish@master
223
+ uses : pypa/gh-action-pypi-publish@release/v1
231
224
with :
232
225
user : __token__
233
226
password : ${{ secrets.pypi }}
0 commit comments