Skip to content

Commit 5f5cdcb

Browse files
committed
Apply minor modifications to CI workflow
1 parent 056206a commit 5f5cdcb

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: Build
2-
31
on:
42
push:
53
paths:
@@ -17,7 +15,7 @@ on:
1715

1816
jobs:
1917
build_data:
20-
name: Build data packages
18+
name: Build data
2119
strategy:
2220
matrix:
2321
package: [basemap_data, basemap_data_hires]
@@ -30,21 +28,22 @@ jobs:
3028
with:
3129
python-version: "3.9"
3230

33-
- name: Build sdist and wheels
31+
- name: Build data sdist and wheel
3432
run: |
3533
cd packages/${{ matrix.package }}
3634
python -m pip install build wheel
3735
python -m build
3836
39-
- uses: actions/upload-artifact@v4
37+
- name: Upload data sdist and wheel
38+
uses: actions/upload-artifact@v4
4039
with:
4140
path: |
4241
packages/${{ matrix.package }}/dist/*.tar.gz
4342
packages/${{ matrix.package }}/dist/*.whl
4443
name: dist-${{ matrix.package }}
4544

4645
build_sdist:
47-
name: Build basemap sdist
46+
name: Build sdist
4847
runs-on: ubuntu-22.04
4948
steps:
5049
- uses: actions/checkout@v4
@@ -54,19 +53,20 @@ jobs:
5453
with:
5554
python-version: "3.9"
5655

57-
- name: Build sdist
56+
- name: Build basemap sdist
5857
run: |
5958
cd packages/basemap
6059
python -m pip install build
6160
python -m build --sdist
6261
63-
- uses: actions/upload-artifact@v4
62+
- name: Upload basemap sdist
63+
uses: actions/upload-artifact@v4
6464
with:
6565
path: packages/basemap/dist/*.tar.gz
6666
name: dist-basemap-sdist
6767

6868
build_wheels:
69-
name: Build basemap wheels
69+
name: Build wheels
7070
needs: [build_data, build_sdist]
7171
strategy:
7272
matrix:
@@ -93,7 +93,7 @@ jobs:
9393
name: dist-basemap-sdist
9494
path: ./sdist/
9595

96-
- name: Extract sdist (Linux/macOS)
96+
- name: Extract basemap sdist (Linux/macOS)
9797
if: runner.os != 'Windows'
9898
shell: bash
9999
run: |
@@ -112,7 +112,7 @@ jobs:
112112
# Set the environment variable
113113
echo "SDIST_DIR=$(pwd)/${EXTRACTED_DIR}" >> $GITHUB_ENV
114114
115-
- name: Extract sdist (Windows)
115+
- name: Extract basemap sdist (Windows)
116116
if: runner.os == 'Windows'
117117
shell: pwsh
118118
run: |
@@ -132,7 +132,7 @@ jobs:
132132
# Set the environment variable
133133
echo "SDIST_DIR=$extractedDir" | Out-File -FilePath $env:GITHUB_ENV -Append
134134
135-
- name: Build wheels from sdist
135+
- name: Build basemap wheels from sdist
136136
uses: pypa/[email protected]
137137
env:
138138
CIBW_ARCHS: "native"
@@ -160,7 +160,8 @@ jobs:
160160
# folder and we cannot guarantee that wheels can be built
161161
# from the sdist.
162162

163-
- uses: actions/upload-artifact@v4
163+
- name: Upload basemap wheels
164+
uses: actions/upload-artifact@v4
164165
with:
165166
path: dist/*.whl
166167
name: dist-basemap-wheels-${{ matrix.os }}
@@ -170,7 +171,8 @@ jobs:
170171
needs: [build_data, build_sdist, build_wheels]
171172
runs-on: ubuntu-22.04
172173
steps:
173-
- uses: actions/download-artifact@v4
174+
- name: Download basemap and data packages
175+
uses: actions/download-artifact@v4
174176
with:
175177
path: dist
176178
pattern: "dist-*"
@@ -188,8 +190,8 @@ jobs:
188190
python -m twine check dist/*.whl
189191
190192
docs:
191-
name: Build documentation
192-
needs: [build_wheels]
193+
name: Build docs
194+
needs: [check]
193195
runs-on: ubuntu-22.04
194196
steps:
195197
- uses: actions/checkout@v4
@@ -206,14 +208,14 @@ jobs:
206208
pattern: "dist-basemap_data*"
207209
merge-multiple: true
208210

209-
- name: Download basemap wheel for Linux
211+
- name: Download basemap wheels for Linux
210212
uses: actions/download-artifact@v4
211213
with:
212214
path: ./wheels/
213215
pattern: "dist-basemap-wheels-ubuntu-*"
214216
merge-multiple: true
215217

216-
- name: Install packages
218+
- name: Install basemap and data packages
217219
run: |
218220
# Get Python version.
219221
IMPL=cp$(python -c "import sys; print('{0}{1}'.format(*sys.version_info[:2]))")
@@ -253,9 +255,9 @@ jobs:
253255
path: packages/basemap/public
254256

255257
pages:
256-
name: Deploy documentation
258+
name: Deploy docs
257259
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
258-
needs: [docs, check]
260+
needs: [docs]
259261
runs-on: ubuntu-22.04
260262
environment:
261263
name: github-pages
@@ -275,7 +277,8 @@ jobs:
275277
environment: PyPI
276278
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
277279
steps:
278-
- uses: actions/download-artifact@v4
280+
- name: Download basemap and data packages
281+
uses: actions/download-artifact@v4
279282
with:
280283
path: dist
281284
pattern: "dist-*"

0 commit comments

Comments
 (0)