Skip to content

Fix for #114

Fix for #114 #813

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
# Check all PR
jobs:
tests:
runs-on: ${{ matrix.os }}
name: Test on ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-20.04
- os: macos-11
steps:
- uses: actions/checkout@v3
- name: setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: setup Julia
uses: julia-actions/setup-julia@v1
with:
version: '1.9.2'
- name: install tests dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: run C++ build and tests
run: |
mkdir build
cd build
cmake -DSPHERICART_BUILD_EXAMPLES=ON -DSPHERICART_BUILD_TESTS=ON ..
cmake --build . --parallel
ctest
- name: run Python tests
run: tox
env:
# Use the CPU only version of torch when building/running the code
PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu
- name: run Julia tests
run: |
cd julia/test/
julia --project=.. -e 'using Pkg; Pkg.instantiate(); Pkg.precompile();'
julia --project=.. runtests.jl
cd python/
julia -e 'using Pkg; Pkg.add("PyCall"); Pkg.instantiate();'
python -m pip install numpy pytest sphericart julia
python -m pytest .
# check that we can build Python wheels on any Python version
python-build:
runs-on: ubuntu-20.04
name: check Python build
strategy:
matrix:
python-version: ['3.7', '3.11']
steps:
- uses: actions/checkout@v3
- name: set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox wheel
- name: python build tests
run: tox -e build-python
- name: torch build tests
run: tox -e build-torch
env:
# Use the CPU only version of torch when building/running the code
PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu