Python 3:
  script: |
    PY_EXE=python3
    # pytest tries to import this, but it doesn't find symengine
    rm pymbolic/interop/symengine.py
    EXTRA_INSTALL="numpy sympy pexpect"
    curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
    . ./build-and-test-py-project.sh
  tags:
  - python3
  - maxima
  except:
  - tags
  artifacts:
    reports:
      junit: test/pytest.xml

Python 3 Conda:
  script: |
    CONDA_ENVIRONMENT=.test-py3.yml
    curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project-within-miniconda.sh
    . ./build-and-test-py-project-within-miniconda.sh

  tags:
  - linux
  except:
  - tags
  artifacts:
    reports:
      junit: test/pytest.xml

Python 3 Conda Apple:
  script: |
    # That's where homebrew lives, and it has the curl that doesn't cause
    # cert errors from the OS being too old.
    export PATH="/usr/local/opt/curl/bin:$PATH"

    CONDA_ENVIRONMENT=.test-py3.yml
    curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project-within-miniconda.sh
    . ./build-and-test-py-project-within-miniconda.sh
  tags:
  - apple
  except:
  - tags
  artifacts:
    reports:
      junit: test/pytest.xml

Pylint:
  script:
  - EXTRA_INSTALL="numpy sympy symengine scipy pexpect"
  - PY_EXE=python3
  - curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/prepare-and-run-pylint.sh
  - ". ./prepare-and-run-pylint.sh pymbolic test/test_*.py"
  tags:
  - python3
  except:
  - tags

Documentation:
  script:
  - EXTRA_INSTALL="numpy sympy"
  - curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-docs.sh
  - ". ./build-docs.sh"
  tags:
  - linux

Flake8:
  script:
  - curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/prepare-and-run-flake8.sh
  - . ./prepare-and-run-flake8.sh pymbolic test experiments
  tags:
  - python3
  except:
  - tags

Downstream:
  parallel:
    matrix:
    - DOWNSTREAM_PROJECT: [loopy, grudge, pytential, pytato]
  tags:
  - large-node
  - "docker-runner"
  script: |
    curl -L -O https://tiker.net/ci-support-v0
    . ./ci-support-v0
    test_downstream "$DOWNSTREAM_PROJECT"
