1+ name : Release
2+ on :
3+ push :
4+ # Sequence of patterns matched against refs/tags
5+ tags :
6+ - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
8+ jobs :
9+ build_manylinux_x86_64_wheels :
10+ name : Build manylinux_x86_64
11+ runs-on : ubuntu-20.04
12+ steps :
13+ - uses : actions/checkout@v4
14+ - name : Build wheels
15+ uses : pypa/cibuildwheel@v2.16.2
16+ env :
17+ CIBW_BUILD : " *manylinux_x86_64"
18+ CIBW_ARCHS_LINUX : x86_64
19+ - uses : actions/upload-artifact@v3
20+ with :
21+ path : ./wheelhouse/*.whl
22+ - name : Upload wheels to pypi
23+ uses : pypa/gh-action-pypi-publish@release/v1
24+ with :
25+ user : __token__
26+ password : ${{ secrets.PYPI_API_TOKEN }}
27+ skip_existing : true
28+ packages-dir : ./wheelhouse/
29+
30+ build_manylinux_aarch64_wheels :
31+ name : Build manylinux_aarch64
32+ runs-on : ubuntu-20.04
33+ steps :
34+ - uses : actions/checkout@v4
35+ - name : Set up QEMU
36+ uses : docker/setup-qemu-action@v3
37+ with :
38+ platforms : all
39+ - name : Build wheels
40+ uses : pypa/cibuildwheel@v2.16.2
41+ env :
42+ CIBW_ARCHS_LINUX : aarch64
43+ CIBW_BUILD : " *manylinux_aarch64"
44+ - uses : actions/upload-artifact@v3
45+ with :
46+ path : ./wheelhouse/*.whl
47+ - name : Upload wheels to pypi
48+ uses : pypa/gh-action-pypi-publish@release/v1
49+ with :
50+ user : __token__
51+ password : ${{ secrets.PYPI_API_TOKEN }}
52+ skip_existing : true
53+ packages-dir : ./wheelhouse/
54+
55+ build_musllinux_x86_64_wheels :
56+ name : Build musllinux_x86_64 wheels
57+ runs-on : ubuntu-20.04
58+ steps :
59+ - uses : actions/checkout@v4
60+ - name : Build wheels
61+ uses : pypa/cibuildwheel@v2.16.2
62+ env :
63+ CIBW_BUILD : " *musllinux_x86_64"
64+ CIBW_ARCHS_LINUX : x86_64
65+ - uses : actions/upload-artifact@v3
66+ with :
67+ path : ./wheelhouse/*.whl
68+ - name : Upload wheels to pypi
69+ uses : pypa/gh-action-pypi-publish@release/v1
70+ with :
71+ user : __token__
72+ password : ${{ secrets.PYPI_API_TOKEN }}
73+ skip_existing : true
74+ packages-dir : ./wheelhouse/
75+
76+ build_mac_wheels :
77+ name : Build macos wheels
78+ runs-on : macos-11
79+ steps :
80+ - uses : actions/checkout@v4
81+ - name : Build wheels
82+ uses : pypa/cibuildwheel@v2.16.2
83+ env :
84+ CIBW_ARCHS_MACOS : x86_64 arm64
85+ - uses : actions/upload-artifact@v3
86+ with :
87+ path : ./wheelhouse/*.whl
88+ - name : Upload wheels to pypi
89+ uses : pypa/gh-action-pypi-publish@release/v1
90+ with :
91+ user : __token__
92+ password : ${{ secrets.PYPI_API_TOKEN }}
93+ skip_existing : true
94+ packages-dir : ./wheelhouse/
95+
96+ build_windows_wheels :
97+ name : Build Windows wheels
98+ runs-on : windows-2019
99+ steps :
100+ - uses : actions/checkout@v4
101+ - name : Build wheels
102+ uses : pypa/cibuildwheel@v2.16.2
103+ env :
104+ CIBW_ARCHS_WINDOWS : AMD64
105+ - uses : actions/upload-artifact@v3
106+ with :
107+ path : ./wheelhouse/*.whl
108+ - name : Upload wheels to pypi
109+ uses : pypa/gh-action-pypi-publish@release/v1
110+ with :
111+ user : __token__
112+ password : ${{ secrets.PYPI_API_TOKEN }}
113+ skip_existing : true
114+ packages-dir : ./wheelhouse/
115+
116+ # Don't upload this one to pypi, otherwise it will be preferred over every compiled one
117+ # We can host it here on github though for those that need it (re: jupyter-light).
118+ pure_python :
119+ name : Create pure-python wheel
120+ runs-on : ubuntu-20.04
121+ steps :
122+ - uses : actions/checkout@v4
123+ - name : Set up Python
124+ uses : actions/setup-python@v2
125+ with :
126+ python-version : 3.11
127+ - name : Build pure python wheel and install
128+ run : |
129+ python -m pip install --user --upgrade build
130+ python -m build
131+ find ./dist/*.whl | xargs pip install
132+ python -c "import geoana; geoana.show_config()"
133+ - uses : actions/upload-artifact@v3
134+ with :
135+ path : ./dist/geoana*.whl
136+
137+ distribute :
138+ name : distribute source and documentation
139+ runs-on : ubuntu-latest
140+ defaults :
141+ run :
142+ shell : bash -l {0}
143+ steps :
144+ - uses : actions/checkout@v2
145+ - name : Setup environment
146+ uses : mamba-org/setup-micromamba@v1
147+ with :
148+ environment-name : geoana-test
149+ create-args : >-
150+ python=3.11
151+ numpy>=1.20
152+ scipy>=1.8
153+ libdlf
154+ cython
155+ setuptools_scm
156+ meson-python>=0.14.0
157+ meson
158+ ninja
159+ build
160+ discretize
161+ numba
162+ matplotlib
163+ jupyter
164+ utm
165+ pytest
166+ pytest-cov
167+ sphinx
168+ sphinx-gallery>=0.1.13
169+ pydata-sphinx-theme=0.13.3
170+ numpydoc>=1.5
171+ graphviz
172+ pillow
173+ cache-environment : true
174+ - name : Prepare source distribution
175+ run : |
176+ python -m build --no-isolation --skip-dependency-check --sdist .
177+ - name : Publish package
178+ uses : pypa/gh-action-pypi-publish@release/v1
179+ with :
180+ user : __token__
181+ password : ${{ secrets.PYPI_API_TOKEN }}
182+ skip_existing : true
183+ - name : Install Our Package
184+ run : |
185+ pip install --no-build-isolation --editable . --config-settings=setup-args="-Dwith_extensions=true"
186+ - name : Build documentation
187+ run : |
188+ cd docs
189+ make html
190+ cd ..
191+ - name : GitHub Pages
192+ uses : crazy-max/ghaction-github-pages@v2.5.0
193+ with :
194+ build_dir : docs/_build/html
195+ fqdn : geoana.simpeg.xyz
196+ jekyll : false
197+ env :
198+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
199+
200+
201+ release :
202+ name : Create Release
203+ needs : [
204+ build_manylinux_x86_64_wheels,
205+ build_manylinux_aarch64_wheels,
206+ build_musllinux_x86_64_wheels,
207+ build_mac_wheels,
208+ build_windows_wheels,
209+ pure_python
210+ ]
211+ runs-on : ubuntu-latest
212+ steps :
213+ - uses : actions/download-artifact@v3
214+ name : Retrieve assets
215+ with :
216+ name : artifact
217+ path : dist
218+ - name : Release to github
219+ uses : softprops/action-gh-release@v1
220+ with :
221+ files : dist/*
222+ generate_release_notes : true
223+ prerelease : false
0 commit comments