9
9
tags :
10
10
- ' v[0-9]+.[0-9]+.[0-9]+*'
11
11
12
- defaults :
13
- run :
14
- shell : bash
15
-
16
12
env :
17
13
PACKAGE_NAME : runmanager
18
- SCM_VERSION_SCHEME : release-branch-semver
19
14
SCM_LOCAL_SCHEME : no-local-version
20
15
ANACONDA_USER : labscript-suite
21
16
@@ -42,26 +37,34 @@ jobs:
42
37
strategy :
43
38
matrix :
44
39
include :
45
- - { os: ubuntu-latest, python: 3.8, arch: x64 }
46
- # - { os: ubuntu-latest, python: 3.7, arch: x64 }
47
- # - { os: ubuntu-latest, python: 3.6, arch: x64 }
48
-
49
- # - { os: macos-latest, python: 3.8, arch: x64 }
50
- # - { os: macos-latest, python: 3.7, arch: x64 }
51
- # - { os: macos-latest, python: 3.6, arch: x64 }
52
-
53
- # - { os: windows-latest, python: 3.8, arch: x64 }
54
- # - { os: windows-latest, python: 3.7, arch: x64 }
55
- # - { os: windows-latest, python: 3.6, arch: x64 }
56
-
57
- # - { os: windows-latest, python: 3.8, arch: x86 }
58
- # - { os: windows-latest, python: 3.7, arch: x86 }
59
- # - { 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 }
60
63
61
64
if : github.repository == 'labscript-suite/runmanager' && (github.event_name != 'create' || github.event.ref_type != 'branch')
62
65
steps :
63
66
- name : Checkout
64
- uses : actions/checkout@v2
67
+ uses : actions/checkout@v3
65
68
with :
66
69
fetch-depth : 0
67
70
@@ -70,80 +73,74 @@ jobs:
70
73
run : git tag -d $(git tag --points-at HEAD)
71
74
72
75
- name : Install Python
73
- uses : actions/setup-python@v2
76
+ uses : actions/setup-python@v4
74
77
with :
75
78
python-version : ${{ matrix.python }}
76
79
architecture : ${{ matrix.arch }}
77
80
78
81
- name : Source Distribution
79
82
if : strategy.job-index == 0
80
83
run : |
81
- python -m pip install --upgrade pip setuptools wheel pep517
82
- python -m pep517. build -s .
84
+ python -m pip install --upgrade pip setuptools wheel build
85
+ python -m build -s .
83
86
84
87
- name : Wheel Distribution
85
88
# Impure Linux wheels are built in the manylinux job.
86
89
if : (env.PURE == 'true' && strategy.job-index == 0) || (env.PURE == 'false' && runner.os != 'Linux')
87
90
run : |
88
- python -m pip install --upgrade pip setuptools wheel pep517
89
- python -m pep517. build -b .
91
+ python -m pip install --upgrade pip setuptools wheel build
92
+ python -m build -w .
90
93
91
94
- name : Upload Artifact
92
95
if : strategy.job-index == 0 || (env.PURE == 'false' && runner.os != 'Linux')
93
- uses : actions/upload-artifact@v2
96
+ uses : actions/upload-artifact@v3
94
97
with :
95
98
name : dist
96
99
path : ./dist
97
100
98
101
- name : Set Variables for Conda Build
102
+ if : matrix.conda
103
+ shell : bash
99
104
run : |
100
- if [ $RUNNER_OS == Windows ] && [ ${{ matrix.arch }} == x64 ]; then
101
- CONDA_INSTALLER=Miniconda3-latest-Windows-x86_64.exe
102
- elif [ $RUNNER_OS == Windows ]; then
103
- CONDA_INSTALLER=Miniconda3-latest-Windows-x86.exe
104
- elif [ $RUNNER_OS == Linux ]; then
105
- CONDA_INSTALLER=Miniconda3-latest-Linux-x86_64.sh
106
- else
107
- CONDA_INSTALLER=Miniconda3-latest-MacOSX-x86_64.sh
108
- fi
109
105
if [ $NOARCH == true ]; then
110
106
CONDA_BUILD_ARGS="--noarch"
111
107
else
112
108
CONDA_BUILD_ARGS=""
113
109
fi
114
- echo "CONDA_INSTALLER=$CONDA_INSTALLER" >> $GITHUB_ENV
115
110
echo "CONDA_BUILD_ARGS=$CONDA_BUILD_ARGS" >> $GITHUB_ENV
116
111
112
+ - name : Install Miniconda
113
+ if : matrix.conda
114
+ uses : conda-incubator/setup-miniconda@v2
115
+ with :
116
+ auto-update-conda : true
117
+ python-version : ${{ matrix.python }}
118
+ architecture : ${{ matrix.arch }}
119
+ miniconda-version : " latest"
120
+
121
+ - name : Workaround conda-build incompatibility with xcode 12+
122
+ if : runner.os == 'macOS'
123
+ uses : maxim-lobanov/setup-xcode@v1
124
+ with :
125
+ xcode-version : 11.7
126
+
117
127
- name : Conda package (Unix)
118
- if : runner.os != 'Windows'
128
+ if : (matrix.conda && runner.os != 'Windows')
129
+ shell : bash -l {0}
119
130
run : |
120
- curl -LO https://repo.continuum.io/miniconda/$CONDA_INSTALLER
121
- bash "$CONDA_INSTALLER" -b -p .miniconda
122
- source .miniconda/etc/profile.d/conda.sh
123
- conda activate
124
- conda update -n base -c defaults conda
125
- conda create -n py${{ matrix.python }} python=${{ matrix.python }}
126
- conda activate py${{ matrix.python }}
127
- conda install -c cbillington setuptools-conda
128
- pip install --upgrade setuptools_scm
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'
133
- shell : cmd
135
+ if : (matrix.conda && runner.os == 'Windows')
136
+ shell : cmd /C CALL {0}
134
137
run : |
135
- curl -LO https://repo.continuum.io/miniconda/%CONDA_INSTALLER%
136
- %CONDA_INSTALLER% /S /D=%CD%\.miniconda && ^
137
- .miniconda\Scripts\activate && ^
138
- conda update -n base -c defaults conda && ^
139
- conda create -n py${{ matrix.python }} python=${{ matrix.python }} && ^
140
- conda activate py${{ matrix.python }} && ^
141
- conda install -c cbillington setuptools-conda && ^
142
- pip install --upgrade setuptools_scm && ^
143
- setuptools-conda build %CONDA_BUILD_ARGS% .
138
+ conda install -c labscript-suite setuptools-conda && ^
139
+ setuptools-conda build %CONDA_BUILD_ARGS% --croot ${{ runner.temp }}\cb .
144
140
145
141
- name : Upload Artifact
146
- uses : actions/upload-artifact@v2
142
+ if : matrix.conda
143
+ uses : actions/upload-artifact@v3
147
144
with :
148
145
name : conda_packages
149
146
path : ./conda_packages
@@ -152,16 +149,11 @@ jobs:
152
149
manylinux :
153
150
name : Build Manylinux
154
151
runs-on : ubuntu-latest
155
- strategy :
156
- matrix :
157
- include :
158
- - { python: 'cp36-cp36m cp37-cp37m cp38-cp38' }
159
-
160
152
if : github.repository == 'labscript-suite/runmanager' && (github.event_name != 'create' || github.event.ref_type != 'branch')
161
153
steps :
162
154
- name : Checkout
163
155
if : env.PURE == 'false'
164
- uses : actions/checkout@v2
156
+ uses : actions/checkout@v3
165
157
with :
166
158
fetch-depth : 0
167
159
@@ -171,16 +163,17 @@ jobs:
171
163
172
164
- name : Build Manylinux Wheels
173
165
if : env.PURE == 'false'
174
- uses : RalfG/python-wheels-manylinux-build@v0.2.2-manylinux2010_x86_64
166
+ uses : RalfG/python-wheels-manylinux-build@v0.4.2
175
167
with :
176
- 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 "*"'
177
170
178
171
- name : Upload Artifact
179
172
if : env.PURE == 'false'
180
- uses : actions/upload-artifact@v2
173
+ uses : actions/upload-artifact@v3
181
174
with :
182
175
name : dist
183
- path : wheelhouse /*manylinux*.whl
176
+ path : dist /*manylinux*.whl
184
177
185
178
release :
186
179
name : Release
@@ -189,73 +182,62 @@ jobs:
189
182
steps :
190
183
191
184
- name : Download Artifact
192
- uses : actions/download-artifact@v2
185
+ uses : actions/download-artifact@v3
193
186
with :
194
187
name : dist
195
188
path : ./dist
196
189
197
190
- name : Download Artifact
198
- uses : actions/download-artifact@v2
191
+ uses : actions/download-artifact@v3
199
192
with :
200
193
name : conda_packages
201
194
path : ./conda_packages
202
195
203
- - name : Publish on TestPyPI
204
- uses : pypa/gh-action-pypi-publish@master
205
- with :
206
- user : __token__
207
- password : ${{ secrets.testpypi }}
208
- repository_url : https://test.pypi.org/legacy/
209
-
210
196
- name : Get Version Number
211
197
if : github.event.ref_type == 'tag'
212
198
run : |
213
199
VERSION="${GITHUB_REF/refs\/tags\/v/}"
214
200
echo "VERSION=$VERSION" >> $GITHUB_ENV
215
201
216
- - name : Create GitHub Release
202
+ - name : Create GitHub Release and Upload Release Asset
217
203
if : github.event.ref_type == 'tag'
218
- id : create_release
219
- uses : actions/create-release@latest
204
+ uses : softprops/action-gh-release@v1
220
205
env :
221
206
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
222
207
with :
223
208
tag_name : ${{ github.event.ref }}
224
- release_name : ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
209
+ name : ${{ env.PACKAGE_NAME }} ${{ env.VERSION }}
225
210
draft : true
226
211
prerelease : ${{ contains(github.event.ref, 'rc') }}
212
+ files : ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
227
213
228
- - name : Upload Release Asset
229
- if : github.event.ref_type == 'tag'
230
- uses : actions/upload-release-asset@v1
231
- env :
232
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
214
+ - name : Publish on TestPyPI
215
+ uses : pypa/gh-action-pypi-publish@release/v1
233
216
with :
234
- upload_url : ${{ steps.create_release.outputs.upload_url }}
235
- asset_path : ./dist/${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
236
- asset_name : ${{ env.PACKAGE_NAME }}-${{ env.VERSION }}.tar.gz
237
- asset_content_type : application/gzip
217
+ user : __token__
218
+ password : ${{ secrets.testpypi }}
219
+ repository-url : https://test.pypi.org/legacy/
238
220
239
221
- name : Publish on PyPI
240
222
if : github.event.ref_type == 'tag'
241
- uses : pypa/gh-action-pypi-publish@master
223
+ uses : pypa/gh-action-pypi-publish@release/v1
242
224
with :
243
225
user : __token__
244
226
password : ${{ secrets.pypi }}
245
227
246
- - name : Install Miniconda and cloud client
247
- run : |
248
- curl -LO https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
249
- bash Miniconda3-latest-Linux-x86_64.sh -b -p .miniconda
250
- source .miniconda/etc/profile.d/conda.sh
251
- conda activate
252
- conda install anaconda-client
228
+ - name : Install Miniconda
229
+ uses : conda-incubator/setup-miniconda@v2
230
+ with :
231
+ auto-update-conda : true
232
+
233
+ - name : Install Anaconda cloud client
234
+ shell : bash -l {0}
235
+ run : conda install anaconda-client
253
236
254
237
- name : Publish to Anaconda test label
255
238
if : github.event.ref_type != 'tag'
239
+ shell : bash -l {0}
256
240
run : |
257
- source .miniconda/etc/profile.d/conda.sh
258
- conda activate
259
241
anaconda \
260
242
--token ${{ secrets.ANACONDA_API_TOKEN }} \
261
243
upload \
@@ -264,10 +246,9 @@ jobs:
264
246
conda_packages/*/*
265
247
266
248
- name : Publish to Anaconda main label
249
+ shell : bash -l {0}
267
250
if : github.event.ref_type == 'tag'
268
251
run : |
269
- source .miniconda/etc/profile.d/conda.sh
270
- conda activate
271
252
anaconda \
272
253
--token ${{ secrets.ANACONDA_API_TOKEN }} \
273
254
upload \
0 commit comments