Skip to content

Commit 2910cea

Browse files
committed
Merge pycases into cases
2 parents fdaf343 + ecb0018 commit 2910cea

File tree

16 files changed

+1403
-0
lines changed

16 files changed

+1403
-0
lines changed

.github/workflows/python.yaml

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
name: python
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
permissions:
6+
contents: read
7+
8+
defaults:
9+
run:
10+
working-directory: python
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.11'
20+
- name: Install dependencies
21+
run: |
22+
pip install --upgrade pip wheel setuptools
23+
pip install -r dev/requirements.txt
24+
- name: Build wheel
25+
uses: PyO3/maturin-action@v1
26+
with:
27+
working-directory: python
28+
args: --release --out dist --find-interpreter
29+
sccache: 'true'
30+
- name: Install wheel
31+
run: pip install pycases --find-links dist --force-reinstall
32+
- name: Test
33+
run: pytest --benchmark-disable
34+
35+
linux:
36+
runs-on: ubuntu-latest
37+
needs: test
38+
strategy:
39+
matrix:
40+
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
41+
steps:
42+
- uses: actions/checkout@v3
43+
- uses: actions/setup-python@v4
44+
with:
45+
python-version: '3.11'
46+
- name: Build wheels
47+
uses: PyO3/maturin-action@v1
48+
with:
49+
working-directory: python
50+
target: ${{ matrix.target }}
51+
args: --release --out dist --find-interpreter
52+
sccache: 'true'
53+
manylinux: auto
54+
- name: Upload wheels
55+
uses: actions/upload-artifact@v3
56+
with:
57+
name: wheels
58+
path: dist
59+
60+
windows:
61+
runs-on: windows-latest
62+
needs: test
63+
strategy:
64+
matrix:
65+
target: [x64, x86]
66+
steps:
67+
- uses: actions/checkout@v3
68+
- uses: actions/setup-python@v4
69+
with:
70+
python-version: '3.11'
71+
architecture: ${{ matrix.target }}
72+
- name: Build wheels
73+
uses: PyO3/maturin-action@v1
74+
with:
75+
working-directory: python
76+
target: ${{ matrix.target }}
77+
args: --release --out dist --find-interpreter
78+
sccache: 'true'
79+
- name: Upload wheels
80+
uses: actions/upload-artifact@v3
81+
with:
82+
name: wheels
83+
path: dist
84+
85+
macos:
86+
runs-on: macos-latest
87+
needs: test
88+
strategy:
89+
matrix:
90+
target: [x86_64, aarch64]
91+
steps:
92+
- uses: actions/checkout@v3
93+
- uses: actions/setup-python@v4
94+
with:
95+
python-version: '3.11'
96+
- name: Build wheels
97+
uses: PyO3/maturin-action@v1
98+
with:
99+
working-directory: python
100+
target: ${{ matrix.target }}
101+
args: --release --out dist --find-interpreter
102+
sccache: 'true'
103+
- name: Upload wheels
104+
uses: actions/upload-artifact@v3
105+
with:
106+
name: wheels
107+
path: dist
108+
109+
sdist:
110+
runs-on: ubuntu-latest
111+
needs: test
112+
steps:
113+
- uses: actions/checkout@v3
114+
- name: Build sdist
115+
uses: PyO3/maturin-action@v1
116+
with:
117+
working-directory: python
118+
command: sdist
119+
args: --out dist
120+
- name: Upload sdist
121+
uses: actions/upload-artifact@v3
122+
with:
123+
name: wheels
124+
path: dist
125+
126+
release:
127+
name: Release
128+
runs-on: ubuntu-latest
129+
if: "startsWith(github.ref, 'refs/tags/')"
130+
needs: [linux, windows, macos, sdist]
131+
steps:
132+
- uses: actions/download-artifact@v3
133+
with:
134+
name: wheels
135+
- name: Publish to PyPI
136+
uses: PyO3/maturin-action@v1
137+
env:
138+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
139+
with:
140+
command: upload
141+
args: --non-interactive --skip-existing *

LICENSE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Permission is hereby granted, free of charge, to any person obtaining a copy
2+
of this software and associated documentation files (the "Software"), to deal
3+
in the Software without restriction, including without limitation the rights
4+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5+
copies of the Software, and to permit persons to whom the Software is
6+
furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in all
9+
copies or substantial portions of the Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17+
SOFTWARE.

python/.gitignore

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/target
2+
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
.pytest_cache/
6+
*.py[cod]
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
.venv/
14+
env/
15+
bin/
16+
build/
17+
develop-eggs/
18+
dist/
19+
eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
include/
26+
man/
27+
venv/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
32+
# Installer logs
33+
pip-log.txt
34+
pip-delete-this-directory.txt
35+
pip-selfcheck.json
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.cache
42+
nosetests.xml
43+
coverage.xml
44+
45+
# Translations
46+
*.mo
47+
48+
# Mr Developer
49+
.mr.developer.cfg
50+
.project
51+
.pydevproject
52+
53+
# Rope
54+
.ropeproject
55+
56+
# Django stuff:
57+
*.log
58+
*.pot
59+
60+
.DS_Store
61+
62+
# Sphinx documentation
63+
docs/_build/
64+
65+
# PyCharm
66+
.idea/
67+
68+
# VSCode
69+
.vscode/
70+
71+
# Pyenv
72+
.python-version

0 commit comments

Comments
 (0)