Skip to content

Commit

Permalink
Fix CI, use GitHub workflow to release to pypi (#15)
Browse files Browse the repository at this point in the history
* remove docs, useless CI

* update CI

* update docs

* update docs

* ready to PR

* update

* fix for windows

* fix
  • Loading branch information
district10 authored Mar 5, 2023
1 parent fb89b0a commit 0f57b0e
Show file tree
Hide file tree
Showing 24 changed files with 137 additions and 919 deletions.
27 changes: 0 additions & 27 deletions .appveyor.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .github/dependabot.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/conda.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]
python-version: ["3.6", "3.8", "3.11-dev"]
platform: [ubuntu-20.04, windows-2019, macos-11]
python-version: ["3.8", "3.9", "3.10"]

runs-on: ${{ matrix.platform }}

Expand All @@ -33,4 +33,5 @@ jobs:
run: pip install --verbose .[test]

- name: Test
if: ${{ startsWith(matrix.platform, 'ubuntu') }}
run: python -m pytest
21 changes: 16 additions & 5 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,22 @@ jobs:
with:
submodules: true

- uses: pypa/cibuildwheel@v2.11.1
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all

- uses: pypa/cibuildwheel@v2.12.0
env:
CIBW_ARCHS_MACOS: auto universal2
# CIBW_ARCHS: auto64
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_ARCHS_WINDOWS: AMD64 # ARM64
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_BEFORE_BUILD: pip install numpy scipy fire --prefer-binary
# https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip
CIBW_SKIP: pp*
CIBW_SKIP: pp* *i686 *musllinux*
CIBW_TEST_SKIP: "*macosx* *win* *aarch64"

- name: Verify clean directory
run: git diff --exit-code
Expand Down Expand Up @@ -75,6 +86,6 @@ jobs:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.5.1
- uses: pypa/gh-action-pypi-publish@v1.6.4
with:
password: ${{ secrets.pypi_password }}
password: ${{ secrets.PYPI_API_TOKEN }}
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:

# Sort your imports in a standard form
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.11.5
hooks:
- id: isort

Expand All @@ -61,7 +61,7 @@ repos:
- id: remove-tabs
exclude: ^(docs|Makefile)

- repo: https://gitlab.com/pycqa/flake8
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
Expand Down
7 changes: 7 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
formats: all
mkdocs:
fail_on_warning: false
python:
install:
- requirements: docs/requirements.txt
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ build:
cmake .. && make
.PHONY: build

docs_build:
mkdocs build
docs_serve:
mkdocs serve -a 0.0.0.0:8088

DOCKER_TAG_WINDOWS ?= ghcr.io/cubao/build-env-windows-x64:v0.0.1
DOCKER_TAG_LINUX ?= ghcr.io/cubao/build-env-manylinux2014-x64:v0.0.1
DOCKER_TAG_MACOS ?= ghcr.io/cubao/build-env-macos-arm64:v0.0.1
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# polyline-ruler

<!--intro-start-->

Init from [mapbox/cheap-ruler](https://github.com/mapbox/cheap-ruler) but more than that.

## Installation

### via pip

```
pip install polyline-ruler
```bash
pip install -U polyline-ruler
```

### from source
Expand All @@ -19,18 +21,20 @@ pip install ./polyline-ruler

Or

```
```bash
pip install git+https://github.com/cubao/polyline-ruler.git
```

(you can build wheels for later reuse by ` pip wheel git+https://github.com/cubao/polyline-ruler.git`)
(you can build wheels for later reuse by `pip wheel git+https://github.com/cubao/polyline-ruler.git`)

<!--intro-end-->

## Usage

See [`tests/test_basic.py`](tests/test_basic.py).

## Tests

```
```bash
python3 tests/test_basic.py
```
39 changes: 0 additions & 39 deletions conda.recipe/meta.yaml

This file was deleted.

Loading

0 comments on commit 0f57b0e

Please sign in to comment.