-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate Zinc server in the Travis CI build.
- Loading branch information
1 parent
d4c8877
commit 1bbb0e2
Showing
6 changed files
with
146 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
# use of container-based infrastructure | ||
sudo: false | ||
|
||
dist: trusty | ||
|
||
language: java | ||
|
||
# use Java 8 for the build | ||
jdk: | ||
- oraclejdk8 | ||
|
||
# use of container-based infrastructure | ||
sudo: false | ||
|
||
cache: | ||
directories: | ||
$HOME/.m2 | ||
- $HOME/.m2 | ||
- $HOME/.zinc | ||
|
||
install: | ||
- mvn -q dependency:resolve-plugins | ||
- mvn -q dependency:resolve | ||
- tools/zinc_setup.sh | ||
|
||
before_script: | ||
- tools/zinc.sh start | ||
|
||
script: | ||
- mvn install | ||
|
||
after_script: | ||
- tools/zinc.sh stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright 2014, TU Berlin. | ||
This project includes software developed by TU Berlin. | ||
http://www.tu-berlin.de/ | ||
|
||
Licensed under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at: | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
|
||
This project includes: | ||
#GENERATED_NOTICES# |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (C) 2014 TU Berlin ([email protected]) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
STARTSTOP=$1 | ||
|
||
# zinc options | ||
ZN_ROOT="$HOME/.zinc" | ||
ZN_HOME="$ZN_ROOT/zinc-0.3.13" | ||
ZN_PORT=3030 | ||
ZN_SCALA_ROOT="$HOME/.m2/repository/org/scala-lang" | ||
ZN_SCALA_COMPILER="$ZN_SCALA_ROOT/scala-compiler/2.11.8/scala-compiler-2.11.8.jar" | ||
ZN_SCALA_LIBRARY="$ZN_SCALA_ROOT/scala-library/2.11.8/scala-library-2.11.8.jar" | ||
ZN_SCALA_REFLECT="$ZN_SCALA_ROOT/scala-reflect/2.11.8/scala-reflect-2.11.8.jar" | ||
ZN_SCALA_PATH="$ZN_SCALA_COMPILER,$ZN_SCALA_LIBRARY,$ZN_SCALA_REFLECT" | ||
|
||
case $STARTSTOP in | ||
|
||
(start) | ||
$ZN_HOME/bin/zinc -scala-path=$ZN_SCALA_PATH -port=$ZN_PORT -start | ||
;; | ||
|
||
(stop) | ||
$ZN_HOME/bin/zinc -shutdown | ||
;; | ||
|
||
(status) | ||
$ZN_HOME/bin/zinc -status | ||
;; | ||
|
||
(*) | ||
$ZN_HOME/bin/zinc $@ | ||
;; | ||
|
||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (C) 2014 TU Berlin ([email protected]) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
ZN_ROOT="$HOME/.zinc" | ||
ZN_HOME="$ZN_ROOT/zinc-0.3.13" | ||
ZN_HASH="8cad8cedb59b9b3b7cd92f95f2c81b91" | ||
ZN_LINK="http://downloads.typesafe.com/zinc/0.3.13/zinc-0.3.13.tgz" | ||
|
||
FILE_PATH="${BASH_SOURCE%/*}" | ||
|
||
if [[ ! -d "$FILE_PATH" ]]; then | ||
FILE_PATH="$PWD" | ||
fi | ||
|
||
# create "$HOME/.zinc.sh" folder it does not exist | ||
if [ ! -e $ZN_ROOT ]; then | ||
mkdir $ZN_ROOT | ||
fi | ||
|
||
# ensure that "$HOME/.zinc.sh" is a writable folder | ||
if [ ! -d $ZN_ROOT ] || [ ! -x $ZN_ROOT ] || [ ! -w $ZN_ROOT ]; then | ||
echo "$ZN_ROOT is not a writable folder" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
if [ -e $ZN_HOME ]; then | ||
if [ ! -d $ZN_HOME ] || [ ! -x $ZN_HOME ] || [ ! -w $ZN_HOME ]; then | ||
echo "$ZN_HOME is not a writable folder" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
if [ $ZN_HASH != $(cd $ZN_HOME && find . -type f -exec md5sum {} \; | sort | md5sum | cut -d ' ' -f 1) ]; then | ||
echo "md5sum of '$ZN_HOME' does not match expected value '$ZN_HASH'" | ||
echo "removing '$ZN_HOME'" | ||
rm -Rf $ZN_HOME | ||
echo "downloading '$ZN_LINK' in '$ZN_HOME'" | ||
curl -s $ZN_LINK | tar xz -C $ZN_ROOT | ||
else | ||
echo "md5sum of existing folder '$ZN_HOME' matches expected value '$ZN_HASH'" | ||
fi | ||
else | ||
echo "downloading '$ZN_LINK' in '$ZN_HOME'" | ||
curl -s $ZN_LINK | tar xz -C $ZN_ROOT | ||
fi | ||
|
||
test $ZN_HASH == $(cd $ZN_HOME && find . -type f -exec md5sum {} \; | sort | md5sum | cut -d ' ' -f 1) |