Skip to content

Use renamed dmp-decompose-2d -> dmp-decompose. #125

Use renamed dmp-decompose-2d -> dmp-decompose.

Use renamed dmp-decompose-2d -> dmp-decompose. #125

name: CI-core
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master
jobs:
pytest:
name: ${{ matrix.name }}-${{ matrix.set }}
runs-on: "${{ matrix.os }}"
env:
DEVITO_ARCH: "${{ matrix.arch }}"
DEVITO_LANGUAGE: ${{ matrix.language }}
OMP_NUM_THREADS: 2
strategy:
# Prevent all build to stop if a single one fails
fail-fast: false
matrix:
name: [
pytest-ubuntu-py310-gcc10-noomp
]
set: [base, adjoint]
include:
- name: pytest-ubuntu-py310-gcc10-noomp
python-version: '3.10'
os: ubuntu-20.04
arch: "gcc-10"
language: "C"
sympy: "1.10"
- set: base
test-set: 'not adjoint'
- set: adjoint
test-set: 'adjoint'
exclude:
- name: pytest-osx-py37-clang-omp
set: adjoint
steps:
- name: Checkout devito
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
if: "!contains(matrix.name, 'docker')"
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install GCC ${{ matrix.arch }}
if: "runner.os == 'linux' && !contains(matrix.name, 'docker')"
run : |
sudo apt-get install -y ${{ matrix.arch }}
- name: Set tests (reduced number for OSX)
run : |
if [ "${{ runner.os }}" == 'macOS' ]; then
echo "::set-output name=TESTS::tests/test_operator.py"
else
echo "::set-output name=TESTS::tests/"
fi
id: set-tests
- name: Install dependencies
if: "!contains(matrix.name, 'docker')"
run: |
pip install --upgrade pip
pip install -e .
pip install sympy==${{matrix.sympy}}
- name: Test with pytest
run: |
${{ steps.set-run.outputs.RUN_CMD }} ${{ matrix.arch }} --version
${{ steps.set-run.outputs.RUN_CMD }} pytest -k "${{ matrix.test-set }}" -m "not parallel" --cov --cov-config=.coveragerc --cov-report=xml ${{ steps.set-tests.outputs.TESTS }}