Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions for CI #855

Merged
merged 27 commits into from
May 14, 2020
Merged
Changes from 9 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6fc5944
Add GitHub CI.
dalonsoa Feb 24, 2020
40ddcf2
Merge pull request #1 from dalonsoa/github_ci
dalonsoa Feb 24, 2020
9d6486f
Add DYLD_LIBRARY_PATH as ENV.
dalonsoa Mar 26, 2020
b5a2db6
Merge branch 'github_ci'
dalonsoa Mar 26, 2020
9b4ecdd
Correct library path.
dalonsoa Mar 26, 2020
719faf5
Correct library path.
dalonsoa Mar 26, 2020
b5702ac
Change definition of ENV to the relevant steps.
dalonsoa Mar 27, 2020
360cb80
Removed already installed dependencies in MacOS.
dalonsoa Mar 27, 2020
f5d5e4b
Add scheduled testing.
dalonsoa Mar 27, 2020
786aad5
:bug: libsparse tests not working in macOS.
dalonsoa May 11, 2020
1494608
:bug: removed too much.
dalonsoa May 11, 2020
113486c
Change to new KLU installer.
dalonsoa May 11, 2020
4d1d5cb
Merge branch 'develop' into add_github_actions
dalonsoa May 11, 2020
cb1aed3
Add wheel dependency.
dalonsoa May 11, 2020
549c47b
Add missing dependencies.
dalonsoa May 11, 2020
078c8ed
Still playing with the libraries.
dalonsoa May 11, 2020
0743552
Still playing with the libraries.
dalonsoa May 11, 2020
a577cd2
Still playing with the libraries.
dalonsoa May 11, 2020
92ff49e
Still playing with the libraries.
dalonsoa May 11, 2020
2182270
Still playing with the libraries.
dalonsoa May 11, 2020
5cf2452
Still playing with the libraries.
dalonsoa May 11, 2020
e47def4
:bug: Doctets failing due to mismatch in unsorted output.
dalonsoa May 11, 2020
bdb11b9
Update CHANGELOG.
dalonsoa May 11, 2020
8d41cc9
Merge branch 'sorted_cli_params' into add_github_actions
dalonsoa May 11, 2020
a9b55b6
Add scikit solvers. Update CHANGELOG.
dalonsoa May 11, 2020
ff74529
Review scikit.odes installation.
dalonsoa May 14, 2020
5dcf52b
Remove space.
dalonsoa May 14, 2020
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
100 changes: 100 additions & 0 deletions .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: PyBaMM

on:
push:

# everyday at 3 am UTC
schedule:
- cron: '* 3 * * *'

jobs:

style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check style
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e .[dev]

- name: Check style
run: python -m flake8

build:
needs: style
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7]

env:
LD_LIBRARY_PATH: 'SuiteSparse-5.6.0/lib:sundials/lib'
DYLD_LIBRARY_PATH: 'SuiteSparse-5.6.0/lib:sundials/lib'
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think thats required as LD_LIBRARY_PATH has precedence over DYLD_LIBRARY_PATH.
See the apple docs


steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install Linux system dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt install gfortran gcc libopenblas-dev liblapack-dev graphviz libsuitesparse-dev
Copy link
Contributor

Choose a reason for hiding this comment

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

libsuitesparse-dev is actually not required as SuiteSparse is installed from sources later

sudo apt install python${{ matrix.python-version }}.dev

- name: Install MacOS system dependencies
if: matrix.os == 'macos-latest'
run: |
brew update
brew install graphviz
brew install openblas suitesparse
Copy link
Contributor

Choose a reason for hiding this comment

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

suitesparse isnt required since compiled and installed later on


- name: Install Windows system dependencies
if: matrix.os == 'windows-latest'
run: choco install graphviz

- name: Install standard python dependencies
run: |
python -m pip install --upgrade pip
pip install .

- name: Install SUNDIALS and SuiteSparse
if: matrix.os != 'windows-latest'
run: |
pip install wget
mkdir -p third-party/pybind11
git clone https://github.com/pybind/pybind11.git third-party/pybind11
python setup.py install_all -f
source ~/.bashrc
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand correctly, each command in GitHub steps is ran using /bin/bash -e {0}, which won't source the .bashrc (I think?) Furthermore each run: entry is executed in a separate shell, thus not inheriting previous env variables


- name: Run unit tests
run: |
python run-tests.py --unit --folder all
tlestang marked this conversation as resolved.
Show resolved Hide resolved

- name: Install docs dependencies and run doctests
if: matrix.os != 'windows-latest'
run: |
pip install -e .[docs]
python run-tests.py --doctest

- name: Install dev python dependencies and run style and example tests
if: matrix.os != 'windows-latest'
run: |
pip install -e .[dev]
python run-tests.py --examples

- name: Instal and run coverage
if: success() && (matrix.os == 'unbuntu-latest' && matrix.python-version == 3.7)
run: |
pip install coverage codecov
codecov