Skip to content

Commit 0f57b0e

Browse files
authored
Fix CI, use GitHub workflow to release to pypi (#15)
* remove docs, useless CI * update CI * update docs * update docs * ready to PR * update * fix for windows * fix
1 parent fb89b0a commit 0f57b0e

24 files changed

+137
-919
lines changed

.appveyor.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/conda.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/pip.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
platform: [windows-latest, macos-latest, ubuntu-latest]
16-
python-version: ["3.6", "3.8", "3.11-dev"]
15+
platform: [ubuntu-20.04, windows-2019, macos-11]
16+
python-version: ["3.8", "3.9", "3.10"]
1717

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

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

3535
- name: Test
36+
if: ${{ startsWith(matrix.platform, 'ubuntu') }}
3637
run: python -m pytest

.github/workflows/wheels.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,22 @@ jobs:
4343
with:
4444
submodules: true
4545

46-
- uses: pypa/cibuildwheel@v2.11.1
46+
- name: Set up QEMU
47+
if: runner.os == 'Linux'
48+
uses: docker/setup-qemu-action@v2
49+
with:
50+
platforms: all
51+
52+
- uses: pypa/cibuildwheel@v2.12.0
4753
env:
48-
CIBW_ARCHS_MACOS: auto universal2
54+
# CIBW_ARCHS: auto64
55+
CIBW_ARCHS_LINUX: x86_64 aarch64
56+
CIBW_ARCHS_WINDOWS: AMD64 # ARM64
57+
CIBW_ARCHS_MACOS: x86_64 arm64
58+
CIBW_BEFORE_BUILD: pip install numpy scipy fire --prefer-binary
4959
# https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip
50-
CIBW_SKIP: pp*
60+
CIBW_SKIP: pp* *i686 *musllinux*
61+
CIBW_TEST_SKIP: "*macosx* *win* *aarch64"
5162

5263
- name: Verify clean directory
5364
run: git diff --exit-code
@@ -75,6 +86,6 @@ jobs:
7586
name: artifact
7687
path: dist
7788

78-
- uses: pypa/gh-action-pypi-publish@v1.5.1
89+
- uses: pypa/gh-action-pypi-publish@v1.6.4
7990
with:
80-
password: ${{ secrets.pypi_password }}
91+
password: ${{ secrets.PYPI_API_TOKEN }}

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ repos:
4343

4444
# Sort your imports in a standard form
4545
- repo: https://github.com/PyCQA/isort
46-
rev: 5.10.1
46+
rev: 5.11.5
4747
hooks:
4848
- id: isort
4949

@@ -61,7 +61,7 @@ repos:
6161
- id: remove-tabs
6262
exclude: ^(docs|Makefile)
6363

64-
- repo: https://gitlab.com/pycqa/flake8
64+
- repo: https://github.com/PyCQA/flake8
6565
rev: 3.9.2
6666
hooks:
6767
- id: flake8

.readthedocs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
formats: all
3+
mkdocs:
4+
fail_on_warning: false
5+
python:
6+
install:
7+
- requirements: docs/requirements.txt

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ build:
1717
cmake .. && make
1818
.PHONY: build
1919

20+
docs_build:
21+
mkdocs build
22+
docs_serve:
23+
mkdocs serve -a 0.0.0.0:8088
24+
2025
DOCKER_TAG_WINDOWS ?= ghcr.io/cubao/build-env-windows-x64:v0.0.1
2126
DOCKER_TAG_LINUX ?= ghcr.io/cubao/build-env-manylinux2014-x64:v0.0.1
2227
DOCKER_TAG_MACOS ?= ghcr.io/cubao/build-env-macos-arm64:v0.0.1

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# polyline-ruler
22

3+
<!--intro-start-->
4+
35
Init from [mapbox/cheap-ruler](https://github.com/mapbox/cheap-ruler) but more than that.
46

57
## Installation
68

79
### via pip
810

9-
```
10-
pip install polyline-ruler
11+
```bash
12+
pip install -U polyline-ruler
1113
```
1214

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

2022
Or
2123

22-
```
24+
```bash
2325
pip install git+https://github.com/cubao/polyline-ruler.git
2426
```
2527

26-
(you can build wheels for later reuse by ` pip wheel git+https://github.com/cubao/polyline-ruler.git`)
28+
(you can build wheels for later reuse by `pip wheel git+https://github.com/cubao/polyline-ruler.git`)
29+
30+
<!--intro-end-->
2731

2832
## Usage
2933

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

3236
## Tests
3337

34-
```
38+
```bash
3539
python3 tests/test_basic.py
3640
```

conda.recipe/meta.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)