Skip to content

Commit 14457ac

Browse files
committed
Pivot windows CI to github actions
Currently windows CI is configured to run in appveyor however appveyor is not configured to run on rust-numpy in the PyO3 github organization so there has been no CI running on windows. This commit fixes this by switching the windows CI to run in github actions instead of using appveyor. This makes it consistent with how windows testing is run with PyO3/PyO3. Fixes #128
1 parent 26ca67d commit 14457ac

File tree

3 files changed

+55
-30
lines changed

3 files changed

+55
-30
lines changed

.github/workflows/test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }}
8+
runs-on: ${{ matrix.platform.os }}
9+
strategy:
10+
max-parallel: 12
11+
matrix:
12+
python-version: [3.5, 3.6, 3.7, 3.8]
13+
platform: [
14+
{ os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
15+
{ os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" },
16+
{ os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" },
17+
]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v1
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install Rust
26+
uses: actions-rs/toolchain@v1
27+
with:
28+
toolchain: stable
29+
default: true
30+
- run: rustup set default-host ${{ matrix.platform.rust-target }}
31+
- name: Build without default features
32+
run: cargo build --no-default-features --verbose
33+
- name: Build with default features
34+
run: cargo build --verbose
35+
- name: Install test dependencies
36+
run: |
37+
python -m pip install -U pip setuptools
38+
pip install setuptools-rust pytest pytest-benchmark tox tox-venv
39+
- name: Test
40+
run: ci/actions/test.sh
41+
shell: bash
42+
env:
43+
RUST_BACKTRACE: 1

appveyor.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

ci/actions/test.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
set -ex
4+
5+
cargo build --verbose --features $FEATURES
6+
cargo test --verbose --features $FEATURES -- --test-threads=1
7+
8+
for example_dir in examples/*; do
9+
cd $example_dir
10+
tox -c "tox.ini" -e py
11+
cd -
12+
done

0 commit comments

Comments
 (0)