language: c

compiler: gcc

env:
    global:
        - USE_CCACHE=1

build:
    cache: true
    cache_dir_list:
        - ${SHIPPABLE_BUILD_DIR}/ccache
    pre_ci_boot:
        image_name: zephyrprojectrtos/ci
        image_tag: v0.9.1
        pull: true
        options: "-e HOME=/home/buildslave --privileged=true --tty --net=bridge --user buildslave"

    ci:
      - sudo apt-get install libglib2.0-dev libpcap-dev
      - export CCACHE_DIR=${SHIPPABLE_BUILD_DIR}/ccache/.ccache
      - ccache -c -s --max-size=2000M
      - make

integrations:
  notifications:
    - integrationName: slack_integration
      type: slack
      recipients:
        - "#ci"
      branches:
        only:
          - master
      on_success: never
      on_failure: always
    - integrationName: email
      type: email
      recipients:
        - builds@zephyrproject.org
      branches:
        only:
          - master
      on_success: never
      on_failure: never
