pyo3/.github/workflows/test.yml
Mara Bos dab8c2e4e7 Move macros into separate feature.
It's enabled by default to avoid breakage, but this allows compiling
pyo3 with a lot less dependencies in case the macros are not needed.
2020-05-09 11:27:30 +02:00

44 lines
1.5 KiB
YAML

name: Test
on: [push, pull_request]
jobs:
build:
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }}
runs-on: ${{ matrix.platform.os }}
strategy:
max-parallel: 12
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
platform: [
{ os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
{ os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" },
{ os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" },
]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
- run: rustup set default-host ${{ matrix.platform.rust-target }}
- name: Build without default features
run: cargo build --no-default-features --verbose
- name: Build with default features
run: cargo build --verbose
- name: Install test dependencies
run: |
python -m pip install -U pip setuptools
pip install setuptools-rust pytest pytest-benchmark tox tox-venv
- name: Test
run: ci/actions/test.sh
shell: bash
env:
RUST_BACKTRACE: 1