99 tags :
1010 - ' v[0-9]+.[0-9]+.[0-9]+*'
1111
12- defaults :
13- run :
14- shell : bash
15-
1612env :
1713 PACKAGE_NAME : labscript
18- SCM_VERSION_SCHEME : release-branch-semver
1914 SCM_LOCAL_SCHEME : no-local-version
2015 ANACONDA_USER : labscript-suite
2116
@@ -42,26 +37,30 @@ jobs:
4237 strategy :
4338 matrix :
4439 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 }
6059
6160 if : github.repository == 'labscript-suite/labscript' && (github.event_name != 'create' || github.event.ref_type != 'branch')
6261 steps :
6362 - name : Checkout
64- uses : actions/checkout@v2
63+ uses : actions/checkout@v3
6564 with :
6665 fetch-depth : 0
6766
@@ -70,80 +69,74 @@ jobs:
7069 run : git tag -d $(git tag --points-at HEAD)
7170
7271 - name : Install Python
73- uses : actions/setup-python@v2
72+ uses : actions/setup-python@v4
7473 with :
7574 python-version : ${{ matrix.python }}
7675 architecture : ${{ matrix.arch }}
7776
7877 - name : Source Distribution
7978 if : strategy.job-index == 0
8079 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 .
8382
8483 - name : Wheel Distribution
8584 # Impure Linux wheels are built in the manylinux job.
8685 if : (env.PURE == 'true' && strategy.job-index == 0) || (env.PURE == 'false' && runner.os != 'Linux')
8786 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 .
9089
9190 - name : Upload Artifact
9291 if : strategy.job-index == 0 || (env.PURE == 'false' && runner.os != 'Linux')
93- uses : actions/upload-artifact@v2
92+ uses : actions/upload-artifact@v3
9493 with :
9594 name : dist
9695 path : ./dist
9796
9897 - name : Set Variables for Conda Build
98+ shell : bash
9999 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
109100 if [ $NOARCH == true ]; then
110101 CONDA_BUILD_ARGS="--noarch"
111102 else
112103 CONDA_BUILD_ARGS=""
113104 fi
114- echo "CONDA_INSTALLER=$CONDA_INSTALLER" >> $GITHUB_ENV
115105 echo "CONDA_BUILD_ARGS=$CONDA_BUILD_ARGS" >> $GITHUB_ENV
116106
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+
117124 - name : Conda package (Unix)
118125 if : runner.os != 'Windows'
126+ shell : bash -l {0}
119127 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
129129 setuptools-conda build $CONDA_BUILD_ARGS .
130130
131131 - name : Conda Package (Windows)
132132 if : runner.os == 'Windows'
133- shell : cmd
133+ shell : cmd /C CALL {0}
134134 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 .
144137
145138 - name : Upload Artifact
146- uses : actions/upload-artifact@v2
139+ uses : actions/upload-artifact@v3
147140 with :
148141 name : conda_packages
149142 path : ./conda_packages
@@ -152,16 +145,11 @@ jobs:
152145 manylinux :
153146 name : Build Manylinux
154147 runs-on : ubuntu-latest
155- strategy :
156- matrix :
157- include :
158- - { python: 'cp36-cp36m cp37-cp37m cp38-cp38' }
159-
160148 if : github.repository == 'labscript-suite/labscript' && (github.event_name != 'create' || github.event.ref_type != 'branch')
161149 steps :
162150 - name : Checkout
163151 if : env.PURE == 'false'
164- uses : actions/checkout@v2
152+ uses : actions/checkout@v3
165153 with :
166154 fetch-depth : 0
167155
@@ -171,16 +159,17 @@ jobs:
171159
172160 - name : Build Manylinux Wheels
173161 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
175163 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 "*"'
177166
178167 - name : Upload Artifact
179168 if : env.PURE == 'false'
180- uses : actions/upload-artifact@v2
169+ uses : actions/upload-artifact@v3
181170 with :
182171 name : dist
183- path : wheelhouse /*manylinux*.whl
172+ path : dist /*manylinux*.whl
184173
185174 release :
186175 name : Release
@@ -189,19 +178,19 @@ jobs:
189178 steps :
190179
191180 - name : Download Artifact
192- uses : actions/download-artifact@v2
181+ uses : actions/download-artifact@v3
193182 with :
194183 name : dist
195184 path : ./dist
196185
197186 - name : Download Artifact
198- uses : actions/download-artifact@v2
187+ uses : actions/download-artifact@v3
199188 with :
200189 name : conda_packages
201190 path : ./conda_packages
202191
203192 - name : Publish on TestPyPI
204- uses : pypa/gh-action-pypi-publish@master
193+ uses : pypa/gh-action-pypi-publish@release/v1
205194 with :
206195 user : __token__
207196 password : ${{ secrets.testpypi }}
@@ -243,19 +232,19 @@ jobs:
243232 user : __token__
244233 password : ${{ secrets.pypi }}
245234
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
253243
254244 - name : Publish to Anaconda test label
255245 if : github.event.ref_type != 'tag'
246+ shell : bash -l {0}
256247 run : |
257- source .miniconda/etc/profile.d/conda.sh
258- conda activate
259248 anaconda \
260249 --token ${{ secrets.ANACONDA_API_TOKEN }} \
261250 upload \
@@ -264,10 +253,9 @@ jobs:
264253 conda_packages/*/*
265254
266255 - name : Publish to Anaconda main label
256+ shell : bash -l {0}
267257 if : github.event.ref_type == 'tag'
268258 run : |
269- source .miniconda/etc/profile.d/conda.sh
270- conda activate
271259 anaconda \
272260 --token ${{ secrets.ANACONDA_API_TOKEN }} \
273261 upload \
0 commit comments