Skip to content

Commit 8c769ae

Browse files
authored
Merge pull request #58 from olafurpg/ci-release
Setup releases from CI
2 parents cf6ec35 + a769dfc commit 8c769ae

File tree

5 files changed

+36
-39
lines changed

5 files changed

+36
-39
lines changed

.jvmopts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-Xss4m
2+
-Xms1G
3+
-Xmx8G
4+
-XX:ReservedCodeCacheSize=1024m
5+
-XX:+TieredCompilation
6+
-XX:+CMSClassUnloadingEnabled
7+

.travis.yml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
language: scala
2-
sudo: required
3-
dist: trusty
4-
script:
5-
# plz is like ++ except it skips projects that are not defined for that scala version.
6-
- sbt "plz $TRAVIS_SCALA_VERSION test"
72
jdk:
83
- oraclejdk8
9-
scala:
10-
- 2.10.7
11-
- 2.11.12
12-
- 2.12.6
13-
- 2.13.0-M5
14-
env:
15-
- SCALAJS_VERSION=0.6.25
16-
matrix:
4+
sudo: required
5+
dist: trusty
6+
stages:
7+
- name: test
8+
- name: release
9+
if: (branch = master AND type = push) OR (tag IS present)
10+
script: sbt "++$TRAVIS_SCALA_VERSION test"
11+
jobs:
1712
include:
1813
- scala: 2.10.7
19-
jdk: openjdk7
20-
before_install:
21-
- curl https://raw.githubusercontent.com/scala-native/scala-native/master/scripts/travis_setup.sh | bash -x
14+
- scala: 2.11.12
15+
before_install:
16+
- curl https://raw.githubusercontent.com/scala-native/scala-native/master/scripts/travis_setup.sh | bash -x
17+
- scala: 2.12.6
18+
- scala: 2.13.0-M5
19+
20+
# Release stable release on tag push and snapshot on merge to master
21+
- stage: release
22+
script: sbt ci-release
23+
2224
cache:
2325
directories:
24-
- $HOME/.sbt/0.13/dependency
25-
- $HOME/.sbt/boot/scala*
26-
- $HOME/.sbt/launchers
26+
- $HOME/.sbt/zinc
2727
- $HOME/.ivy2/cache
2828
- $HOME/.nvm
29+
- $HOME/.cache/coursier
2930
before_cache:
3031
- du -h -d 1 $HOME/.ivy2/cache
3132
- du -h -d 2 $HOME/.sbt/

build.sbt

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,24 @@ val scala210 = "2.10.7"
55
val scala211 = "2.11.12"
66
val scala212 = "2.12.6"
77
val scala213 = "2.13.0-M5"
8-
val baseSettings = Seq(
8+
9+
inThisBuild(List(
910
organization := "com.lihaoyi",
1011
name := "sourcecode",
11-
version := "0.1.5-SNAPSHOT",
1212
scalaVersion := scala211,
1313
crossScalaVersions := Seq(scala210, scala211, scala212, scala213),
14-
scmInfo := Some(ScmInfo(
15-
browseUrl = url("https://github.com/lihaoyi/sourcecode"),
16-
connection = "scm:git:[email protected]:lihaoyi/sourcecode.git"
17-
)),
1814
homepage := Some(url("https://github.com/lihaoyi/sourcecode")),
1915
licenses := Seq("MIT" -> url("http://www.opensource.org/licenses/mit-license.html")),
2016
developers += Developer(
2117
email = "[email protected]",
2218
id = "lihaoyi",
2319
name = "Li Haoyi",
2420
url = url("https://github.com/lihaoyi")
25-
),
26-
publishTo := Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
27-
)
28-
lazy val noPublish = Seq(
29-
publishArtifact := false,
30-
publish := {},
31-
publishLocal := {}
32-
)
21+
)
22+
))
3323

34-
baseSettings
35-
noPublish
24+
skip in publish := true
25+
crossScalaVersions := List() // required for `++2.12.6 test` to ignore native project
3626

3727
def macroDependencies(version: String) =
3828
Seq(
@@ -47,7 +37,6 @@ def macroDependencies(version: String) =
4737

4838
lazy val sourcecode = crossProject(JSPlatform, JVMPlatform, NativePlatform)
4939
.settings(
50-
baseSettings,
5140
libraryDependencies ++= macroDependencies(scalaVersion.value),
5241
test in Test := (run in Test).toTask("").value,
5342
unmanagedSourceDirectories in Compile ++= {

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.17
1+
sbt.version=1.2.3

project/build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ val scalaJSVersion =
44

55
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
66

7-
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")
8-
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0")
7+
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.2.2")
8+
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.4")
99
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0")
1010
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.8")
1111
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "0.6.0")

0 commit comments

Comments
 (0)