Skip to content

Commit

Permalink
Testing out Release on Fork
Browse files Browse the repository at this point in the history
  • Loading branch information
greglucas committed Jul 19, 2023
1 parent 800d05a commit d4e8123
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 39 deletions.
85 changes: 49 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,59 @@ concurrency:

# Only build on published releases
on:
release:
types:
- published
push:
# release:
# types:
# - published

jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
outputs:
SDIST_NAME: ${{ steps.sdist.outputs.SDIST_NAME }}

steps:
- uses: actions/checkout@v3
with:
# We need the full history to generate the proper version number
fetch-depth: 0

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'

- name: Install dependencies
run: python -m pip install build twine

- name: Build sdist
id: sdist
run: |
python -m build --sdist
# Get the name of the build sdist file for later use
echo "SDIST_NAME=$(ls -1 dist)" >> $GITHUB_ENV
- name: Check README rendering for PyPI
run: twine check dist/*

- name: Upload sdist result
uses: actions/upload-artifact@v3
with:
name: sdist
path: dist/*.tar.gz
if-no-files-found: error

generate-wheels-matrix:
name: Generate wheels matrix
needs: build_sdist
runs-on: ubuntu-latest
outputs:
include: ${{ steps.set-matrix.outputs.include }}
steps:
- uses: actions/checkout@v3
- name: Install cibuildwheel
run: pipx install cibuildwheel==2.13.1
run: pipx install cibuildwheel==2.14.1
- id: set-matrix
run: |
MATRIX=$(
Expand Down Expand Up @@ -49,48 +88,22 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
# We need the full history to generate the proper version number
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
- name: Download sdist
uses: actions/download-artifact@v3
with:
python-version: '3.10'
name: sdist
path: dist/

- uses: pypa/cibuildwheel@v2.13.1
- uses: pypa/cibuildwheel@f21bb8376a051ffb6cb5604b28ccaef7b90e8ab7 # v2.14.1
with:
only: ${{ matrix.only }}
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# We need the full history to generate the proper version number
fetch-depth: 0

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'

- name: Build sdist
run: |
python -m pip install build
# install compiles the cython *.pyx to *.cpp for us
python -m pip install .
python -m build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

publish:
name: Publish to PyPI
needs: [build_wheels, build_sdist]
Expand Down
2 changes: 1 addition & 1 deletion lib/cartopy/trace.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ cdef bool straightAndDomain(double t_start, const Point &p_start,
p_mid = interpolator.interpolate(t_mid)

# Determine the closest point on the segment to the midpoint, in
# normalized coordinates. We can just do the math ourselves:
# normalized coordinates.
# ○̩ (x1, y1) (assume that this is not necessarily vertical)
#
# │ D
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ dynamic = ["version"]

[project.optional-dependencies]
doc = ["beautifulsoup4", "pydata-sphinx-theme", "sphinx", "sphinx-gallery"]
extras = ["pykdtree", "fiona"]
speedups = ["pykdtree", "fiona"]
ows = ["OWSLib>=0.20.0", "pillow>=6.1.0"]
plotting = ["pillow>=6.1.0", "scipy>=1.3.1"]
test = ["packaging>=20", "pytest>=5.1.2", "pytest-mpl>=0.11", "pytest-xdist", "pytest-cov", "coveralls"]
test = ["pytest>=5.1.2", "pytest-mpl>=0.11", "pytest-xdist", "pytest-cov", "coveralls"]

[project.scripts]
feature_download = "tools.cartopy_feature_download.py:__main__"
Expand Down

0 comments on commit d4e8123

Please sign in to comment.