summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/CODE_OF_CONDUCT.md74
-rw-r--r--.github/CONTRIBUTING.md204
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md43
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.md23
-rw-r--r--.github/PULL_REQUEST_TEMPLATE.md28
-rw-r--r--.github/requirements_strict.txt9
-rw-r--r--.github/requirements_test_windows.txt10
-rw-r--r--.github/workflows/build_tests.yml97
-rw-r--r--.github/workflows/build_wheels.yml62
-rw-r--r--.github/workflows/build_wheels_weekly.yml54
10 files changed, 532 insertions, 72 deletions
diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..9c1c621
--- /dev/null
+++ b/.github/CODE_OF_CONDUCT.md
@@ -0,0 +1,74 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, gender identity and expression, level of experience,
+nationality, personal appearance, race, religion, or sexual identity and
+orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team. All
+complaints will be reviewed and investigated and will result in a response that
+is deemed necessary and appropriate to the circumstances. The project team is
+obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at [http://contributor-covenant.org/version/1/4][version]
+
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 0000000..54e7e42
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1,204 @@
+
+Contributing to POT
+===================
+
+
+First off, thank you for considering contributing to POT.
+
+How to contribute
+-----------------
+
+The preferred workflow for contributing to POT is to fork the
+[main repository](https://github.com/rflamary/POT) on
+GitHub, clone, and develop on a branch. Steps:
+
+1. Fork the [project repository](https://github.com/rflamary/POT)
+ by clicking on the 'Fork' button near the top right of the page. This creates
+ a copy of the code under your GitHub user account. For more details on
+ how to fork a repository see [this guide](https://help.github.com/articles/fork-a-repo/).
+
+2. Clone your fork of the POT repo from your GitHub account to your local disk:
+
+ ```bash
+ $ git clone git@github.com:YourLogin/POT.git
+ $ cd POT
+ ```
+
+3. Create a ``feature`` branch to hold your development changes:
+
+ ```bash
+ $ git checkout -b my-feature
+ ```
+
+ Always use a ``feature`` branch. It's good practice to never work on the ``master`` branch!
+
+4. Develop the feature on your feature branch. Add changed files using ``git add`` and then ``git commit`` files:
+
+ ```bash
+ $ git add modified_files
+ $ git commit
+ ```
+
+ to record your changes in Git, then push the changes to your GitHub account with:
+
+ ```bash
+ $ git push -u origin my-feature
+ ```
+
+5. Follow [these instructions](https://help.github.com/articles/creating-a-pull-request-from-a-fork)
+to create a pull request from your fork. This will send an email to the committers.
+
+(If any of the above seems like magic to you, please look up the
+[Git documentation](https://git-scm.com/documentation) on the web, or ask a friend or another contributor for help.)
+
+Pull Request Checklist
+----------------------
+
+We recommended that your contribution complies with the
+following rules before you submit a pull request:
+
+- Follow the PEP8 Guidelines.
+
+- If your pull request addresses an issue, please use the pull request title
+ to describe the issue and mention the issue number in the pull request description. This will make sure a link back to the original issue is
+ created.
+
+- All public methods should have informative docstrings with sample
+ usage presented as doctests when appropriate.
+
+- Please prefix the title of your pull request with `[MRG]` (Ready for
+ Merge), if the contribution is complete and ready for a detailed review.
+ Two core developers will review your code and change the prefix of the pull
+ request to `[MRG + 1]` and `[MRG + 2]` on approval, making it eligible
+ for merging. An incomplete contribution -- where you expect to do more work before
+ receiving a full review -- should be prefixed `[WIP]` (to indicate a work
+ in progress) and changed to `[MRG]` when it matures. WIPs may be useful
+ to: indicate you are working on something to avoid duplicated work,
+ request broad review of functionality or API, or seek collaborators.
+ WIPs often benefit from the inclusion of a
+ [task list](https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments)
+ in the PR description.
+
+
+- When adding additional functionality, provide at least one
+ example script in the ``examples/`` folder. Have a look at other
+ examples for reference. Examples should demonstrate why the new
+ functionality is useful in practice and, if possible, compare it
+ to other methods available in POT.
+
+- Documentation and high-coverage tests are necessary for enhancements to be
+ accepted. Bug-fixes or new features should be provided with
+ [non-regression tests](https://en.wikipedia.org/wiki/Non-regression_testing).
+ These tests verify the correct behavior of the fix or feature. In this
+ manner, further modifications on the code base are granted to be consistent
+ with the desired behavior.
+ For the Bug-fixes case, at the time of the PR, this tests should fail for
+ the code base in master and pass for the PR code.
+
+- At least one paragraph of narrative documentation with links to
+ references in the literature (with PDF links when possible) and
+ the example.
+
+You can also check for common programming errors with the following
+tools:
+
+
+- No pyflakes warnings, check with:
+
+ ```bash
+ $ pip install pyflakes
+ $ pyflakes path/to/module.py
+ ```
+
+- No PEP8 warnings, check with:
+
+ ```bash
+ $ pip install pep8
+ $ pep8 path/to/module.py
+ ```
+
+- AutoPEP8 can help you fix some of the easy redundant errors:
+
+ ```bash
+ $ pip install autopep8
+ $ autopep8 path/to/pep8.py
+ ```
+
+Bonus points for contributions that include a performance analysis with
+a benchmark script and profiling output (please report on the mailing
+list or on the GitHub issue).
+
+Filing bugs
+-----------
+We use Github issues to track all bugs and feature requests; feel free to
+open an issue if you have found a bug or wish to see a feature implemented.
+
+It is recommended to check that your issue complies with the
+following rules before submitting:
+
+- Verify that your issue is not being currently addressed by other
+ [issues](https://github.com/rflamary/POT/issues?q=)
+ or [pull requests](https://github.com/rflamary/POT/pulls?q=).
+
+- Please ensure all code snippets and error messages are formatted in
+ appropriate code blocks.
+ See [Creating and highlighting code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks).
+
+- Please include your operating system type and version number, as well
+ as your Python, POT, numpy, and scipy versions. This information
+ can be found by running the following code snippet:
+
+ ```python
+ import platform; print(platform.platform())
+ import sys; print("Python", sys.version)
+ import numpy; print("NumPy", numpy.__version__)
+ import scipy; print("SciPy", scipy.__version__)
+ import ot; print("POT", ot.__version__)
+ ```
+
+- Please be specific about what estimators and/or functions are involved
+ and the shape of the data, as appropriate; please include a
+ [reproducible](http://stackoverflow.com/help/mcve) code snippet
+ or link to a [gist](https://gist.github.com). If an exception is raised,
+ please provide the traceback.
+
+New contributor tips
+--------------------
+
+A great way to start contributing to POT is to pick an item
+from the list of [Easy issues](https://github.com/rflamary/POT/issues?labels=Easy)
+in the issue tracker. Resolving these issues allow you to start
+contributing to the project without much prior knowledge. Your
+assistance in this area will be greatly appreciated by the more
+experienced developers as it helps free up their time to concentrate on
+other issues.
+
+Documentation
+-------------
+
+We are glad to accept any sort of documentation: function docstrings,
+reStructuredText documents (like this one), tutorials, etc.
+reStructuredText documents live in the source code repository under the
+doc/ directory.
+
+You can edit the documentation using any text editor and then generate
+the HTML output by typing ``make html`` from the doc/ directory.
+Alternatively, ``make`` can be used to quickly generate the
+documentation without the example gallery. The resulting HTML files will
+be placed in ``_build/html/`` and are viewable in a web browser. See the
+``README`` file in the ``doc/`` directory for more information.
+
+For building the documentation, you will need
+[sphinx](http://sphinx.pocoo.org/),
+[matplotlib](http://matplotlib.org/), and
+[pillow](http://pillow.readthedocs.io/en/latest/).
+
+When you are writing documentation, it is important to keep a good
+compromise between mathematical and algorithmic details, and give
+intuition to the reader on what the algorithm does. It is best to always
+start with a small paragraph with a hand-waving explanation of what the
+method does to the data and a figure (coming from an example)
+illustrating it.
+
+
+This Contribution guide is strongly inpired by the one of the [scikit-learn](https://github.com/scikit-learn/scikit-learn) team.
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 7f8acda..f24d993 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,27 +1,42 @@
---
name: Bug report
about: Create a report to help us improve POT
+title: ''
+labels: bug, help wanted
+assignees: ''
---
-**Describe the bug**
-A clear and concise description of what the bug is.
+## Describe the bug
+<!-- A clear and concise description of what the bug is. -->
-**To Reproduce**
+### To Reproduce
Steps to reproduce the behavior:
-1 ...
+1. ...
2.
-**Expected behavior**
-A clear and concise description of what you expected to happen.
+<!-- If you have error messages or stack traces, please provide it here as well -->
-**Screenshots**
-If applicable, add screenshots to help explain your problem.
+#### Screenshots
+<!-- If applicable, add screenshots to help explain your problem. -->
-**Desktop (please complete the following information):**
- - OS: [e.g. MacOSX, Windows, Ubuntu]
- - Python version [2.7,3.6]
-- How was POT installed [source, pip, conda]
+#### Code sample
+<!-- Ideally attach a minimal code sample to reproduce the decried issue.
+Minimal means having the shortest code but still preserving the bug. -->
+
+### Expected behavior
+<!-- A clear and concise description of what you expected to happen. -->
+
+
+### Environment (please complete the following information):
+- OS (e.g. MacOS, Windows, Linux):
+- Python version:
+- How was POT installed (source, `pip`, `conda`):
+- Build command you used (if compiling from source):
+- Only for GPU related bugs:
+ - CUDA version:
+ - GPU models and configuration:
+ - Any other relevant information:
Output of the following code snippet:
```python
@@ -32,5 +47,5 @@ import scipy; print("SciPy", scipy.__version__)
import ot; print("POT", ot.__version__)
```
-**Additional context**
-Add any other context about the problem here.
+### Additional context
+<!-- Add any other context about the problem here. -->
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..2ee07e0
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,23 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: enhancement, feature request
+assignees: ''
+
+---
+
+## 🚀 Feature
+<!-- A clear and concise description of the feature proposal -->
+
+### Motivation
+<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->
+
+### Pitch
+<!-- A clear and concise description of what you want to happen. -->
+
+### Alternatives
+<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->
+
+### Additional context
+<!-- Add any other context or screenshots about the feature request here. -->
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..7cfe4e6
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,28 @@
+## Types of changes
+<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
+
+- [ ] Docs change / refactoring / dependency upgrade
+- [ ] Bug fix (non-breaking change which fixes an issue)
+- [ ] New feature (non-breaking change which adds functionality)
+- [ ] Breaking change (fix or feature that would cause existing functionality to change)
+
+
+## Motivation and context / Related issue
+<!--- Why is this change required? What problem does it solve? -->
+<!--- Please link to an existing issue here if one exists. -->
+<!--- (we recommend to have an existing issue for each pull request) -->
+
+
+## How has this been tested (if it applies)
+<!--- Please describe here how your modifications have been tested. -->
+
+
+## Checklist
+<!-- - Go over all the following points, and put an `x` in all the boxes that apply. -->
+<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
+
+- [ ] The documentation is up-to-date with the changes I made.
+- [ ] I have read the [**CONTRIBUTING**](CONTRIBUTING.md) document.
+- [ ] All tests passed, and additional code has been covered with new tests.
+
+<!--- In any case, don't hesitate to join and ask questions if you need on slack (https://pot-toolbox.slack.com/), gitter (https://gitter.im/PythonOT/community), or the mailing list (https://mail.python.org/mm3/mailman3/lists/pot.python.org/). -->
diff --git a/.github/requirements_strict.txt b/.github/requirements_strict.txt
index d7539c5..9a1ada4 100644
--- a/.github/requirements_strict.txt
+++ b/.github/requirements_strict.txt
@@ -1,7 +1,4 @@
-numpy==1.16.*
-scipy==1.0.*
-cython==0.23.*
-matplotlib
-cvxopt
-scikit-learn
+numpy
+scipy>=1.3
+cython
pytest
diff --git a/.github/requirements_test_windows.txt b/.github/requirements_test_windows.txt
new file mode 100644
index 0000000..331dd57
--- /dev/null
+++ b/.github/requirements_test_windows.txt
@@ -0,0 +1,10 @@
+numpy
+scipy>=1.3
+cython
+matplotlib
+autograd
+pymanopt==0.2.4; python_version <'3'
+pymanopt; python_version >= '3'
+cvxopt
+scikit-learn
+pytest \ No newline at end of file
diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml
index 41b08b3..ee5a435 100644
--- a/.github/workflows/build_tests.yml
+++ b/.github/workflows/build_tests.yml
@@ -1,10 +1,13 @@
-name: build
+name: Tests
on:
- push:
-
+ workflow_dispatch:
pull_request:
-
+ branches:
+ - 'master'
+ push:
+ branches:
+ - 'master'
create:
branches:
- 'master'
@@ -15,10 +18,11 @@ jobs:
linux:
runs-on: ubuntu-latest
+ if: "!contains(github.event.head_commit.message, 'no ci')"
strategy:
max-parallel: 4
matrix:
- python-version: [3.5, 3.6, 3.7, 3.8]
+ python-version: [ "3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v1
@@ -26,63 +30,70 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
+ - name: Install POT
+ run: |
+ pip install -e .
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- pip install flake8 pytest "pytest-cov<2.6" codecov
- pip install -U "sklearn"
- - name: Lint with flake8
- run: |
- # stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 examples/ ot/ test/ --count --max-line-length=127 --statistics
- - name: Install POT
- run: |
- pip install -e .
+ pip install pytest "pytest-cov<2.6" codecov
- name: Run tests
run: |
- python -m pytest -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot
+ python -m pytest --durations=20 -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot --color=yes
- name: Upload codecov
run: |
codecov
+ pep8:
+ runs-on: ubuntu-latest
+ if: "!contains(github.event.head_commit.message, 'no pep8')"
+ steps:
+ - uses: actions/checkout@v1
+ - name: Set up Python
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.9
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install flake8
+ - name: Lint with flake8
+ run: |
+ # stop the build if there are Python syntax errors or undefined names
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
+ flake8 examples/ ot/ test/ --count --max-line-length=127 --statistics
linux-minimal-deps:
runs-on: ubuntu-latest
- strategy:
- max-parallel: 4
- matrix:
- python-version: [3.6]
-
+ if: "!contains(github.event.head_commit.message, 'no ci')"
steps:
- uses: actions/checkout@v1
- - name: Set up Python ${{ matrix.python-version }}
+ - name: Set up Python
uses: actions/setup-python@v1
with:
- python-version: ${{ matrix.python-version }}
+ python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install -r .github/requirements_strict.txt
pip install pytest
- pip install -U "sklearn"
- name: Install POT
run: |
pip install -e .
- name: Run tests
run: |
- python -m pytest -v test/ ot/ --ignore ot/gpu/
+ python -m pytest --durations=20 -v test/ ot/ --ignore ot/gpu/ --color=yes
macos:
- runs-on: macOS-latest
+ runs-on: macos-latest
+ if: "!contains(github.event.head_commit.message, 'no ci')"
strategy:
max-parallel: 4
matrix:
- python-version: [3.7]
+ python-version: ["3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v1
@@ -90,26 +101,26 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
+ - name: Install POT
+ run: |
+ pip install -e .
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest "pytest-cov<2.6"
- pip install -U "sklearn"
- - name: Install POT
- run: |
- pip install -e .
- name: Run tests
run: |
- python -m pytest -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot
+ python -m pytest --durations=20 -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot --color=yes
windows:
- runs-on: windows-2019
+ runs-on: windows-latest
+ if: "!contains(github.event.head_commit.message, 'no ci')"
strategy:
max-parallel: 4
matrix:
- python-version: [3.7]
+ python-version: ["3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v1
@@ -117,15 +128,15 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
+ - name: Install POT
+ run: |
+ python -m pip install -e .
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install -r requirements.txt
- pip install pytest "pytest-cov<2.6"
- pip install -U "sklearn"
- - name: Install POT
- run: |
- pip install -e .
+ python -m pip install -r .github/requirements_test_windows.txt
+ python -m pip install torch==1.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
+ python -m pip install pytest "pytest-cov<2.6"
- name: Run tests
run: |
- python -m pytest -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot
+ python -m pytest --durations=20 -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot --color=yes
diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml
index 662a604..a935a5e 100644
--- a/.github/workflows/build_wheels.yml
+++ b/.github/workflows/build_wheels.yml
@@ -1,19 +1,21 @@
-name: Build dist and wheels
+name: Build wheels
on:
+ workflow_dispatch:
release:
+ pull_request:
push:
branches:
- - "master"
+ - "*"
jobs:
build_wheels:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
+ if: "contains(github.event.head_commit.message, 'build wheels')"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
- # macos-latest, windows-latest
steps:
- uses: actions/checkout@v1
@@ -30,17 +32,58 @@ jobs:
- name: Install cibuildwheel
run: |
- python -m pip install cibuildwheel==1.3.0
+ python -m pip install cibuildwheel==2.2.2
- - name: Install Visual C++ for Python 2.7
- if: startsWith(matrix.os, 'windows')
+ - name: Build wheels
+ env:
+ CIBW_SKIP: "pp*-win* pp*-macosx* cp2* pp*" # remove pypy on mac and win (wrong version)
+ CIBW_BEFORE_BUILD: "pip install numpy cython"
+ run: |
+ python -m cibuildwheel --output-dir wheelhouse
+
+ - uses: actions/upload-artifact@v1
+ with:
+ name: wheels
+ path: ./wheelhouse
+
+
+ build_all_wheels:
+ name: ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ if: "contains(github.event.head_commit.message, 'build all wheels')"
+ strategy:
+ matrix:
+ os: [ubuntu-latest, macos-latest, windows-latest]
+
+ steps:
+ - uses: actions/checkout@v1
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.8
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install -r requirements.txt
+ pip install -U "cython"
+
+ - name: Install cibuildwheel
run: |
- choco install vcpython27 -f -y
+ python -m pip install cibuildwheel==2.2.2
- - name: Build wheel
+ - name: Set up QEMU
+ if: runner.os == 'Linux'
+ uses: docker/setup-qemu-action@v1
+ with:
+ platforms: all
+
+ - name: Build wheels
env:
- CIBW_SKIP: "pp*-win* pp*-macosx* cp2* pp*" # remove pypy on mac and win (wrong version)
+ CIBW_SKIP: "pp*-win* pp*-macosx* cp2* pp* cp*musl*" # remove pypy on mac and win (wrong version)
CIBW_BEFORE_BUILD: "pip install numpy cython"
+ CIBW_ARCHS_LINUX: auto aarch64 # force aarch64 with QEMU
+ CIBW_ARCHS_MACOS: x86_64 universal2 arm64
run: |
python -m cibuildwheel --output-dir wheelhouse
@@ -48,3 +91,4 @@ jobs:
with:
name: wheels
path: ./wheelhouse
+
diff --git a/.github/workflows/build_wheels_weekly.yml b/.github/workflows/build_wheels_weekly.yml
new file mode 100644
index 0000000..2964844
--- /dev/null
+++ b/.github/workflows/build_wheels_weekly.yml
@@ -0,0 +1,54 @@
+name: Build all wheels
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: '30 0 * * 1'
+ push:
+ branches:
+ - "master"
+
+jobs:
+ build_wheels:
+ name: ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest, macos-latest, windows-latest]
+
+ steps:
+ - uses: actions/checkout@v1
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.8
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install -r requirements.txt
+ pip install -U "cython"
+
+ - name: Install cibuildwheel
+ run: |
+ python -m pip install cibuildwheel==2.2.2
+
+ - name: Set up QEMU
+ if: runner.os == 'Linux'
+ uses: docker/setup-qemu-action@v1
+ with:
+ platforms: all
+
+ - name: Build wheels
+ env:
+ CIBW_SKIP: "pp*-win* pp*-macosx* cp2* pp* cp*musl*" # remove pypy on mac and win (wrong version)
+ CIBW_BEFORE_BUILD: "pip install numpy cython"
+ CIBW_ARCHS_LINUX: auto aarch64 # force aarch64 with QEMU
+ CIBW_ARCHS_MACOS: x86_64 universal2 arm64
+ run: |
+ python -m cibuildwheel --output-dir wheelhouse
+
+ - uses: actions/upload-artifact@v1
+ with:
+ name: wheels
+ path: ./wheelhouse