mirror of https://github.com/sbt/sbt.git
Merge pull request #6083 from eed3si9n/wip/multiple
Add fresh build validation
This commit is contained in:
commit
d606be8c67
|
|
@ -29,11 +29,28 @@ jobs:
|
|||
SCALA_212: 2.12.12
|
||||
SCALA_213: 2.13.1
|
||||
UTIL_TESTS: utilCache/test;utilControl/test;utilInterface/test;utilLogging/test;utilPosition/test;utilRelation/test;utilScripted/test;utilTracking/test
|
||||
CURRENT_SNAPSHOT_VER: 1.4.3-SNAPSHOT
|
||||
SBT_LOCAL: false
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Checkout sbt/sbt
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout sbt/io
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: sbt/io
|
||||
ref: develop
|
||||
path: io
|
||||
- name: Checkout sbt/librarymanagement
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: sbt/librarymanagement
|
||||
ref: develop
|
||||
path: librarymanagement
|
||||
- name: Checkout sbt/zinc
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: sbt/zinc
|
||||
ref: develop
|
||||
path: zinc
|
||||
- name: Setup
|
||||
uses: olafurpg/setup-scala@v10
|
||||
with:
|
||||
|
|
@ -61,9 +78,14 @@ jobs:
|
|||
sbt -v "repoOverrideTest:scripted dependency-management/*; scripted source-dependencies/* project/*"
|
||||
;;
|
||||
5)
|
||||
sbt -v publishLocalBin
|
||||
# build from fresh IO, LM, and Zinc
|
||||
BUILD_VERSION="1.4.0-SNAPSHOT"
|
||||
cd io
|
||||
sbt -v -Dsbt.build.version=${BUILD_VERSION} +publishLocal
|
||||
cd ../
|
||||
sbt -Dsbtlm.path=$HOME/work/sbt/sbt/librarymanagement -Dsbtzinc.path=$HOME/work/sbt/sbt/zinc -Dsbt.build.version=$BUILD_VERSION -Dsbt.build.fatal=false "+lowerUtils/publishLocal; {librarymanagement}/publishLocal; {zinc}/publishLocal; upperModules/publishLocal"
|
||||
rm -r $(find $HOME/.sbt/boot -name "*-SNAPSHOT") || true
|
||||
sbt -v -Dsbt.version=$CURRENT_SNAPSHOT_VER "++$SCALA_213; $UTIL_TESTS; ++$SCALA_212; $UTIL_TESTS; scripted actions/* source-dependencies/*1of3 dependency-management/*1of4 java/*"
|
||||
sbt -v -Dsbt.version=$BUILD_VERSION "++$SCALA_213; $UTIL_TESTS; ++$SCALA_212; $UTIL_TESTS; scripted actions/* source-dependencies/*1of3 dependency-management/*1of4 java/*"
|
||||
;;
|
||||
*)
|
||||
echo unknown jobtype
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
name: Nightly
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
java: 8
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
JAVA_OPTS: -Xms800M -Xmx800M -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dsbt.io.virtual=false -Dfile.encoding=UTF-8
|
||||
steps:
|
||||
- name: Checkout sbt/sbt
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout sbt/io
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: sbt/io
|
||||
ref: wip/nightly
|
||||
path: io
|
||||
- name: Checkout sbt/librarymanagement
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: sbt/librarymanagement
|
||||
ref: wip/nightly
|
||||
path: librarymanagement
|
||||
- name: Checkout sbt/zinc
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: sbt/zinc
|
||||
ref: wip/nightly
|
||||
path: zinc
|
||||
- name: Setup
|
||||
uses: olafurpg/setup-scala@v10
|
||||
with:
|
||||
java-version: "adopt@1.${{ matrix.java }}"
|
||||
- name: Coursier cache
|
||||
uses: coursier/cache-action@v5
|
||||
- name: Build and deploy
|
||||
run: |
|
||||
# build from fresh IO, LM, and Zinc
|
||||
TIMESTAMP=$(TZ=UTC date +%Y%m%dT%H%M%S)
|
||||
export BUILD_VERSION="1.4.0-bin-${TIMESTAMP}"
|
||||
echo publishing to Package Registry $RELEASE_GITHUB_PACKAGE_REGISTRY
|
||||
cd io
|
||||
sbt -v -Dsbt.sbtbintray=false +publish
|
||||
cd ../
|
||||
sbt -Dsbtlm.path=$HOME/work/sbt/sbt/librarymanagement -Dsbtzinc.path=$HOME/work/sbt/sbt/zinc -Dsbt.sbtbintray=false -Dsbt.build.fatal=false "+lowerUtils/publish; {librarymanagement}/publish; {zinc}/publish; upperModules/publish"
|
||||
rm -rf "$HOME/.ivy2/local" || true
|
||||
rm -r $(find $HOME/.sbt/boot -name "*-SNAPSHOT") || true
|
||||
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
|
||||
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
|
||||
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
|
||||
find $HOME/.sbt -name "*.lock" -delete || true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
RELEASE_GITHUB_PACKAGE_REGISTRY: sbt/sbt
|
||||
15
build.sbt
15
build.sbt
|
|
@ -8,7 +8,6 @@ import java.nio.file.{ Files, Path => JPath }
|
|||
import scala.util.Try
|
||||
|
||||
ThisBuild / version := {
|
||||
// update .travis.yml too for dog fooding
|
||||
val v = "1.4.3-SNAPSHOT"
|
||||
nightlyVersion.getOrElse(v)
|
||||
}
|
||||
|
|
@ -1544,9 +1543,17 @@ def customCommands: Seq[Setting[_]] = Seq(
|
|||
|
||||
ThisBuild / publishTo := {
|
||||
val old = (ThisBuild / publishTo).value
|
||||
sys.props.get("sbt.build.localmaven") match {
|
||||
case Some(path) => Some(MavenCache("local-maven", file(path)))
|
||||
case _ => old
|
||||
sys.env.get("RELEASE_GITHUB_PACKAGE_REGISTRY") match {
|
||||
case Some(repo) =>
|
||||
Some(s"GitHub Package Registry ($repo)" at s"https://maven.pkg.github.com/$repo")
|
||||
case _ => old
|
||||
}
|
||||
}
|
||||
ThisBuild / credentials ++= {
|
||||
sys.env.get("GITHUB_TOKEN") match {
|
||||
case Some(token) =>
|
||||
List(Credentials("GitHub Package Registry", "maven.pkg.github.com", "unused", token))
|
||||
case _ => Nil
|
||||
}
|
||||
}
|
||||
ThisBuild / whitesourceProduct := "Lightbend Reactive Platform"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ object Dependencies {
|
|||
val scala213 = "2.13.3"
|
||||
val checkPluginCross = settingKey[Unit]("Make sure scalaVersion match up")
|
||||
val baseScalaVersion = scala212
|
||||
def nightlyVersion = sys.props.get("sbt.build.version")
|
||||
def nightlyVersion: Option[String] =
|
||||
sys.env.get("BUILD_VERSION") orElse sys.props.get("sbt.build.version")
|
||||
|
||||
// sbt modules
|
||||
private val ioVersion = nightlyVersion.getOrElse("1.4.0")
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sbt -Dsbtio.path=../io -Dsbtutil.path=../util -Dsbtlm.path=../librarymanagement -Dsbtzinc.path=../zinc "$@"
|
||||
sbt -Dsbtio.path=../io -Dsbtlm.path=../librarymanagement -Dsbtzinc.path=../zinc "$@"
|
||||
|
|
|
|||
Loading…
Reference in New Issue