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
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,30 @@ 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.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 }
60
59
61
60
if : github.repository == 'labscript-suite/labscript' && (github.event_name != 'create' || github.event.ref_type != 'branch')
62
61
steps :
63
62
- name : Checkout
64
- uses : actions/checkout@v2
63
+ uses : actions/checkout@v3
65
64
with :
66
65
fetch-depth : 0
67
66
@@ -70,80 +69,74 @@ jobs:
70
69
run : git tag -d $(git tag --points-at HEAD)
71
70
72
71
- name : Install Python
73
- uses : actions/setup-python@v2
72
+ uses : actions/setup-python@v4
74
73
with :
75
74
python-version : ${{ matrix.python }}
76
75
architecture : ${{ matrix.arch }}
77
76
78
77
- name : Source Distribution
79
78
if : strategy.job-index == 0
80
79
run : |
81
- python -m pip install --upgrade pip setuptools wheel pep517
82
- python -m pep517. build -s .
80
+ python -m pip install --upgrade pip setuptools wheel build
81
+ python -m build -s .
83
82
84
83
- name : Wheel Distribution
85
84
# Impure Linux wheels are built in the manylinux job.
86
85
if : (env.PURE == 'true' && strategy.job-index == 0) || (env.PURE == 'false' && runner.os != 'Linux')
87
86
run : |
88
- python -m pip install --upgrade pip setuptools wheel pep517
89
- python -m pep517. build -b .
87
+ python -m pip install --upgrade pip setuptools wheel build
88
+ python -m build -w .
90
89
91
90
- name : Upload Artifact
92
91
if : strategy.job-index == 0 || (env.PURE == 'false' && runner.os != 'Linux')
93
- uses : actions/upload-artifact@v2
92
+ uses : actions/upload-artifact@v3
94
93
with :
95
94
name : dist
96
95
path : ./dist
97
96
98
97
- name : Set Variables for Conda Build
98
+ shell : bash
99
99
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
100
if [ $NOARCH == true ]; then
110
101
CONDA_BUILD_ARGS="--noarch"
111
102
else
112
103
CONDA_BUILD_ARGS=""
113
104
fi
114
- echo "CONDA_INSTALLER=$CONDA_INSTALLER" >> $GITHUB_ENV
115
105
echo "CONDA_BUILD_ARGS=$CONDA_BUILD_ARGS" >> $GITHUB_ENV
116
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
+
117
124
- name : Conda package (Unix)
118
125
if : runner.os != 'Windows'
126
+ shell : bash -l {0}
119
127
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
128
+ conda install -c labscript-suite setuptools-conda
129
129
setuptools-conda build $CONDA_BUILD_ARGS .
130
130
131
131
- name : Conda Package (Windows)
132
132
if : runner.os == 'Windows'
133
- shell : cmd
133
+ shell : cmd /C CALL {0}
134
134
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% .
135
+ conda install -c labscript-suite setuptools-conda && ^
136
+ setuptools-conda build %CONDA_BUILD_ARGS% --croot ${{ runner.temp }}\cb .
144
137
145
138
- name : Upload Artifact
146
- uses : actions/upload-artifact@v2
139
+ uses : actions/upload-artifact@v3
147
140
with :
148
141
name : conda_packages
149
142
path : ./conda_packages
@@ -152,16 +145,11 @@ jobs:
152
145
manylinux :
153
146
name : Build Manylinux
154
147
runs-on : ubuntu-latest
155
- strategy :
156
- matrix :
157
- include :
158
- - { python: 'cp36-cp36m cp37-cp37m cp38-cp38' }
159
-
160
148
if : github.repository == 'labscript-suite/labscript' && (github.event_name != 'create' || github.event.ref_type != 'branch')
161
149
steps :
162
150
- name : Checkout
163
151
if : env.PURE == 'false'
164
- uses : actions/checkout@v2
152
+ uses : actions/checkout@v3
165
153
with :
166
154
fetch-depth : 0
167
155
@@ -171,16 +159,17 @@ jobs:
171
159
172
160
- name : Build Manylinux Wheels
173
161
if : env.PURE == 'false'
174
- uses : RalfG/python-wheels-manylinux-build@v0.2.2-manylinux2010_x86_64
162
+ uses : RalfG/python-wheels-manylinux-build@v0.4.2
175
163
with :
176
- 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 "*"'
177
166
178
167
- name : Upload Artifact
179
168
if : env.PURE == 'false'
180
- uses : actions/upload-artifact@v2
169
+ uses : actions/upload-artifact@v3
181
170
with :
182
171
name : dist
183
- path : wheelhouse /*manylinux*.whl
172
+ path : dist /*manylinux*.whl
184
173
185
174
release :
186
175
name : Release
@@ -189,19 +178,19 @@ jobs:
189
178
steps :
190
179
191
180
- name : Download Artifact
192
- uses : actions/download-artifact@v2
181
+ uses : actions/download-artifact@v3
193
182
with :
194
183
name : dist
195
184
path : ./dist
196
185
197
186
- name : Download Artifact
198
- uses : actions/download-artifact@v2
187
+ uses : actions/download-artifact@v3
199
188
with :
200
189
name : conda_packages
201
190
path : ./conda_packages
202
191
203
192
- name : Publish on TestPyPI
204
- uses : pypa/gh-action-pypi-publish@master
193
+ uses : pypa/gh-action-pypi-publish@release/v1
205
194
with :
206
195
user : __token__
207
196
password : ${{ secrets.testpypi }}
@@ -243,19 +232,19 @@ jobs:
243
232
user : __token__
244
233
password : ${{ secrets.pypi }}
245
234
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
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
253
243
254
244
- name : Publish to Anaconda test label
255
245
if : github.event.ref_type != 'tag'
246
+ shell : bash -l {0}
256
247
run : |
257
- source .miniconda/etc/profile.d/conda.sh
258
- conda activate
259
248
anaconda \
260
249
--token ${{ secrets.ANACONDA_API_TOKEN }} \
261
250
upload \
@@ -264,10 +253,9 @@ jobs:
264
253
conda_packages/*/*
265
254
266
255
- name : Publish to Anaconda main label
256
+ shell : bash -l {0}
267
257
if : github.event.ref_type == 'tag'
268
258
run : |
269
- source .miniconda/etc/profile.d/conda.sh
270
- conda activate
271
259
anaconda \
272
260
--token ${{ secrets.ANACONDA_API_TOKEN }} \
273
261
upload \
0 commit comments