Update ordered-float requirement from 4.1.1 to 5.0.0 #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
release: | |
types: | |
- released | |
- prereleased | |
jobs: | |
macos: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: aarch64-apple-darwin | |
- name: Build | |
run: cargo build --release | |
- name: Tests | |
run: cargo test --no-default-features --release | |
- name: Build wheels - x86_64 | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: x86_64 | |
args: -i python --release --out dist --sdist | |
- name: Install built wheel - x86_64 | |
run: | | |
pip install -r requirements.txt | |
pip uninstall fastrank -y | |
pip install fastrank --no-index --find-links dist | |
- name: Build wheels - universal2 | |
if: ${{ matrix.python-version >= '3.8' || contains(fromJson('["3.10", "3.11"]'), matrix.python-version) }} | |
uses: PyO3/maturin-action@v1 | |
with: | |
args: -i python --release --universal2 --out dist | |
- name: Install built wheel - universal2 | |
if: ${{ matrix.python-version >= '3.8' || contains(fromJson('["3.10", "3.11"]'), matrix.python-version) }} | |
run: | | |
pip install -r requirements.txt | |
pip uninstall fastrank -y | |
pip install fastrank --no-index --find-links dist | |
- name: Python UnitTest | |
run: | | |
python -I -m unittest discover -s tests -v | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
target: [x64] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.target }} | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Build | |
run: cargo build --release | |
- name: Tests | |
run: cargo test --release | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: -i python --release --out dist | |
- name: Install built wheel | |
run: | | |
pip install -r requirements.txt | |
pip uninstall fastrank -y | |
pip install fastrank --no-index --find-links dist | |
- name: Python UnitTest | |
run: | | |
python -I -m unittest discover -s tests -v | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Build | |
run: cargo build --release | |
- name: Tests | |
run: cargo test --release | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Build Wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
manylinux: auto | |
before-script-linux: python${{ matrix.python-version }} -m pip install cffi | |
args: -i python${{ matrix.python-version }} --release --out dist | |
- name: Python UnitTest | |
run: | | |
pip install -r requirements.txt | |
pip uninstall fastrank -y | |
pip install fastrank --no-index --find-links dist | |
python -I -m unittest discover -s tests -v | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: "startsWith(github.ref, 'refs/tags/')" | |
needs: [macos, windows, linux] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: wheels | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Publish to PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
pip install --upgrade twine | |
twine upload --skip-existing * |