# Specify the docker image to use (only used if using docker runners)
# See: http://doc.gitlab.com/ee/ci/docker/using_docker_images.html
image: ubuntu:18.04

# Install needed tools
before_script:
  - apt-get update
  - apt-get install -y autoconf build-essential libtool yasm wget git libtool-bin valgrind

# Build kvazaar and run tests
build-kvazaar:
  stage: build
  script:
    - ./autogen.sh
    - ./configure --enable-werror
    - make --jobs=2 V=1    
  artifacts:
    paths:
    - src/kvazaar
    - src/.libs
    
run-tests:
  stage: test
  script:
    - bash .travis-install.bash  
    - ./autogen.sh
    - ./configure  
    - PATH="${HOME}/bin:${PATH}" KVAZAAR_OVERRIDE_angular_pred=generic KVAZAAR_OVERRIDE_sao_band_ddistortion=generic KVAZAAR_OVERRIDE_sao_edge_ddistortion=generic KVAZAAR_OVERRIDE_calc_sao_edge_dir=generic make check
    
    
    

# Use Kvazaar CI base image which includes the build tools and ffmpeg + hmdec in ${HOME}/bin
image: ultravideo/kvazaar_ci_base:latest


# Build kvazaar and run tests
build-kvazaar:
  stage: build
  script:
    - ./autogen.sh
    - ./configure --enable-werror
    - make --jobs=2 V=1    
  artifacts:
    paths:
    - src/kvazaar
    - src/.libs
    expire_in: 1 week
    
run-tests:
  stage: test
  script:
    - ./autogen.sh
    - ./configure  
    - PATH="${HOME}/bin:${PATH}" KVAZAAR_OVERRIDE_angular_pred=generic KVAZAAR_OVERRIDE_sao_band_ddistortion=generic KVAZAAR_OVERRIDE_sao_edge_ddistortion=generic KVAZAAR_OVERRIDE_calc_sao_edge_dir=generic make check
    
    
    

Use ultravideo/kvazaar_ci_base image to reduce installation needs
Use ultravideo/kvazaar_ci_base image to reduce installation needs
