Skip to content

Commit 4ad8459

Browse files
committed
Apply general refactoring to workflow files
1 parent 4b1070c commit 4ad8459

File tree

3 files changed

+61
-53
lines changed

3 files changed

+61
-53
lines changed

.github/workflows/basemap-data-hires.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ on:
1010
jobs:
1111

1212
build:
13-
runs-on: ubuntu-latest
1413
strategy:
1514
matrix:
1615
python-version:
1716
[
1817
"2.7",
1918
]
2019
max-parallel: 1
20+
runs-on: ubuntu-latest
2121
container: "pylegacy/python:${{ matrix.python-version }}-debian-4"
2222
steps:
2323
-
@@ -37,15 +37,13 @@ jobs:
3737
cd ${{ env.PKGDIR }}
3838
python setup.py sdist bdist_wheel --universal
3939
-
40-
name: Upload artifacts
40+
name: Upload build artifacts
4141
uses: actions/upload-artifact@v1
4242
with:
4343
name: artifacts-build
4444
path: ${{ env.PKGDIR }}/dist
4545

4646
test:
47-
needs: build
48-
runs-on: ubuntu-latest
4947
strategy:
5048
matrix:
5149
python-version:
@@ -62,13 +60,15 @@ jobs:
6260
"3.9",
6361
]
6462
max-parallel: 5
63+
needs: build
64+
runs-on: ubuntu-latest
6565
container: "pylegacy/python:${{ matrix.python-version }}-debian-5"
6666
steps:
6767
-
6868
name: Checkout
6969
uses: actions/checkout@v1
7070
-
71-
name: Download artifacts
71+
name: Download build artifacts
7272
uses: actions/download-artifact@v1
7373
with:
7474
name: artifacts-build
@@ -93,24 +93,24 @@ jobs:
9393
python -c "from mpl_toolkits import basemap_data; print(basemap_data)"
9494
9595
upload:
96-
if: startsWith(github.event.ref, 'refs/tags/v')
97-
needs: test
98-
runs-on: ubuntu-latest
9996
strategy:
10097
matrix:
10198
python-version:
10299
[
103100
"2.7",
104101
]
105102
max-parallel: 1
103+
if: startsWith(github.event.ref, 'refs/tags/v')
104+
needs: test
105+
runs-on: ubuntu-latest
106106
container: "pylegacy/python:${{ matrix.python-version }}-debian-5"
107107
environment: PyPI
108108
steps:
109109
-
110110
name: Checkout
111111
uses: actions/checkout@v1
112112
-
113-
name: Download artifacts
113+
name: Download build artifacts
114114
uses: actions/download-artifact@v1
115115
with:
116116
name: artifacts-build
@@ -136,5 +136,9 @@ jobs:
136136
run: |
137137
set -e
138138
. /etc/profile
139-
python -m twine check ${{ env.PKGDIR }}/dist/*
140-
python -m twine upload --skip-existing ${{ env.PKGDIR }}/dist/*
139+
python -m twine check \
140+
${{ env.PKGDIR }}/dist/*.tar.gz \
141+
${{ env.PKGDIR }}/dist/*.whl
142+
python -m twine upload --skip-existing \
143+
${{ env.PKGDIR }}/dist/*.tar.gz \
144+
${{ env.PKGDIR }}/dist/*.whl

.github/workflows/basemap-data.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ on:
1010
jobs:
1111

1212
build:
13-
runs-on: ubuntu-latest
1413
strategy:
1514
matrix:
1615
python-version:
1716
[
1817
"2.7",
1918
]
2019
max-parallel: 1
20+
runs-on: ubuntu-latest
2121
container: "pylegacy/python:${{ matrix.python-version }}-debian-4"
2222
steps:
2323
-
@@ -37,15 +37,13 @@ jobs:
3737
cd ${{ env.PKGDIR }}
3838
python setup.py sdist bdist_wheel --universal
3939
-
40-
name: Upload artifacts
40+
name: Upload build artifacts
4141
uses: actions/upload-artifact@v1
4242
with:
4343
name: artifacts-build
4444
path: ${{ env.PKGDIR }}/dist
4545

4646
test:
47-
needs: build
48-
runs-on: ubuntu-latest
4947
strategy:
5048
matrix:
5149
python-version:
@@ -62,13 +60,15 @@ jobs:
6260
"3.9",
6361
]
6462
max-parallel: 5
63+
needs: build
64+
runs-on: ubuntu-latest
6565
container: "pylegacy/python:${{ matrix.python-version }}-debian-5"
6666
steps:
6767
-
6868
name: Checkout
6969
uses: actions/checkout@v1
7070
-
71-
name: Download artifacts
71+
name: Download build artifacts
7272
uses: actions/download-artifact@v1
7373
with:
7474
name: artifacts-build
@@ -93,24 +93,24 @@ jobs:
9393
python -c "from mpl_toolkits import basemap_data; print(basemap_data)"
9494
9595
upload:
96-
if: startsWith(github.event.ref, 'refs/tags/v')
97-
needs: test
98-
runs-on: ubuntu-latest
9996
strategy:
10097
matrix:
10198
python-version:
10299
[
103100
"2.7",
104101
]
105102
max-parallel: 1
103+
if: startsWith(github.event.ref, 'refs/tags/v')
104+
needs: test
105+
runs-on: ubuntu-latest
106106
container: "pylegacy/python:${{ matrix.python-version }}-debian-5"
107107
environment: PyPI
108108
steps:
109109
-
110110
name: Checkout
111111
uses: actions/checkout@v1
112112
-
113-
name: Download artifacts
113+
name: Download build artifacts
114114
uses: actions/download-artifact@v1
115115
with:
116116
name: artifacts-build
@@ -136,5 +136,9 @@ jobs:
136136
run: |
137137
set -e
138138
. /etc/profile
139-
python -m twine check ${{ env.PKGDIR }}/dist/*
140-
python -m twine upload --skip-existing ${{ env.PKGDIR }}/dist/*
139+
python -m twine check \
140+
${{ env.PKGDIR }}/dist/*.tar.gz \
141+
${{ env.PKGDIR }}/dist/*.whl
142+
python -m twine upload --skip-existing \
143+
${{ env.PKGDIR }}/dist/*.tar.gz \
144+
${{ env.PKGDIR }}/dist/*.whl

.github/workflows/basemap.yml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
max-parallel: 2
2121
fail-fast: false
2222
runs-on: ubuntu-latest
23-
container: "tinybases/${{matrix.arch}}-python:3.6-debian-4"
23+
container: "tinybases/${{ matrix.arch }}-python:3.6-debian-4"
2424
steps:
2525
-
2626
name: Checkout
@@ -35,7 +35,7 @@ jobs:
3535
pkgvers=3.6.2
3636
pkgname=cmake
3737
pkgcode=cmake-${pkgvers}
38-
case "${{matrix.arch}}" in
38+
case "${{ matrix.arch }}" in
3939
amd64) pkgfile=${pkgcode}-Linux-x86_64.tar.gz;;
4040
*) pkgfile=${pkgcode}-Linux-i386.tar.gz;;
4141
esac
@@ -57,15 +57,15 @@ jobs:
5757
run: |
5858
set -e
5959
. /etc/profile
60-
cd ${{env.PKGDIR}}
60+
cd ${{ env.PKGDIR }}
6161
export MAKEFLAGS="-j 16"
6262
python -c "import utils; utils.GeosLibrary('3.6.5').build('extern')"
6363
-
6464
name: Upload GEOS artifacts
6565
uses: actions/upload-artifact@v1
6666
with:
67-
name: artifacts-geos-${{matrix.arch}}
68-
path: ${{env.PKGDIR}}/extern
67+
name: artifacts-geos-${{ matrix.arch }}
68+
path: ${{ env.PKGDIR }}/extern
6969

7070
build:
7171
strategy:
@@ -88,7 +88,7 @@ jobs:
8888
fail-fast: false
8989
needs: build-geos
9090
runs-on: ubuntu-latest
91-
container: "tinybases/${{matrix.arch}}-python:${{matrix.python-version}}-debian-4"
91+
container: "tinybases/${{ matrix.arch }}-python:${{ matrix.python-version }}-debian-4"
9292
steps:
9393
-
9494
name: Checkout
@@ -97,8 +97,8 @@ jobs:
9797
name: Download GEOS artifacts
9898
uses: actions/download-artifact@v1
9999
with:
100-
name: artifacts-geos-${{matrix.arch}}
101-
path: ${{env.PKGDIR}}/extern
100+
name: artifacts-geos-${{ matrix.arch }}
101+
path: ${{ env.PKGDIR }}/extern
102102
-
103103
name: Install GCC toolchain
104104
run: |
@@ -119,7 +119,7 @@ jobs:
119119
run: |
120120
set -e
121121
. /etc/profile
122-
case "${{matrix.python-version}}" in
122+
case "${{ matrix.python-version }}" in
123123
2.[67]|3.[01234]) pkgvers=1.11.3;;
124124
*) pkgvers=1.16.6;;
125125
esac
@@ -132,14 +132,14 @@ jobs:
132132
python setup.py build -j 2
133133
cp build/src*/numpy/core/include/numpy/*.h numpy/core/include/numpy/
134134
cd ..
135-
cp -R ${pkgcode}/numpy/core/include ${{env.PKGDIR}}/extern
135+
cp -R ${pkgcode}/numpy/core/include ${{ env.PKGDIR }}/extern
136136
rm -rf ${pkgcode}
137137
-
138138
name: Build wheel
139139
run: |
140140
set -e
141141
. /etc/profile
142-
cd ${{env.PKGDIR}}
142+
cd ${{ env.PKGDIR }}
143143
export GEOS_DIR=extern
144144
export NUMPY_INCLUDE_PATH=extern/include
145145
pip install -r requirements-setup.txt
@@ -148,8 +148,8 @@ jobs:
148148
name: Upload build artifacts
149149
uses: actions/upload-artifact@v1
150150
with:
151-
name: artifacts-build-${{matrix.arch}}-${{matrix.python-version}}
152-
path: ${{env.PKGDIR}}/dist
151+
name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
152+
path: ${{ env.PKGDIR }}/dist
153153

154154
repair:
155155
strategy:
@@ -172,7 +172,7 @@ jobs:
172172
fail-fast: false
173173
needs: build
174174
runs-on: ubuntu-latest
175-
container: "tinybases/${{matrix.arch}}-python:3.6-debian-5"
175+
container: "tinybases/${{ matrix.arch }}-python:3.6-debian-5"
176176
steps:
177177
-
178178
name: Checkout
@@ -181,14 +181,14 @@ jobs:
181181
name: Download GEOS artifacts
182182
uses: actions/download-artifact@v1
183183
with:
184-
name: artifacts-geos-${{matrix.arch}}
185-
path: ${{env.PKGDIR}}/extern
184+
name: artifacts-geos-${{ matrix.arch }}
185+
path: ${{ env.PKGDIR }}/extern
186186
-
187187
name: Download build artifacts
188188
uses: actions/download-artifact@v1
189189
with:
190-
name: artifacts-build-${{matrix.arch}}-${{matrix.python-version}}
191-
path: ${{env.PKGDIR}}/dist
190+
name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
191+
path: ${{ env.PKGDIR }}/dist
192192
-
193193
name: Install GCC toolchain
194194
run: |
@@ -243,15 +243,15 @@ jobs:
243243
run: |
244244
set -e
245245
. /etc/profile
246-
cd ${{env.PKGDIR}}
246+
cd ${{ env.PKGDIR }}
247247
export LD_LIBRARY_PATH="$(readlink -f extern/lib)"
248248
auditwheel repair -w dist dist/*.whl
249249
-
250-
name: Upload artifacts
250+
name: Upload build artifacts
251251
uses: actions/upload-artifact@v1
252252
with:
253-
name: artifacts-build-${{matrix.arch}}-${{matrix.python-version}}
254-
path: ${{env.PKGDIR}}/dist
253+
name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
254+
path: ${{ env.PKGDIR }}/dist
255255

256256
upload:
257257
strategy:
@@ -274,7 +274,7 @@ jobs:
274274
if: startsWith(github.event.ref, 'refs/tags/v')
275275
needs: repair
276276
runs-on: ubuntu-latest
277-
container: "tinybases/${{matrix.arch}}-python:${{matrix.python-version}}-debian-5"
277+
container: "tinybases/${{ matrix.arch }}-python:${{ matrix.python-version }}-debian-5"
278278
environment: PyPI
279279
steps:
280280
-
@@ -284,8 +284,8 @@ jobs:
284284
name: Download build artifacts
285285
uses: actions/download-artifact@v1
286286
with:
287-
name: artifacts-build-${{matrix.arch}}-${{matrix.python-version}}
288-
path: ${{env.PKGDIR}}/dist
287+
name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
288+
path: ${{ env.PKGDIR }}/dist
289289
-
290290
name: Print environment
291291
run: |
@@ -302,14 +302,14 @@ jobs:
302302
name: Upload distributables
303303
env:
304304
TWINE_USERNAME: __token__
305-
TWINE_PASSWORD: "${{secrets.PYPI_TOKEN}}"
306-
TWINE_REPOSITORY_URL: "${{secrets.PYPI_REPOSITORY_URL}}"
305+
TWINE_PASSWORD: "${{ secrets.PYPI_TOKEN }}"
306+
TWINE_REPOSITORY_URL: "${{ secrets.PYPI_REPOSITORY_URL }}"
307307
run: |
308308
set -e
309309
. /etc/profile
310310
python -m twine check \
311-
${{env.PKGDIR}}/dist/*.tar.gz \
312-
${{env.PKGDIR}}/dist/*-manylinux1*.whl
311+
${{ env.PKGDIR }}/dist/*.tar.gz \
312+
${{ env.PKGDIR }}/dist/*-manylinux1*.whl
313313
python -m twine upload --skip-existing \
314-
${{env.PKGDIR}}/dist/*.tar.gz \
315-
${{env.PKGDIR}}/dist/*-manylinux1*.whl
314+
${{ env.PKGDIR }}/dist/*.tar.gz \
315+
${{ env.PKGDIR }}/dist/*-manylinux1*.whl

0 commit comments

Comments
 (0)