Skip to content

Add support for the h3o containment mode "covers" #274

Add support for the h3o containment mode "covers"

Add support for the h3o containment mode "covers" #274

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- 'v*'
# release:
# types: [ created ]
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: read
env:
PYTHON_VERSION: "3.8"
RUST_BACKTRACE: "1"
jobs:
linux-x86_64:
runs-on: ubuntu-latest
needs:
- cargofmt
- black
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_VERSION}}
- name: Install dependencies
run: python install-dev-dependencies.py
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUSTFLAGS: "-C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma"
with:
target: x86_64
args: --release --out dist
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
- name: pytest
shell: bash
run: |
set -e
pip install --force-reinstall dist/*.whl
pytest -s tests
linux-aarch64:
runs-on: ubuntu-latest
needs:
- cargofmt
- black
- linux-x86_64
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_VERSION}}
- name: Install dependencies
run: python install-dev-dependencies.py
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: aarch64-unknown-linux-gnu
args: --release --out dist
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
# commented out as a pre-build rasterio is not available
#- name: pytest
# uses: uraimo/run-on-arch-action@v2.5.0
# with:
# arch: aarch64
# distro: ubuntu22.04
# githubToken: ${{ github.token }}
# install: |
# apt-get update
# apt-get install -y --no-install-recommends python3 python3-pip
# pip3 install -U pip pytest
# run: |
# set -e
# pip3 install h3ronpy[test,pandas,polars] --find-links dist --force-reinstall
# pytest tests
win-macos:
needs:
- cargofmt
- black
- linux-x86_64
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: python install-dev-dependencies.py
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUSTFLAGS: "-C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2"
# lower versions result in "illegal instruction"
MACOSX_DEPLOYMENT_TARGET: "10.14"
with:
target: x86_64
args: --release --out dist -i python
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
- name: pytest
shell: bash
run: |
set -e
pip install --force-reinstall dist/*.whl
pytest tests
macos-aarch64:
runs-on: macos-latest
needs:
- cargofmt
- black
- linux-x86_64
steps:
- uses: actions/checkout@v3
- name: Set up Rust targets
run: rustup target add aarch64-apple-darwin
- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_VERSION}}
- name: Install dependencies
run: |
python install-dev-dependencies.py
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: aarch64-apple-darwin
args: --release --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
sdist:
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/v')"
needs:
- cargofmt
- black
steps:
- uses: actions/checkout@v3
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/v')"
needs: [ linux-x86_64, linux-aarch64, win-macos, macos-aarch64, sdist ]
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI }}
with:
command: upload
args: --skip-existing *
cargofmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v3
# - name: install rust
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# override: true
# components: rustfmt
- name: run rustfmt
run: |
cargo fmt -- --check
black:
name: black
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_VERSION}}
- name: Install black
run: |
pip install black
- name: run black
run: |
black -l 120 python tests *.py docs/source/*.py