version: 2
jobs:
  build:
    docker:
      - image: delphes/docker-ubuntu-1710:latest
    steps:
      - checkout
      - run:
          name: Setup environment
          command: |
            echo 'export ROOTSYS=/opt/root' >> $BASH_ENV
            echo 'export PATH=$ROOTSYS/bin:$PATH' >> $BASH_ENV
            echo 'export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH' >> $BASH_ENV
            echo 'export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH' >> $BASH_ENV
      - run:
          name: Build Delphes
          command: |
            make -j `nproc`
