stages:
  - check

variables:
  PYTHONUNBUFFERED: "1"

x86_64-ubuntu-gcc4:
  stage: check
  script:
    - git fetch origin --tags
    - pip3 install -r requirements.txt
    - (cd _build && ./drake //check)
    - tests/test.py
    - (cd examples/hello_world/_build/linux64 && ./drake //build && ./hello_world)
    - (cd examples/user_libraries/_build/linux64 && ./drake //build && ./bin/colored_shape)
    - (cd examples/gnu_builder/_build/linux64 && ./drake //build && ./bin/http_request)
  tags:
    - x86_64
    - ubuntu
    - gcc4

x86_64-osx-clang:
  stage: check
  script:
    - git fetch origin --tags
    - pip3 install -r requirements.txt
    - (cd _build && ./drake //check)
    - tests/test.py
    - (cd examples/hello_world/_build/macosx64 && ./drake //build && ./hello_world)
    - (cd examples/user_libraries/_build/macosx64 && ./drake //build && ./bin/colored_shape)
    - (cd examples/gnu_builder/_build/macosx64 && ./drake //build && ./bin/http_request)
  tags:
    - x86_64
    - osx
    - clang

stages:
  - check

variables:
  PYTHONUNBUFFERED: "1"

x86_64-ubuntu-gcc4:
  stage: check
  script:
    - git fetch origin --tags
    - pip3 install -r requirements.txt
    - (cd _build && ./drake //check)
    - tests/test.py
    - (cd examples/hello_world/_build/linux64 && ./drake //build && ./hello_world)
    - (cd examples/user_libraries/_build/linux64 && ./drake //build && ./bin/colored_shape)
    - (cd examples/gnu_builder/_build/linux64 && ./drake //build && ./bin/http_request)
  tags:
    - x86_64
    - ubuntu
    - gcc4

x86_64-osx-clang:
  stage: check
  script:
    - git fetch origin --tags
    - pip3 install --user -r requirements.txt
    - (cd _build && ./drake //check)
    - tests/test.py
    - (cd examples/hello_world/_build/macosx64 && ./drake //build && ./hello_world)
    - (cd examples/user_libraries/_build/macosx64 && ./drake //build && ./bin/colored_shape)
    - (cd examples/gnu_builder/_build/macosx64 && ./drake //build && ./bin/http_request)
  tags:
    - x86_64
    - osx
    - clang

Install python packages as user on OSX.
CI: Install python packages as user on OSX.
