gtsam/wrap/.github/workflows/ci.yml

52 lines
1.5 KiB
YAML

name: Python CI
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.name }} 🐍 ${{ matrix.python_version }}
runs-on: ${{ matrix.os }}
env:
PYTHON_VERSION: ${{ matrix.python_version }}
strategy:
fail-fast: false
matrix:
# Github Actions requires a single row to be added to the build matrix.
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
name: [
ubuntu-18.04
]
python_version: [3]
include:
- name: ubuntu-18.04
os: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get -y update
sudo apt install cmake build-essential pkg-config libpython-dev python-numpy libboost-all-dev
- name: Install (macOS)
if: runner.os == 'macOS'
run: |
brew install cmake ninja boost
- name: Build (Linux)
if: runner.os == 'Linux'
run: |
sudo pip$PYTHON_VERSION install -r requirements.txt
cd tests
python$PYTHON_VERSION test_pybind_wrapper.py
python$PYTHON_VERSION test_matlab_wrapper.py
- name: Build (macOS)
if: runner.os == 'macOS'
run: |
pip$PYTHON_VERSION install -r requirements.txt
cd tests
python$PYTHON_VERSION test_pybind_wrapper.py
python$PYTHON_VERSION test_matlab_wrapper.py