Skip to content
Closed
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
85 changes: 85 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: CI

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

jobs:

standard:

strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest, macos-latest, windows-latest]

defaults:
run:
shell: bash -l {0}

name: ${{ matrix.runs-on }} • x64 ${{ matrix.args }}
runs-on: ${{ matrix.runs-on }}

steps:

- name: Basic GitHub action setup
uses: actions/checkout@v2

- name: Set conda environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: myenv
environment-file: environment-dev.yml
cache-env: true

- name: Configure using CMake
run: cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DPYTHON_EXECUTABLE=`which python` -DDOWNLOAD_GTEST=ON

- name: Install
working-directory: build
run: make install

- name: Build xtensor-python
working-directory: build
run: make test_xtensor_python

- name: Test xtensor-python
working-directory: build/test
run: ./test_xtensor_python

- name: Test xtensor-python (Python)
run: py.test -s

- name: Example - readme 1
working-directory: docs/source/examples/readme_example_1
run: |
cmake -Bbuild -DPython_EXECUTABLE=`which python`
cd build
cmake --build .
cp ../example.py .
python example.py
cd ..

- name: Example - Copy 'cast'
working-directory: docs/source/examples/copy_cast
run: |
cmake -Bbuild -DPython_EXECUTABLE=`which python`
cd build
cmake --build .
cp ../example.py .
python example.py
cd ..

- name: Example - SFINAE
working-directory: docs/source/examples/sfinae
run: |
cmake -Bbuild -DPython_EXECUTABLE=`which python`
cd build
cmake --build .
cp ../example.py .
python example.py
cd ..