Python 3 POCL:
    script: |
      export PYOPENCL_TEST=portable:pthread
      export EXTRA_INSTALL="pybind11 numpy mako matplotlib"

      curl -L -O https://tiker.net/ci-support-v0
      . ci-support-v0
      build_py_project_in_venv
      test_py_project
    tags:
    - python3
    - pocl
    except:
    - tags
    artifacts:
        reports:
            junit: test/pytest.xml

Python 3 POCL Titan V:
    script: |
      export PYOPENCL_TEST=portable:titan

      curl -L -O https://tiker.net/ci-support-v0
      . ci-support-v0
      build_py_project_in_conda_env
      test_py_project
    tags:
    - nvidia-titan-v
    except:
    - tags
    artifacts:
        reports:
            junit: test/pytest.xml

Python 3 POCL Titan X:
    script: |
      export PYOPENCL_TEST=portable:titan

      curl -L -O https://tiker.net/ci-support-v0
      . ci-support-v0
      build_py_project_in_conda_env
      test_py_project
    tags:
    - nvidia-titan-x
    except:
    - tags
    artifacts:
        reports:
            junit: test/pytest.xml

Python 3 POCL K40:
    script: |
      export PYOPENCL_TEST=portable:k40

      curl -L -O https://tiker.net/ci-support-v0
      . ci-support-v0
      build_py_project_in_conda_env
      test_py_project
    tags:
    - nvidia-k40
    except:
    - tags
    artifacts:
        reports:
            junit: test/pytest.xml

Python 3 POCL MPI:
    script: |
      export PYOPENCL_TEST=portable
      export EXTRA_INSTALL="numpy mako mpi4py pybind11"
      export PYTEST_ADDOPTS="-m 'mpi' --capture=no"

      curl -L -O https://tiker.net/ci-support-v0
      . ci-support-v0
      build_py_project_in_venv
      test_py_project
    tags:
    - python3
    - pocl
    except:
    - tags
    artifacts:
      reports:
        junit: test/pytest.xml

Python 3 POCL Examples:
    script: |
      test -n "$SKIP_EXAMPLES" && exit
      export PYOPENCL_TEST=portable:pthread
      export EXTRA_INSTALL="pybind11 numpy mako pyvisfile matplotlib"

      curl -L -O https://tiker.net/ci-support-v0
      . ci-support-v0
      build_py_project_in_venv
      run_examples
    tags:
    - python3
    - pocl
    except:
    - tags

Pylint:
    script: |
      export EXTRA_INSTALL="pybind11 numpy mako matplotlib mpi4py"

      curl -L -O https://tiker.net/ci-support-v0
      . ci-support-v0
      build_py_project_in_conda_env
      run_pylint "$(get_proj_name)" examples/*.py test/*.py
    tags:
    - python3
    except:
    - tags

Documentation:
    script: |
      EXTRA_INSTALL="pybind11 numpy mako mpi4py"
      curl -L -O https://tiker.net/ci-support-v0
      . ci-support-v0
      build_py_project_in_conda_env
      build_docs
    tags:
    - python3

Flake8:
    script: |
      curl -L -O https://tiker.net/ci-support-v0
      . ci-support-v0
      build_py_project_in_conda_env
      install_and_run_flake8 "$(get_proj_name)" examples/*.py test/*.py
    tags:
    - python3
    except:
    - tags

Downstream:
    parallel:
      matrix:
      - DOWNSTREAM_PROJECT: [sumpy, pytential]
    tags:
    - large-node
    - "docker-runner"
    script: |
      export PYTEST_ADDOPTS=${PYTEST_ADDOPTS:-"-m 'not slowtest'"}

      curl -L -O https://tiker.net/ci-support-v0
      . ./ci-support-v0
      test_downstream "$DOWNSTREAM_PROJECT"
