Skip to content

Commit 991de4c

Browse files
authored
github workflows for html-py-ever (#100)
* added example .travis.yml * modified setup.py, added requirements.txt and ./ci/setup_rust.sh for the travis ci example * removed .travis ci to switch to github workflows * added github workflow ci * update readme
1 parent af595f6 commit 991de4c

File tree

4 files changed

+51
-1
lines changed

4 files changed

+51
-1
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=stable
22+
pip install setuptools wheel twine setuptools-rust
23+
- name: Build , Test and publish
24+
env:
25+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
26+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
27+
run: |
28+
python setup.py install --user
29+
cd test && python3 run_all.py
30+
twine upload dist/*

examples/html-py-ever/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,18 @@ test_bench_selector_rust[python.html] 6,504.3130 (>1000.0) 12,934.
8181
test_bench_selector_python[python.html] 36,145.0260 (>1000.0) 46,582.5100 (729.23) 38,058.3009 (>1000.0) 2,960.4055 (>1000.0) 36,630.3450 (>1000.0) 1,389.9710 (>1000.0) 4;5 26.2755 (0.00) 23 1
8282
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8383
```
84+
85+
## build instructions
86+
87+
**Requirements:**
88+
89+
- rust-toolchain (i.e cargo, rustc)
90+
- python3-dev or python3-devel
91+
92+
**building and installing**
93+
```
94+
pip install -r setuptools-rust setuptools wheel
95+
python3 setup.py install --user
96+
```
97+
98+
github workflows example to test and upload the module to pypi [here](./.github/workflows/upload.yml)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
setuptools-rust
2+
setuptools
3+
wheel

examples/html-py-ever/setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"License :: OSI Approved :: MIT License",
1212
"Development Status :: 3 - Alpha",
1313
"Intended Audience :: Developers",
14-
"Programming Language :: Python",
14+
"Programming Language :: Python :: 3.6",
15+
"Programming Language :: Python :: 3.7",
16+
"Programming Language :: Python :: 3.8",
1517
"Programming Language :: Rust",
1618
"Operating System :: POSIX",
1719
"Operating System :: MacOS :: MacOS X",

0 commit comments

Comments
 (0)