language: cpp
sudo: required
dist: xenial
git:
  depth: 9999999
notifications:
  irc: chat.freenode.net#zoneminder-dev
branches:
  except:
  - modern
cache: ccache
addons:
  ssh_known_hosts: zmrepo.zoneminder.com
  apt:
    sources:
    - sourceline: ppa:iconnor/zoneminder-master
    - key_url: http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4D0BF748776FFB04
    packages:
    - gdebi
    - yum-utils
    - patch
    - git
    - curl
    - sshfs
    - sed
    - binfmt-support
    - qemu
    - qemu-user-static
    - dnsutils
    - traceroute
install:
  - update-binfmts --enable qemu-arm

env:
  - SMPFLAGS=-j4 OS=el DIST=7
  - SMPFLAGS=-j4 OS=el DIST=8 DOCKER_REPO=knnniggett/packpack
  - SMPFLAGS=-j4 OS=fedora DIST=30
  - SMPFLAGS=-j4 OS=fedora DIST=31
  - SMPFLAGS=-j4 OS=ubuntu DIST=trusty DOCKER_REPO=iconzm/packpack
  - SMPFLAGS=-j4 OS=ubuntu DIST=xenial DOCKER_REPO=iconzm/packpack
  - SMPFLAGS=-j4 OS=ubuntu DIST=bionic DOCKER_REPO=iconzm/packpack
  - SMPFLAGS=-j4 OS=ubuntu DIST=disco DOCKER_REPO=iconzm/packpack
  - SMPFLAGS=-j4 OS=ubuntu DIST=eoan DOCKER_REPO=iconzm/packpack
  - SMPFLAGS=-j4 OS=ubuntu DIST=focal DOCKER_REPO=iconzm/packpack
  - SMPFLAGS=-j4 OS=debian DIST=jessie DOCKER_REPO=iconzm/packpack
  - SMPFLAGS=-j4 OS=debian DIST=stretch DOCKER_REPO=iconzm/packpack
  - SMPFLAGS=-j4 OS=debian DIST=buster DOCKER_REPO=iconzm/packpack
  - SMPFLAGS=-j4 OS=ubuntu DIST=trusty ARCH=i386
  - SMPFLAGS=-j4 OS=ubuntu DIST=xenial ARCH=i386
  - SMPFLAGS=-j4 OS=ubuntu DIST=disco ARCH=i386
  - SMPFLAGS=-j4 OS=debian DIST=buster ARCH=i386
  - SMPFLAGS=-j4 OS=debian DIST=stretch ARCH=i386
  - SMPFLAGS=-j4 OS=eslint DIST=eslint

compiler:
- gcc
services:
- mysql
- docker

script:
- utils/packpack/startpackpack.sh

before_deploy:
- openssl aes-256-cbc -K $encrypted_62a62750aa73_key -iv $encrypted_62a62750aa73_iv -in ./utils/packpack/deploy_rsa.enc -out /tmp/deploy_rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa

deploy:
  provider: script
  skip_cleanup: true
  script: utils/packpack/rsync_xfer.sh
  on:
    branch: master
