# Copyright (c) 2014-2016 Jakub 'beamerkun' Sokół
# Licensed under MIT License
# Full text avaliable in LICENSE file located in project root
# http://github.com/beamerkun/cutDetector/blob/master/LICENSE

box:
    id: beamerkun/cutdetector
    username: $USERNAME
    password: $PASSWORD
    tag: 1.2

build:
    steps:
        - script:
            name: 'init submodules'
            code: |
                git submodule update --init --recursive
        - script:
            name: 'cmake'
            code: |
                cd $WERCKER_OUTPUT_DIR
                cmake $WERCKER_SOURCE_DIR
                make
        - script:
            name: 'run unit tests'
            code: |
                cd $WERCKER_OUTPUT_DIR/out
                ./runUnitTests
store-build:
    steps:
        - github-create-release:
            token: $GITHUB_TOKEN
            tag: ci-$WERCKER_MAIN_PIPELINE_STARTED
        - github-upload-asset:
            token: $GITHUB_TOKEN
            file: ./out/cutDetector
        - github-upload-asset:
            token: $GITHUB_TOKEN
            file: ./out/cutDetector_gui

# Copyright (c) 2014-2016 Jakub 'beamerkun' Sokół
# Licensed under MIT License
# Full text avaliable in LICENSE file located in project root
# http://github.com/beamerkun/cutDetector/blob/master/LICENSE

box:
    id: beamerkun/cutdetector-opencv3
    username: $USERNAME
    password: $PASSWORD
    tag: 1.0

build:
    steps:
        - script:
            name: 'init submodules'
            code: |
                git submodule update --init --recursive
        - script:
            name: 'cmake'
            code: |
                cd $WERCKER_OUTPUT_DIR
                cmake $WERCKER_SOURCE_DIR
                make
        - script:
            name: 'run unit tests'
            code: |
                cd $WERCKER_OUTPUT_DIR/out
                ./runUnitTests
build-opencv2:
    box:
        id: beamerkun/cutdetector
        username: $USERNAME
        password: $PASSWORD
        tag: 1.2
    steps:
        - script:
            name: 'init submodules'
            code: |
                git submodule update --init --recursive
        - script:
            name: 'cmake'
            code: |
                cd $WERCKER_OUTPUT_DIR
                cmake $WERCKER_SOURCE_DIR
                make
        - script:
            name: 'run unit tests'
            code: |
                cd $WERCKER_OUTPUT_DIR/out
                ./runUnitTests
store-build:
    steps:
        - github-create-release:
            token: $GITHUB_TOKEN
            tag: ci-$WERCKER_MAIN_PIPELINE_STARTED
        - github-upload-asset:
            token: $GITHUB_TOKEN
            file: ./out/cutDetector
        - github-upload-asset:
            token: $GITHUB_TOKEN
            file: ./out/cutDetector_gui

Update to opencv3 as default build env
Update to opencv3 as default build env

- Still build/test opencv2 though
