Skip to content

Commit

Permalink
Use Github Actions instead of Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Sep 12, 2020
1 parent 16a111d commit c4df7c0
Show file tree
Hide file tree
Showing 14 changed files with 161 additions and 137 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI
on:
pull_request: {}
push: {}

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9-dev, pypy3]
steps:
- uses: actions/checkout@master
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

# Install dependencies on ubuntu
- if: matrix.os == 'ubuntu-latest'
name: Install build dependencies
run: sudo apt-get install -y libxml2-dev libxslt-dev

# Install 32-bit windows target for pypy3
- if: matrix.os == 'windows-latest' && matrix.python-version == 'pypy3'
name: Install 32-bit Rust target
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: i686-pc-windows-msvc

- name: Build package
run: pip install -e .

- name: Test tomlgen_rust
shell: bash
run: |
pip install wheel
cd example_tomlgen
python setup.py tomlgen_rust -w build
# FIXME: Can't test easily on windows 3.9 or pypy because have to build lxml from source!
- name: Test html-py-ever
if: ${{ !(matrix.os == 'windows-latest' && (matrix.python-version == 'pypy3' || matrix.python-version == '3.9-dev')) }}
shell: bash
run: |
cd html-py-ever
pip install -r requirements-dev.txt
python setup.py install
cd test && pytest
- name: Test other examples
shell: bash
run: |
cd examples/
# PEP517 build isolation means we don't use the setuptools-rust locally,
# instead it installs from PyPI!
pip install --no-use-pep517 -e rust_with_cffi/
pip install -r rust_with_cffi/requirements-dev.txt
pytest rust_with_cffi/tests.py
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Fix `tomlgen` functionality on Windows. [#78](https://github.com/PyO3/setuptools-rust/pull/78)

## 0.11.3 (2020-08-24)

- Fix building on Linux distributions that use musl (e.g. Alpine) out of the box. [#80](https://github.com/PyO3/setuptools-rust/pull/80)
Expand Down
3 changes: 0 additions & 3 deletions example_tomlgen/hello/english/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[macro_use]
extern crate pyo3;

use pyo3::prelude::*;
use pyo3::wrap_pyfunction;

Expand Down
3 changes: 0 additions & 3 deletions example_tomlgen/hello/french/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[macro_use]
extern crate pyo3;

use pyo3::prelude::*;
use pyo3::wrap_pyfunction;

Expand Down
2 changes: 1 addition & 1 deletion example_tomlgen/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ zip_safe = false
create_workspace = true

[tomlgen_rust.dependencies]
pyo3 = { version = "0.11.1", features = ["extension-module"] }
pyo3 = { git = "https://github.com/davidhewitt/pyo3", branch = "pypy36", features = ["extension-module"] }

[tomlgen_rust.dependencies.hello-english]
english-lint = "*"
Expand Down
2 changes: 1 addition & 1 deletion examples/rust_with_cffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Alex Gaynor <alex.gaynor@gmail.com>"]
edition = "2018"

[dependencies]
pyo3 = { version = "0.11.1", features = ["extension-module"]}
pyo3 = { git = "https://github.com/davidhewitt/pyo3", branch = "pypy36", features = ["extension-module"] }

[lib]
name = "rust_with_cffi"
Expand Down
1 change: 1 addition & 0 deletions examples/rust_with_cffi/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest
Loading

0 comments on commit c4df7c0

Please sign in to comment.