Skip to content

Commit

Permalink
made changes to also build juno flavors
Browse files Browse the repository at this point in the history
  • Loading branch information
ikuraj committed Mar 4, 2013
1 parent 3223433 commit c058540
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package ch.epfl.insynth.reconstruction.combinator

import scala.math.min

import ch.epfl.insynth.{ env => InSynth }
import ch.epfl.insynth.trees.{ Type, BottomType }
import java.util.logging.Logger
import ch.epfl.insynth.trees.FormatType
import ch.epfl.insynth.reconstruction.intermediate.NullLeaf
import ch.epfl.insynth.env.FormatNode
import java.util.logging.Level
import java.util.logging.ConsoleHandler
import java.util.logging.FileHandler
import java.util.logging.SimpleFormatter
import ch.epfl.insynth.reconstruction.Config
import ch.epfl.insynth.env.FormatNode

import java.util.logging.{ Logger, Level, ConsoleHandler, FileHandler, SimpleFormatter }

// TODO set required combinations in each Tree node after we hit the limit in the top
// tree
// TODO shared and private parameters of abstractions (not to explore two trees that
Expand Down Expand Up @@ -117,7 +116,7 @@ extends Combinations
Config.logStructures.info("Tree(" + this + ") received decl with weight " +
decl.getMinComputedWeight + "and has minWeight " + minWeight)
}
minWeight = Math.min(getTraversalWeight + decl.getMinComputedWeight, minWeight)
minWeight = min(getTraversalWeight + decl.getMinComputedWeight, minWeight)
parent.childDone(this)
}

Expand Down
47 changes: 31 additions & 16 deletions ch.epfl.insynth.build/ecosystem-build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#!/bin/bash

# url names for each flavor defined below
URL_NAMES=(
"indigo-2_9"
"indigo-2_10"
"juno-2_9"
"juno-2_10"
)

# combinations of flavors to build
ECLIPSE_FLAVORS=( "indigo" )
SCALA_IDE_FLAVORS=( "scala-ide-indigo-scala-2.9" "scala-ide-indigo-scala-2.10" )
SCALA_FLAVORS=( "2.9.x" "2.10.x" )
FLAVORS=(
"-Pindigo -Pscala-ide-indigo-scala-2.9 -P2.9.x"
"-Pindigo -Pscala-ide-indigo-scala-2.10 -P2.10.x"
"-Pjuno -Pscala-ide-juno-scala-2.9 -P2.9.x"
"-Pjuno -Pscala-ide-juno-scala-2.10 -P2.10.x"
)

# root dir (containing this script)
#ROOT_DIR=$(dirname $0)
Expand All @@ -12,31 +23,35 @@ TARGET_DIR=/localhome/kuraj/temp/insynth-maven-build

mkdir -p ${TARGET_DIR}

for eclipse_flavor in "${ECLIPSE_FLAVORS[@]}"
do
for array_index in `seq 0 1`
for ((i=0; i < ${#FLAVORS[@]}; i++))
do

scala_ide_flavor=${SCALA_IDE_FLAVORS[$array_index]}
scala_flavor=${SCALA_FLAVORS[$array_index]}
FLAVOR=${FLAVORS[$i]}

COMB="${eclipse_flavor}_${scala_ide_flavor}_${scala_flavor}"
echo "Building InSynth for flavors ${eclipse_flavor} + ${scala_ide_flavor} + Scala ${scala_flavor} into ${TARGET_DIR}/${COMB}"
COMB=${URL_NAMES[$i]}
echo "Building InSynth with $FLAVOR into ${TARGET_DIR}/${COMB}"

mvn -Pset-versions -P$eclipse_flavor -P$scala_ide_flavor -P$scala_flavor -Dtycho.style=maven --non-recursive exec:java
mvn -Pset-versions $FLAVOR -Dtycho.style=maven --non-recursive exec:java

mvn -Pset-versions -P$eclipse_flavor -P$scala_ide_flavor -P$scala_flavor clean package
mvn -Pset-versions $FLAVOR clean package

RETVAL=$?
[ $RETVAL -ne 0 ] && echo "Maven build for $FLAVOR failed! Press enter to continue..." && read line

rm -rf ${TARGET_DIR}/$COMB

cp -r ${ROOT_DIR}/ch.epfl.insynth.update-site/target/site/ ${TARGET_DIR}/$COMB

# if needed publishing to LARA update site
echo "Copying files to insynth@laraserver.epfl.ch"
ssh insynth@laraserver.epfl.ch "rm -rf ~/public_html/$COMB"
scp -r ${TARGET_DIR}/$COMB insynth@laraserver.epfl.ch:~/public_html/
if [ $# -lt 1 ];
then
echo "Not copying files to insynth@laraserver.epfl.ch"
else
echo "Copying files to insynth@laraserver.epfl.ch"
ssh insynth@laraserver.epfl.ch "rm -rf ~/public_html/$COMB"
scp -r ${TARGET_DIR}/$COMB insynth@laraserver.epfl.ch:~/public_html/
fi

done
done

exit

0 comments on commit c058540

Please sign in to comment.