1111 paths :
1212 - " .github/workflows/**"
1313 - " packages/basemap/**"
14- - " packages/basemap_data/**"
15- - " packages/basemap_data_hires/**"
1614 pull_request :
1715 paths :
1816 - " .github/workflows/**"
1917 - " packages/basemap/**"
20- - " packages/basemap_data/**"
21- - " packages/basemap_data_hires/**"
2218 workflow_dispatch :
2319
2420jobs :
3228 steps :
3329 - uses : actions/checkout@v4
3430
31+ - name : Install GEOS (Linux)
32+ if : runner.os == 'Linux'
33+ run : |
34+ sudo apt-get update
35+ sudo apt-get install -y software-properties-common
36+ sudo add-apt-repository ppa:ubuntugis/ppa
37+ sudo apt-get update
38+ sudo apt-get install -y libgeos-dev
39+
40+ - name : Install GEOS (Windows)
41+ if : runner.os == 'Windows'
42+ run : |
43+ choco install geos
44+
45+ - name : Install GEOS (macOS)
46+ if : runner.os == 'macOS'
47+ run : |
48+ brew install geos
49+
3550 - name : Set up Python
3651 uses : actions/setup-python@v4
3752 with :
@@ -42,25 +57,13 @@ jobs:
4257
4358 - name : Build wheels
4459 env :
45- CIBW_SKIP : " pp* *-musllinux*" # Skip PyPy and musllinux
46- CIBW_BEFORE_ALL : >
47- if [ "$runner_os" == "linux" ]; then
48- sudo apt-get update &&
49- sudo apt-get install -y software-properties-common &&
50- sudo add-apt-repository ppa:ubuntugis/ppa &&
51- sudo apt-get update &&
52- sudo apt-get install -y libgeos-dev
53- elif [ "$runner_os" == "windows" ]; then
54- choco install geos
55- elif [ "$runner_os" == "macos" ]; then
56- brew install geos
57- fi
60+ CIBW_SKIP : " pp* *-musllinux*"
5861 CIBW_BEFORE_BUILD : >
5962 pip install --upgrade pip &&
6063 pip install numpy>=1.21.4 cython>=0.29.21 &&
6164 python -c "import utils; utils.GeosLibrary('3.6.5').build('extern', njobs=16)"
6265 CIBW_ENVIRONMENT : >
63- GEOS_DIR=/ project/packages/basemap /extern
66+ GEOS_DIR={ project} /extern
6467 SETUPTOOLS_USE_DISTUTILS=stdlib
6568 CIBW_TEST_COMMAND : >
6669 cd {project} && python -m pytest --cov="mpl_toolkits.basemap"
7477 with :
7578 name : wheels-${{ matrix.os }}
7679 path : ${{ env.PKGDIR }}/wheelhouse/*.whl
77-
78- build_sdist :
79- name : Build source distribution
80- runs-on : ubuntu-latest
81- steps :
82- - uses : actions/checkout@v4
83-
84- - name : Set up Python
85- uses : actions/setup-python@v4
86- with :
87- python-version : " 3.9"
88-
89- - name : Build sdist
90- run : |
91- cd ${{ env.PKGDIR }}
92- pip install build
93- python -m build --sdist
94-
95- - uses : actions/upload-artifact@v4
96- with :
97- name : sdist
98- path : ${{ env.PKGDIR }}/dist/*.tar.gz
99-
100- upload_testpypi :
101- needs : [build_wheels, build_sdist]
102- runs-on : ubuntu-latest
103- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
104- environment :
105- name : TestPyPI
106- url : https://test.pypi.org/p/basemap
107- permissions :
108- id-token : write
109- steps :
110- - uses : actions/download-artifact@v4
111- with :
112- pattern : wheels-*
113- path : dist
114- merge-multiple : true
115-
116- - uses : actions/download-artifact@v4
117- with :
118- name : sdist
119- path : dist
120-
121- - name : Upload to TestPyPI
122- uses : pypa/gh-action-pypi-publish@release/v1
123- with :
124- repository-url : https://test.pypi.org/legacy/
125-
126- upload_pypi :
127- needs : [build_wheels, build_sdist, upload_testpypi]
128- runs-on : ubuntu-latest
129- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
130- environment :
131- name : PyPI
132- url : https://pypi.org/p/basemap
133- permissions :
134- id-token : write
135- steps :
136- - uses : actions/download-artifact@v4
137- with :
138- pattern : wheels-*
139- path : dist
140- merge-multiple : true
141-
142- - uses : actions/download-artifact@v4
143- with :
144- name : sdist
145- path : dist
146-
147- - name : Upload to PyPI
148- uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments