-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from mscharley/cross-build
Cross build
- Loading branch information
Showing
11 changed files
with
188 additions
and
29 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
4.3.2 |
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 |
---|---|---|
@@ -1,32 +1,39 @@ | ||
import sbtcrossproject.{CrossType, crossProject} | ||
|
||
lazy val commonSettings = Seq( | ||
scalaVersion := "2.11.8", | ||
scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") | ||
scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature", "-Xlint") | ||
) | ||
|
||
lazy val xoroshiro128 = (project in file(".")). | ||
settings(commonSettings : _*). | ||
settings( | ||
organization := "com.mscharley", | ||
name := "xoroshiro128", | ||
|
||
libraryDependencies ++= Seq( | ||
// Disambiguation. | ||
"org.scala-lang" % "scala-reflect" % "2.11.8", | ||
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4", | ||
"org.scala-lang.modules" %% "scala-xml" % "1.0.4", | ||
lazy val testingSettings = Seq( | ||
libraryDependencies ++= Seq( | ||
// Testing libraries. | ||
"org.scalatest" %%% "scalatest" % "3.0.1" % "test" | ||
) | ||
) | ||
|
||
// Testing libraries. | ||
"org.scalatest" %% "scalatest" % "3.0.0" % "test" | ||
lazy val xoroshiro128 = | ||
crossProject(JVMPlatform, JSPlatform, NativePlatform) | ||
.crossType(CrossType.Full) | ||
.settings( | ||
commonSettings, | ||
organization := "com.mscharley", | ||
name := "xoroshiro128" | ||
) | ||
) | ||
.jvmSettings(testingSettings) | ||
.jsSettings(testingSettings) | ||
|
||
lazy val xoroshiro128JVM = xoroshiro128.jvm | ||
lazy val xoroshiro128JS = xoroshiro128.js | ||
lazy val xoroshiro128Native = xoroshiro128.native | ||
|
||
lazy val benchmark = (project in file("benchmark")). | ||
settings(commonSettings : _*). | ||
settings( | ||
mainClass in Compile := Some("Benchmark"), | ||
lazy val benchmark = | ||
(project in file("benchmark")) | ||
.settings( | ||
commonSettings, | ||
mainClass in Compile := Some("Benchmark"), | ||
|
||
// Scalameter for speed testing. | ||
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/releases", | ||
libraryDependencies += "com.storm-enroute" %% "scalameter-core" % "0.7" | ||
).dependsOn(xoroshiro128) | ||
// Scalameter for speed testing. | ||
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/releases", | ||
libraryDependencies += "com.storm-enroute" %% "scalameter-core" % "0.7" | ||
).dependsOn(xoroshiro128JVM) |
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,11 +1,32 @@ | ||
machine: | ||
java: | ||
version: openjdk8 | ||
node: | ||
version: 4.3.2 | ||
post: | ||
- curl -s https://raw.githubusercontent.com/paulp/sbt-extras/master/sbt > ~/bin/sbt && chmod 0755 ~/bin/sbt | ||
|
||
dependencies: | ||
post: | ||
pre: | ||
- sudo apt-get update | ||
- sudo apt-get install clang libgc-dev | ||
- cat /dev/null | sbt update | ||
override: | ||
- cat /dev/null | sbt xoroshiro128JVM/test:compile | ||
- cat /dev/null | sbt xoroshiro128JS/test:compile | ||
- cat /dev/null | sbt xoroshiro128Native/compile | ||
- cat /dev/null | sbt benchmark/test:compile | ||
cache_directories: | ||
- "~/.ivy2" | ||
- "~/.m2" | ||
- "~/.sbt" | ||
- "~/.lib" | ||
|
||
test: | ||
pre: | ||
- cat /dev/null | sbt scalastyle | ||
override: | ||
- cat /dev/null | sbt xoroshiro128JVM/test:test | ||
- cat /dev/null | sbt xoroshiro128JS/test:test | ||
post: | ||
- cat /dev/null | sbt benchmark/run |
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 +1 @@ | ||
sbt.version=0.13.11 | ||
sbt.version=0.13.13 |
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,8 @@ | ||
// Cross-building dependencies. | ||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.14") | ||
addSbtPlugin("org.scala-native" % "sbt-crossproject" % "0.1.0") | ||
addSbtPlugin("org.scala-native" % "sbt-scalajs-crossproject" % "0.1.0") | ||
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.1.0") | ||
|
||
// Other assorted goodies. | ||
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0") |
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,117 @@ | ||
<scalastyle> | ||
<name>Scalastyle standard configuration</name> | ||
<check level="error" class="org.scalastyle.file.FileTabChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.file.FileLengthChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="maxFileLength"><![CDATA[800]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.file.HeaderMatchesChecker" enabled="false"> | ||
<parameters> | ||
<parameter name="header"><![CDATA[// Copyright (C) 2011-2012 the original author or authors. | ||
// See the LICENCE.txt file distributed with this work for additional | ||
// information regarding copyright ownership. | ||
// | ||
// 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.]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.SpacesAfterPlusChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.file.WhitespaceEndOfLineChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.scalariform.SpacesBeforePlusChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.file.FileLineLengthChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="maxLineLength"><![CDATA[160]]></parameter> | ||
<parameter name="tabSize"><![CDATA[4]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.ClassNamesChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="regex"><![CDATA[[A-Z][A-Za-z]*]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.ObjectNamesChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="regex"><![CDATA[[A-Z][A-Za-z]*]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.PackageObjectNamesChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="regex"><![CDATA[^[a-z][A-Za-z]*$]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.EqualsHashCodeChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.scalariform.IllegalImportsChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="illegalImports"><![CDATA[sun._,java.awt._]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.ParameterNumberChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="maxParameters"><![CDATA[8]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.MagicNumberChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="ignore"><![CDATA[-1,0,1,2,3]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.NoWhitespaceBeforeLeftBracketChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.scalariform.NoWhitespaceAfterLeftBracketChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.scalariform.ReturnChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.scalariform.NullChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.scalariform.NoCloneChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.scalariform.NoFinalizeChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.scalariform.CovariantEqualsChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.scalariform.StructuralTypeChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.file.RegexChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="regex"><![CDATA[println]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.NumberOfTypesChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="maxTypes"><![CDATA[30]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.CyclomaticComplexityChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="maximum"><![CDATA[10]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.UppercaseLChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.scalariform.SimplifyBooleanExpressionChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.scalariform.IfBraceChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="singleLineAllowed"><![CDATA[true]]></parameter> | ||
<parameter name="doubleLineAllowed"><![CDATA[false]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.MethodLengthChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="maxLength"><![CDATA[50]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.MethodNamesChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="regex"><![CDATA[^[a-z][A-Za-z0-9]*$]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.NumberOfMethodsInTypeChecker" enabled="true"> | ||
<parameters> | ||
<parameter name="maxMethods"><![CDATA[30]]></parameter> | ||
</parameters> | ||
</check> | ||
<check level="error" class="org.scalastyle.scalariform.PublicMethodsHaveTypeChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.file.NewLineAtEofChecker" enabled="true"></check> | ||
<check level="error" class="org.scalastyle.file.NoNewLineAtEofChecker" enabled="false"></check> | ||
</scalastyle> |
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
src/test/scala/SplitMixSpec.scala → .../shared/src/test/scala/SplitMixSpec.scala
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
1 change: 1 addition & 0 deletions
1
src/test/scala/Xoroshiro128Spec.scala → ...red/src/test/scala/Xoroshiro128Spec.scala
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