Skip to content

Commit

Permalink
CI: Switch to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBB authored and VikingScientist committed May 31, 2021
1 parent 9d0225e commit 0f0bd46
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 140 deletions.
101 changes: 101 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Python package

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
create:
tags:

jobs:

test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements.dev.txt
- name: Install package
run: |
pip install .
- name: Test with pytest
run: |
pytest --benchmark-skip
build_wheels:
name: Build wheels
needs: [test]
runs-on: ${{ matrix.os }}
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.dev.txt
pip install cibuildwheel
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*
CIBW_BEFORE_BUILD: pip install cython
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build sdist
needs: [test]
runs-on: ubuntu-latest
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.dev.txt
- name: Build sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz

deploy:
name: Deploy
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_pwd }}
67 changes: 0 additions & 67 deletions .travis.yml

This file was deleted.

27 changes: 0 additions & 27 deletions ci/before_install.sh

This file was deleted.

40 changes: 0 additions & 40 deletions ci/install.sh

This file was deleted.

3 changes: 3 additions & 0 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Cython==0.29.15
pytest==5.3.5
pytest-benchmark==3.2.3
9 changes: 3 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
Cython==0.29.15
numpy==1.18.1
pytest==5.3.5
scipy==1.4.1
pytest-benchmark==3.2.3
h5py==2.10.0
numpy==1.19.5
scipy==1.5.4
h5py==3.1.0
tqdm==4.41.1
nutils==4.1

0 comments on commit 0f0bd46

Please sign in to comment.