Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

migrate to GitHub Actions #179

Merged
merged 5 commits into from
May 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/gh_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
- name: Install package
run: |
pip install -r requirements_build.txt
python setup.py build
python setup.py install
- name: Build docs
run: |
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Package tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: ${{ matrix.os }}, Python ${{ matrix.python_version }} (${{ matrix.python_arch }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python_version:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
python_arch:
- x64
include:
- os: windows-latest
python_version: '3.6'
python_arch: x86
- os: windows-latest
python_version: '3.7'
python_arch: x86
- os: windows-latest
python_version: '3.8'
python_arch: x86
- os: windows-latest
python_version: '3.9'
python_arch: x86
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 3
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
architecture: ${{ matrix.python_arch }}
- name: Check Python version
shell: python
run: |
import struct
import sys

assert sys.version_info[:2] == tuple(map(int, "${{ matrix.python_version }}".split(".")))
assert f"x{struct.calcsize('P') * 8}".replace("32", "86") == "${{ matrix.python_arch }}"
Comment on lines +53 to +60
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check that this stuff works:

https://github.com/StrikerRUS/lightning/commit/340aa6aff902c472ab6b60c7226a07d26f4996d5
and corresponding to the commit above workflow run (note that all x86 jobs fail): https://github.com/StrikerRUS/lightning/actions/runs/860558934

- name: Install package
run: |
python -m pip install --upgrade pip
pip install -r requirements_build.txt -r requirements_test.txt
python setup.py install
- name: Run tests
run: pytest -v --pyargs lightning
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include MANIFEST.in
include Makefile
include requirements*.txt
recursive-include lightning *.c *.h *.cpp *.pyx *.pxd
12 changes: 4 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
.. -*- mode: rst -*-

.. image:: https://travis-ci.org/scikit-learn-contrib/lightning.svg?branch=master
:target: https://travis-ci.org/scikit-learn-contrib/lightning

.. image:: https://ci.appveyor.com/api/projects/status/mmm0llccmvn5iooq?svg=true
:target: https://ci.appveyor.com/project/fabianp/lightning/branch/master
.. image:: https://github.com/scikit-learn-contrib/lightning/actions/workflows/main.yml/badge.svg?branch=master
:target: https://github.com/scikit-learn-contrib/lightning/actions/workflows/main.yml

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.200504.svg
:target: https://doi.org/10.5281/zenodo.200504
Expand Down Expand Up @@ -66,7 +63,7 @@ penalty on the News20 dataset (c.f., `Blondel et al. 2013
Dependencies
------------

lightning requires Python >= 3.6, setuptools, Numpy >= 1.12, SciPy >= 0.19 and
lightning requires Python >= 3.6, setuptools, Joblib, Numpy >= 1.12, SciPy >= 0.19 and
scikit-learn >= 0.19. Building from source also requires Cython and a working C/C++ compiler. To run the tests you will also need pytest.

Installation
Expand All @@ -90,8 +87,7 @@ The development version of lightning can be installed from its git repository. I

git clone https://github.com/scikit-learn-contrib/lightning.git
cd lightning
python setup.py build
sudo python setup.py install
python setup.py install

Documentation
-------------
Expand Down
66 changes: 0 additions & 66 deletions appveyor.yml

This file was deleted.