Skip to content

Commit

Permalink
Build flask/django/sqlalchemy wheels with pip wheel (#1373)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkaemmer authored Nov 10, 2021
1 parent 6e395ec commit 3c7c7e1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 46 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/release-python-django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,7 @@ jobs:
needs: version
strategy:
matrix:
# Q: Is there any benefit to building on multiple platforms?
os: [ubuntu-latest]
env:
# Skip Python 2.7 and Python 3.5
CIBW_SKIP: "cp27-* cp35-* pp27-*"
# 64-bit builds only
CIBW_BUILD: "*64"
# Used in build.py to find right files
CIBW_ENVIRONMENT: OSO_ENV=CI

CIBW_BEFORE_TEST: make -B test-requirements
CIBW_TEST_COMMAND: make -C {project} test

steps:
- uses: actions/checkout@v2
Expand All @@ -43,16 +32,17 @@ jobs:
with:
python-version: "3.7"

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.4.2
- name: Copy in readme
run: |
rm languages/python/django-oso/README.md
cp README.md languages/python/django-oso/README.md
- name: Upgrade pip and install wheel
run: |
pip install --upgrade pip
pip install wheel
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
python -m pip wheel -w wheelhouse .
working-directory: languages/python/django-oso
- uses: actions/upload-artifact@v2
with:
Expand Down
20 changes: 5 additions & 15 deletions .github/workflows/release-python-flask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,7 @@ jobs:
needs: version
strategy:
matrix:
# Q: Is there any benefit to building on multiple platforms?
os: [ubuntu-latest]
env:
# Skip Python 2.7 and Python 3.5
CIBW_SKIP: "cp27-* cp35-* pp27-*"
# 64-bit builds only
CIBW_BUILD: "*64"
# Used in build.py to find right files
CIBW_ENVIRONMENT: OSO_ENV=CI

CIBW_BEFORE_TEST: make -B test-requirements
CIBW_TEST_COMMAND: make -C {project} test

steps:
- uses: actions/checkout@v2
Expand All @@ -43,16 +32,17 @@ jobs:
with:
python-version: "3.7"

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.4.2
- name: Copy in readme
run: |
rm languages/python/flask-oso/README.md
cp README.md languages/python/flask-oso/README.md
- name: Upgrade pip and install wheel
run: |
pip install --upgrade pip
pip install wheel
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
python -m pip wheel -w wheelhouse .
working-directory: languages/python/flask-oso
- uses: actions/upload-artifact@v2
with:
Expand Down
21 changes: 5 additions & 16 deletions .github/workflows/release-python-sqlalchemy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,7 @@ jobs:
needs: version
strategy:
matrix:
# Q: Is there any benefit to building on multiple platforms?
os: [ubuntu-latest]
env:
# Skip Python 2.7 and Python 3.5
CIBW_SKIP: "cp27-* cp35-* pp27-*"
# 64-bit builds only
CIBW_BUILD: "*64"
# Used in build.py to find right files
CIBW_ENVIRONMENT: OSO_ENV=CI TOX_PARALLEL_NO_SPINNER=1

CIBW_TEST_REQUIRES: tox
CIBW_TEST_COMMAND: tox -p -c {project}

steps:
- uses: actions/checkout@v2
Expand All @@ -43,17 +32,17 @@ jobs:
with:
python-version: "3.7"

- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel==1.4.2
- name: Copy in readme
run: |
rm languages/python/sqlalchemy-oso/README.md
cp README.md languages/python/sqlalchemy-oso/README.md
- name: Upgrade pip and install wheel
run: |
pip install --upgrade pip
pip install wheel
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
python -m pip wheel -w wheelhouse .
working-directory: languages/python/sqlalchemy-oso
- uses: actions/upload-artifact@v2
with:
Expand Down

1 comment on commit 3c7c7e1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust Benchmark

Benchmark suite Current: 3c7c7e1 Previous: 6e395ec Ratio
rust_get_attribute 49631 ns/iter (± 3847) 64381 ns/iter (± 29368) 0.77
n_plus_one/100 2296135 ns/iter (± 47702) 2828376 ns/iter (± 36282) 0.81
n_plus_one/500 11038480 ns/iter (± 52375) 13248697 ns/iter (± 161806) 0.83
n_plus_one/1000 21989714 ns/iter (± 160668) 26476448 ns/iter (± 223060) 0.83
unify_once 935 ns/iter (± 54) 1100 ns/iter (± 59) 0.85
unify_twice 2418 ns/iter (± 59) 2874 ns/iter (± 63) 0.84
many_rules 59627 ns/iter (± 1762) 70876 ns/iter (± 1653) 0.84
fib/5 508789 ns/iter (± 8987) 600331 ns/iter (± 10182) 0.85
prime/3 20669 ns/iter (± 896) 24486 ns/iter (± 1088) 0.84
prime/23 20679 ns/iter (± 936) 24554 ns/iter (± 1082) 0.84
prime/43 20604 ns/iter (± 958) 24509 ns/iter (± 1181) 0.84
prime/83 20702 ns/iter (± 956) 24483 ns/iter (± 1124) 0.85
prime/255 18923 ns/iter (± 793) 22322 ns/iter (± 1064) 0.85
indexed/100 6110 ns/iter (± 662) 6945 ns/iter (± 772) 0.88
indexed/500 8490 ns/iter (± 2061) 8642 ns/iter (± 2044) 0.98
indexed/1000 10342 ns/iter (± 697) 11185 ns/iter (± 541) 0.92
indexed/10000 33350 ns/iter (± 1904) 30526 ns/iter (± 2515) 1.09
not 5864 ns/iter (± 149) 6976 ns/iter (± 156) 0.84
double_not 12362 ns/iter (± 264) 14604 ns/iter (± 388) 0.85
De_Morgan_not 7718 ns/iter (± 235) 9190 ns/iter (± 229) 0.84
load_policy 906339 ns/iter (± 4290) 1068951 ns/iter (± 8813) 0.85
partial_and/1 37903 ns/iter (± 1736) 44502 ns/iter (± 2144) 0.85
partial_and/5 132822 ns/iter (± 4007) 157887 ns/iter (± 3744) 0.84
partial_and/10 248296 ns/iter (± 4483) 295961 ns/iter (± 6375) 0.84
partial_and/20 501808 ns/iter (± 7352) 600186 ns/iter (± 8483) 0.84
partial_and/40 1079218 ns/iter (± 11654) 1282063 ns/iter (± 16678) 0.84
partial_and/80 2384945 ns/iter (± 8350) 2859178 ns/iter (± 91274) 0.83
partial_and/100 3133577 ns/iter (± 16328) 3728047 ns/iter (± 54169) 0.84
partial_rule_depth/1 120240 ns/iter (± 4139) 141548 ns/iter (± 5101) 0.85
partial_rule_depth/5 370116 ns/iter (± 6743) 442756 ns/iter (± 14674) 0.84
partial_rule_depth/10 697636 ns/iter (± 13371) 937469 ns/iter (± 13351) 0.74
partial_rule_depth/20 1896907 ns/iter (± 12461) 2562514 ns/iter (± 33187) 0.74
partial_rule_depth/40 6893517 ns/iter (± 142323) 8913671 ns/iter (± 138604) 0.77
partial_rule_depth/80 40000150 ns/iter (± 214187) 49221542 ns/iter (± 557731) 0.81
partial_rule_depth/100 72735531 ns/iter (± 609728) 89976467 ns/iter (± 1224980) 0.81

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.