Skip to content

Commit 9fcd0e7

Browse files
authored
Merge pull request PyO3#78 from davidhewitt/github-actions
Use Github Actions instead of Travis
2 parents 16a111d + 007a3ed commit 9fcd0e7

File tree

17 files changed

+241
-217
lines changed

17 files changed

+241
-217
lines changed

.github/workflows/ci.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: CI
2+
on:
3+
pull_request: {}
4+
push: {}
5+
6+
jobs:
7+
test:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, macos-latest, windows-latest]
12+
python-version: [3.6, 3.7, 3.8, 3.9-dev, pypy3]
13+
steps:
14+
- uses: actions/checkout@master
15+
- name: Setup python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
20+
- uses: actions-rs/toolchain@v1
21+
with:
22+
profile: minimal
23+
toolchain: stable
24+
override: true
25+
26+
# Install dependencies on ubuntu
27+
- if: matrix.os == 'ubuntu-latest'
28+
name: Install build dependencies
29+
run: sudo apt-get install -y libxml2-dev libxslt-dev
30+
31+
# Install 32-bit windows target for pypy3
32+
- if: matrix.os == 'windows-latest' && matrix.python-version == 'pypy3'
33+
name: Install 32-bit Rust target
34+
uses: actions-rs/toolchain@v1
35+
with:
36+
profile: minimal
37+
toolchain: stable
38+
override: true
39+
target: i686-pc-windows-msvc
40+
41+
- name: Build package
42+
run: pip install -e .
43+
44+
- name: Test tomlgen_rust
45+
shell: bash
46+
run: |
47+
pip install wheel
48+
cd example_tomlgen
49+
python setup.py tomlgen_rust -w build
50+
51+
# FIXME: Can't test easily on windows 3.9 or pypy because have to build lxml from source!
52+
- name: Test html-py-ever
53+
if: ${{ !(matrix.os == 'windows-latest' && (matrix.python-version == 'pypy3' || matrix.python-version == '3.9-dev')) }}
54+
shell: bash
55+
run: |
56+
cd html-py-ever
57+
pip install -r requirements-dev.txt
58+
python setup.py install
59+
cd test && pytest
60+
61+
- name: Test other examples
62+
shell: bash
63+
run: |
64+
cd examples/
65+
# PEP517 build isolation means we don't use the setuptools-rust locally,
66+
# instead it installs from PyPI!
67+
pip install --no-use-pep517 -e rust_with_cffi/
68+
pip install -r rust_with_cffi/requirements-dev.txt
69+
pytest rust_with_cffi/tests.py

.travis.yml

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

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- Fix `tomlgen` functionality on Windows. [#78](https://github.com/PyO3/setuptools-rust/pull/78)
6+
37
## 0.11.3 (2020-08-24)
48

59
- Fix building on Linux distributions that use musl (e.g. Alpine) out of the box. [#80](https://github.com/PyO3/setuptools-rust/pull/80)

example_tomlgen/hello/english/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#[macro_use]
2-
extern crate pyo3;
3-
41
use pyo3::prelude::*;
52
use pyo3::wrap_pyfunction;
63

example_tomlgen/hello/french/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#[macro_use]
2-
extern crate pyo3;
3-
41
use pyo3::prelude::*;
52
use pyo3::wrap_pyfunction;
63

example_tomlgen/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ zip_safe = false
1010
create_workspace = true
1111

1212
[tomlgen_rust.dependencies]
13-
pyo3 = { version = "0.11.1", features = ["extension-module"] }
13+
pyo3 = { version = "0.12.1", features = ["extension-module"] }
1414

1515
[tomlgen_rust.dependencies.hello-english]
1616
english-lint = "*"

examples/namespace_package/Cargo.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/namespace_package/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ edition = "2018"
77
crate-type = ["cdylib"]
88

99
[dependencies.pyo3]
10-
version = "0.11.1"
10+
version = "0.12.1"
1111
features = ["extension-module"]

examples/rust_with_cffi/Cargo.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/rust_with_cffi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Alex Gaynor <[email protected]>"]
55
edition = "2018"
66

77
[dependencies]
8-
pyo3 = { version = "0.11.1", features = ["extension-module"]}
8+
pyo3 = { version = "0.12.1", features = ["extension-module"] }
99

1010
[lib]
1111
name = "rust_with_cffi"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pytest

0 commit comments

Comments
 (0)