-
Notifications
You must be signed in to change notification settings - Fork 92
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 #223 from lrytz/crossTravis
No longer use `scalaVersionsByJvm`
- Loading branch information
Showing
7 changed files
with
95 additions
and
89 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 |
---|---|---|
|
@@ -12,8 +12,6 @@ | |
*.jar | ||
*~ | ||
|
||
build.properties | ||
|
||
# target directories for ant build | ||
/build/ | ||
/dists/ | ||
|
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,8 +1,20 @@ | ||
# opt-in to Travis's newer/faster container-based infrastructure | ||
sudo: false | ||
|
||
language: scala | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- openjdk-6-jdk | ||
|
||
jdk: | ||
- openjdk6 | ||
- oraclejdk8 | ||
- oraclejdk9 | ||
|
||
scala: | ||
- 2.11.12 | ||
- 2.12.6 | ||
- 2.13.0-M3 | ||
|
||
env: | ||
global: | ||
# PGP_PASSPHRASE | ||
|
@@ -11,18 +23,23 @@ env: | |
- secure: "OpBwPc1GNvauageYOH3RscAa7wpZxgpmqDz15aigIKLNWzAhAtVUx0MleZ8rQeoqml6nrAvlnzuVHjKL2lVcjMPpjUis7bcQ5UAGK7tZK8x+qZNQxXmpXu8+pENwQA2yFaqt/xy7K5jFOrHJHTRxcPnyVG1yKakPWz53PPYUwbc=" | ||
# SONA_PASS | ||
- secure: "Xw7rI/qlML1nD2e2XwlakkhKAWNGZKqqE+Q3ntTvFpfHryl7KLCvVzJ4LIavnL6kGJaWOgy9vlSoEWn5g9nqHSfE31C/k5pY5nTMAKiwiJzfAS+r0asKXW2gmKhwtcTBkqyLVOZLCJSPVlFRQyfBJHY+Fs0L3KWcnMQgtBlyDhU=" | ||
matrix: | ||
- SCALAJS_VERSION= | ||
- SCALAJS_VERSION=0.6.23 | ||
- SCALAJS_VERSION=1.0.0-M3 | ||
|
||
script: admin/build.sh | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- openjdk-6-jdk | ||
matrix: | ||
exclude: | ||
- scala: 2.13.0-M3 | ||
env: SCALAJS_VERSION=1.0.0-M3 | ||
- jdk: oraclejdk9 | ||
env: SCALAJS_VERSION=1.0.0-M3 | ||
- scala: 2.12.6 | ||
jdk: openjdk6 | ||
- scala: 2.13.0-M3 | ||
jdk: openjdk6 | ||
|
||
jdk: | ||
- openjdk6 | ||
- oraclejdk8 | ||
- oraclejdk9 | ||
script: admin/build.sh | ||
|
||
notifications: | ||
email: [email protected] | ||
|
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,33 +1,35 @@ | ||
## Tag Driven Releasing | ||
|
||
### Background Reading | ||
|
||
- http://docs.travis-ci.com/user/environment-variables/ | ||
- http://docs.travis-ci.com/user/encryption-keys/ | ||
- http://docs.travis-ci.com/user/encrypting-files/ | ||
|
||
### Initial setup for the repository | ||
|
||
To configure tag driven releases from Travis CI. | ||
|
||
1. Generate a key pair for this repository with `./admin/genKeyPair.sh`. | ||
Edit `.travis.yml` and `admin/build.sh` as prompted. | ||
1. Publish the public key to https://pgp.mit.edu | ||
1. Store other secrets as encrypted environment variables with `admin/encryptEnvVars.sh`. | ||
1. Store other secrets as encrypted environment variables with `./admin/encryptEnvVars.sh`. | ||
Edit `.travis.yml` as prompted. | ||
1. Edit `.travis.yml` to use `./admin/build.sh` as the build script, | ||
and edit that script to use the tasks required for this project. | ||
1. Edit `build.sbt`'s `scalaVersionsByJvm in ThisBuild` to select Scala and JVM version | ||
combinations that will be used for publishing. | ||
Ensure that `RELEASE_COMBO` is `true` for build matrix combinations | ||
that should be released to sonatype (when building a tag). | ||
|
||
It is important to add comments in `.travis.yml` to identify the name | ||
of each environment variable encoded in a `:secure` section. | ||
of each environment variable encoded in a `secure` section. | ||
|
||
After these steps, your `.travis.yml` should contain config of the form: | ||
|
||
``` | ||
language: scala | ||
jdk: | ||
- openjdk6 | ||
- oraclejdk8 | ||
scala: | ||
- 2.11.12 | ||
- 2.12.6 | ||
env: | ||
global: | ||
# PGP_PASSPHRASE | ||
|
@@ -39,10 +41,6 @@ env: | |
script: admin/build.sh | ||
jdk: | ||
- openjdk6 | ||
- oraclejdk8 | ||
notifications: | ||
email: | ||
- [email protected] | ||
|
@@ -62,10 +60,9 @@ without generating a new key. | |
1. Create a GitHub "Release" with a corresponding tag (e.g., `v0.1.1`) via the GitHub | ||
web interface. | ||
1. The release will be published using the Scala and JVM version combinations specified | ||
in `scalaVersionsByJvm` in `build.sbt`. | ||
- If you need to release against a different Scala version, include the Scala version | ||
and the JVM version to use in the tag name, separated by `#`s (e.g., `v0.1.1#2.13.0-M1#8`). | ||
Note that the JVM version needs to be listed in `.travis.yml` for the build to run. | ||
in the travis build matrix where `[ "$RELEASE_COMBO" = "true" ]`. | ||
- If you need to release against a different Scala version, create a new commit that modifies | ||
`.travis.yml` and push a new tag, e.g., `v1.2.3#2.13.0-M5`. The suffix after `#` is ignored. | ||
1. Travis CI will schedule a build for this release. Review the build logs. | ||
1. Log into https://oss.sonatype.org/ and identify the staging repository. | ||
1. Sanity check its contents. | ||
|
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,9 +1,8 @@ | ||
def env(key: String) = Option(System.getenv(key)).getOrElse("") | ||
|
||
pgpPassphrase := Some(env("PGP_PASSPHRASE").toArray) | ||
|
||
pgpPublicRing := file("admin/pubring.asc") | ||
|
||
pgpSecretRing := file("admin/secring.asc") | ||
|
||
credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", env("SONA_USER"), env("SONA_PASS")) | ||
inThisBuild(Seq( | ||
pgpPassphrase := Some(env("PGP_PASSPHRASE").toArray), | ||
pgpPublicRing := file("admin/pubring.asc"), | ||
pgpSecretRing := file("admin/secring.asc"), | ||
credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", env("SONA_USER"), env("SONA_PASS")) | ||
)) |
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,10 +1,13 @@ | ||
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1.0.14") | ||
|
||
if (System.getProperty("java.version").startsWith("1.")) | ||
Seq() | ||
else | ||
// override to version that works on Java 9, | ||
// see https://github.com/scala/sbt-scala-module/issues/35 | ||
Seq(addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.3")) | ||
|
||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.22") | ||
val scalaJSVersion = | ||
Option(System.getenv("SCALAJS_VERSION")).filter(_.nonEmpty).getOrElse("0.6.23") | ||
|
||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) | ||
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.4.0") | ||
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1.0.14") |