Skip to content

Commit 11e105a

Browse files
committed
Simplify docs job
1 parent 30d89fd commit 11e105a

File tree

1 file changed

+18
-30
lines changed

1 file changed

+18
-30
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -223,62 +223,50 @@ jobs:
223223
with:
224224
python-version: "3.9"
225225

226-
- name: Download basemap wheel for Linux
227-
uses: actions/download-artifact@v4
228-
with:
229-
name: dist-basemap-wheels-ubuntu-22.04
230-
path: ./wheels/
231-
232226
- name: Download data packages
233227
uses: actions/download-artifact@v4
234228
with:
235229
pattern: dist-basemap_data*
236230
path: ./data_packages/
237231
merge-multiple: true
238232

233+
- name: Download basemap wheel for Linux
234+
uses: actions/download-artifact@v4
235+
with:
236+
name: dist-basemap-wheels-ubuntu-*
237+
path: ./wheels/
238+
239239
- name: Install packages
240240
run: |
241-
# Get Python version
242-
PY_VER=$(python -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")
243-
echo "Using Python $PY_VER"
241+
# Get Python version.
242+
IMPL=cp$(python -c "import sys; '{0}{1}'.format(*sys.version_info[:2])")
244243
245-
# List available wheels
246-
echo "Available wheels:"
247-
ls -la ./wheels/
248-
249-
# Find wheel matching current Python version
250-
MATCHING_WHEEL=$(find ./wheels -name "*-cp${PY_VER}-cp${PY_VER}*" | head -1)
251-
252-
if [ -n "$MATCHING_WHEEL" ]; then
253-
echo "Installing matching wheel: $MATCHING_WHEEL"
254-
python -m pip install "$MATCHING_WHEEL"
244+
# Install basemap wheel matching current Python version.
245+
WHEEL=$(find ./wheels -name "*-${IMPL}-${IMPL}*.whl" | head -1)
246+
if [ -n "${WHEEL}" ]; then
247+
python -m pip install "${WHEEL}"
255248
else
256-
echo "No matching wheel found for Python $PY_VER. Installing any available wheel..."
257-
python -m pip install ./wheels/*.whl
249+
echo "No matching wheel found for ${IMPL}-${IMPL}"
250+
exit 1
258251
fi
259252
260-
# Install data packages
261-
echo "Installing data packages:"
262-
ls -la ./data_packages/
253+
# Install basemap data packages.
263254
python -m pip install ./data_packages/*.whl
264255
265-
# Verify installation
266-
python -c "import mpl_toolkits.basemap; print('Basemap version:', mpl_toolkits.basemap.__version__)"
267-
268-
- name: Install documentation requirements
256+
- name: Install docs requirements
269257
run: |
270258
cd packages/basemap
271259
python -m pip install -r requirements-doc.txt
272260
273-
- name: Build documentation
261+
- name: Run sphinx
274262
run: |
275263
cd packages/basemap
276264
python -m sphinx doc/source public
277265
278266
- name: Upload docs artifacts
279267
uses: actions/upload-artifact@v4
280268
with:
281-
name: docs-artifact
269+
name: docs
282270
path: packages/basemap/public
283271

284272
- name: Upload github-pages artifact

0 commit comments

Comments
 (0)