Skip to content

Andrew cheng827-02_wave (WIP) #186

Andrew cheng827-02_wave (WIP)

Andrew cheng827-02_wave (WIP) #186

Workflow file for this run

# Workflow for running verification tests from original textbook on Devito functions
name: Verification
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tutorials:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
DEVITO_ARCH: "${{ matrix.compiler }}"
DEVITO_LANGUAGE: ${{ matrix.language }}
DEVITO_BACKEND: "core"
PYTHON_VERSION: "3.7"
RUN_CMD: ""
strategy:
# Prevent all build to stop if a single one fails
fail-fast: false
matrix:
name: [tutos-ubuntu-gcc-py37,
tutos-osx-gcc-py37,
tutos-osx-clang-py37]
include:
- name: tutos-ubuntu-gcc-py37
os: ubuntu-16.04
compiler: gcc-7
language: "openmp"
- name: tutos-osx-gcc-py37
os: macos-latest
compiler: gcc-9
language: "openmp"
- name: tutos-osx-clang-py37
os: macos-latest
compiler: clang
language: "C"
steps:
- name: Checkout devito_book
uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install compilers for OSX
if: runner.os == 'macOS'
run: |
if [ "${{ matrix.compiler }}" = "gcc-9" ]; then
brew install gcc
else
sudo xcode-select -s /Applications/Xcode_11.app/Contents/Developer
fi
# dask error on osx, skip dask tuto
echo "::set-env name=SKIP::--deselect=examples/seismic/tutorials/04_dask.ipynb"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install matplotlib
pip install --user git+https://github.com/devitocodes/devito.git
- name: Waves (2.1 to 2.5)
run: |
cd fdm-devito-notebooks/02_wave/src-wave/wave1D
$RUN_CMD python -m pytest -W ignore::DeprecationWarning -s -v --cov . --cov-config=.coveragerc --cov-report=xml:waves_coverage.xml $SKIP wave1D_u0.py::test_constant
- name: Diffusion (3.7)
run: |
cd fdm-devito-notebooks/03_diffu/src-diffu
$RUN_CMD python -m pytest -W ignore::DeprecationWarning -s -v --cov . --cov-config=.coveragerc --cov-report=xml:diffu_coverage.xml $SKIP random_walk.py
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: ${{ matrix.name }}
file: ./*_coverage.xml