sudo: required
dist: xenial
language: python
python:
  - 3.6
  - 3.7

before_install:
  - sudo apt-get -yq install software-properties-common
  - sudo apt-add-repository -y multiverse
  - sudo apt-get -yq update
  - sudo apt-get -yq install automake build-essential libyaml-dev libmagic-dev cython autoconf libffi-dev libfuzzy-dev unzip
  - pip install stoq-framework
  - wget -O /tmp/xorsearch.zip https://didierstevens.com/files/software/XORSearch_V1_11_1.zip
  - unzip /tmp/xorsearch.zip -d /tmp
  - sudo mv /tmp/Linux/xorsearch /home/travis/build/PUNCH-Cyber/stoq-plugins-public/xorsearch/xorsearch/xorsearch
  - sudo chmod +x /home/travis/build/PUNCH-Cyber/stoq-plugins-public/xorsearch/xorsearch/xorsearch

install:
  - pip install -r hash_ssdeep/requirements.txt
  - pip install -r javaclass/requirements.txt
  - pip install -r mimetype/requirements.txt
  - pip install -r yara/requirements.txt

script:
  - python hash/setup.py test
  - python hash_ssdeep/setup.py test
  - python javaclass/setup.py test
  - python mimetype/setup.py test
  - python xorsearch/setup.py test
  - python yara/setup.py test

sudo: required
dist: xenial
language: python
python:
  - 3.6
  - 3.7

before_install:
  - sudo apt-get -yq install software-properties-common
  - sudo apt-add-repository -y multiverse
  - sudo apt-get -yq update
  - sudo apt-get -yq install automake build-essential libyaml-dev libmagic-dev cython autoconf libffi-dev libfuzzy-dev unzip
  - pip install stoq-framework
  - wget -O /tmp/xorsearch.zip https://didierstevens.com/files/software/XORSearch_V1_11_1.zip
  - unzip /tmp/xorsearch.zip -d /tmp
  - sudo gcc -o /usr/local/bin/xorsearch /tmp/XORSearch.c
  - sed -i "s@bin_path = xorsearch@bin_path = /usr/local/bin/xorsearch@" /home/travis/build/PUNCH-Cyber/stoq-plugins-public/xorsearch/xorsearch/xorsearch.stoq

install:
  - pip install -r hash_ssdeep/requirements.txt
  - pip install -r javaclass/requirements.txt
  - pip install -r mimetype/requirements.txt
  - pip install -r yara/requirements.txt

script:
  - python hash/setup.py test
  - python hash_ssdeep/setup.py test
  - python javaclass/setup.py test
  - python mimetype/setup.py test
  - python xorsearch/setup.py test
  - python yara/setup.py test

Handle xorsearch path better at build
Handle xorsearch path better at build
