Added support for Mac OS and addressed issue with Travis Mac OS builds failing silently when 'set -e' command is used in the .travis.yml file by moving the script into travis_build.sh.

This commit is contained in:
esaunders 2019-10-30 13:23:05 -04:00
parent bc21a24caf
commit af56179eba
2 changed files with 33 additions and 6 deletions

View File

@ -1,8 +1,11 @@
language: java language: java
sudo: required sudo: required
dist: bionic
os: jobs:
- linux include:
- os: linux
dist bionic
- os: osx
env: env:
global: global:
@ -12,6 +15,7 @@ addons:
apt: apt:
update: true update: true
packages: packages:
- testdisk
- libafflib-dev - libafflib-dev
- libewf-dev - libewf-dev
- libpq-dev - libpq-dev
@ -29,11 +33,13 @@ addons:
update: true update: true
packages: packages:
- ant - ant
- ant-optional - wget
- libpq
- libewf - libewf
- gettext - gettext
- cppunit - cppunit
- afflib - afflib
- testdisk
python: python:
- "2.7" - "2.7"
@ -43,7 +49,6 @@ before_install:
- python setupSleuthkitBranch.py - python setupSleuthkitBranch.py
install: install:
- sudo apt-get install testdisk
- cd sleuthkit/sleuthkit - cd sleuthkit/sleuthkit
- ./travis_install_libs.sh - ./travis_install_libs.sh
@ -54,12 +59,22 @@ before_script:
export PATH=/usr/bin:$PATH; export PATH=/usr/bin:$PATH;
unset JAVA_HOME; unset JAVA_HOME;
fi fi
- if [ $TRAVIS_OS_NAME = osx ]; then
brew uninstall java --force;
brew cask uninstall java --force;
brew tap adoptopenjdk/openjdk;
brew cask install adoptopenjdk8;
wget https://cdn.azul.com/zulu/bin/zulu8.40.0.25-ca-fx-jdk8.0.222-macosx_x64.tar.gz;
sudo tar xf zulu8.40.0.25-ca-fx-jdk8.0.222-macosx_x64.tar.gz --strip-components=1 -C /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home;
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home;
fi
- java -version
script: script:
- set -e - set -e
- echo "Building TSK..." - echo "Building TSK..."
- ./bootstrap && ./configure --prefix=/usr && make - ./bootstrap && ./configure --prefix=/usr && make
- pushd bindings/java/ && ant -q dist-PostgreSQL && popd - pushd bindings/java && ant dist-PostgreSQL && popd
- echo "Building Autopsy..." && echo -en 'travis_fold:start:script.build\\r' - echo "Building Autopsy..." && echo -en 'travis_fold:start:script.build\\r'
- cd $TRAVIS_BUILD_DIR/ - cd $TRAVIS_BUILD_DIR/
- ant build - ant build

12
travis_build.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -e
echo "Building TSK..."
cd sleuthkit/sleuthkit
./bootstrap && configure --prefix=/usr && make
pushd bindings/java && ant -q dist-PostgreSQL && popd
echo "Building Autopsy..." && echo -en 'travis_fold:start:script.build\\r'
cd $TRAVIS_BUILD_DIR/
ant build
echo -en 'travis_fold:end:script.build\\r'