Merge pull request #831 from PyO3/x86-ci
Enable mac x64 and Win x86 tests on github Actions
This commit is contained in:
commit
dd240a6f00
|
@ -4,11 +4,17 @@ on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: windows-latest
|
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }}
|
||||||
|
runs-on: ${{ matrix.platform.os }}
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 4
|
max-parallel: 12
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.5, 3.6, 3.7, 3.8]
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
@ -16,13 +22,12 @@ jobs:
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Set Python PATH
|
|
||||||
run: ci/actions/setup
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
default: true
|
default: true
|
||||||
|
- run: rustup set default-host ${{ matrix.platform.rust-target }}
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
- name: Install test dependencies
|
- name: Install test dependencies
|
||||||
|
@ -30,6 +35,7 @@ jobs:
|
||||||
python -m pip install -U pip setuptools
|
python -m pip install -U pip setuptools
|
||||||
pip install setuptools-rust pytest pytest-benchmark tox tox-venv
|
pip install setuptools-rust pytest pytest-benchmark tox tox-venv
|
||||||
- name: Test
|
- name: Test
|
||||||
run: ci/actions/test
|
run: ci/actions/test.sh
|
||||||
|
shell: bash
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
$env:PATH="$env:PYTHON;$env:PYTHON\\Scripts;$env:PATH"
|
|
||||||
$pythonLocation = Invoke-Expression "python -c `"import sys; print(sys.base_prefix)`""
|
|
||||||
$env:LIBPATH = "$env:LIBPATH; $( Join-Path $pythonLocation "libs" )"
|
|
|
@ -1,19 +0,0 @@
|
||||||
Set-PSDebug -trace 2
|
|
||||||
|
|
||||||
function Invoke-Call
|
|
||||||
{
|
|
||||||
param ([scriptblock]$ScriptBlock)
|
|
||||||
& @ScriptBlock
|
|
||||||
if ($LastExitCode -ne 0)
|
|
||||||
{
|
|
||||||
exit $LastExitCode
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Invoke-Call { cargo test --verbose --features="num-bigint num-complex" }
|
|
||||||
|
|
||||||
foreach ($example in Get-ChildItem -dir "examples")
|
|
||||||
{
|
|
||||||
Set-Location $example
|
|
||||||
Invoke-Call { tox -c "tox.ini" -e py }
|
|
||||||
}
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cargo test --features "$FEATURES num-bigint num-complex"
|
||||||
|
(cd pyo3-derive-backend; cargo test)
|
||||||
|
|
||||||
|
for example_dir in examples/*; do
|
||||||
|
cd $example_dir
|
||||||
|
tox -c "tox.ini" -e py
|
||||||
|
cd -
|
||||||
|
done
|
Loading…
Reference in New Issue