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