version: 2.0
jobs:
  build:
    docker:
       - image: alantrrs/cuda-opencv:latest
#      - image: nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04
    working_directory: ~/work
    steps:
      - checkout
      - run: nvcc --version
      - run: gcc --version
      - run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 -j 8
      - run: make clean
      - run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 DEBUG=1 -j 8
      - run: make clean
      - run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 AVX=1 -j 8
      - run: make clean
      - run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=1 -j 8
      - run: make clean
      - run: make LIBSO=1 GPU=1 CUDNN=0 OPENCV=1 -j 8
      - run: make clean
      - run: make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 -j 8
      - run: make clean
      - run: make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1 -j 8
      - run: make clean
      - run: make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1 USE_CPP=1 -j 8