Skip to content

Build matrix

Build matrix #119

Workflow file for this run

name: Testrunnner
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
jobs:
build:
runs-on: ubuntu-latest
env:
PWD_DIR: /home/runner
CPPFLAGS: "-I/usr/include -I/usr/local/include -I/home/runner/stare/include"
LDFLAGS: "-L/home/runner/stare/lib"
steps:
- uses: actions/checkout@v2
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
#if: ${{ github.event_name == 'pull_request' && inputs.debug_enabled }}
if: ${{ failure() }}
timeout-minutes: 15
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest numpy
# pip install -r requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Pull STARE
uses: actions/checkout@master
with:
repository: SpatioTemporal/STARE
path: STARE/ # need to specify path, otherwise it would overwrite pystare
- name: Install STARE
shell: bash
run: |
cd STARE/
set -x
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/stare -DSTARE_INSTALL_LIBDIR=lib -DBUILD_SHARED_LIBS=NO ..
#cmake -DSTARE_INSTALL_LIBDIR=lib -DBUILD_SHARED_LIBS=NO ..
make -j4
make install
- name: build pystare
run: |
# Setting the location where we just installed STARE
export STARE_LIB_DIR=/home/runner/stare/lib/
export STARE_INCLUDE_DIR=/home/runner/stare/include/STARE/
python3 setup.py build_ext --inplace
pip3 install .
- name: Test with pytest
run: |
pip install .[test]
pytest