Merge pull request #6077 from eed3si9n/wip/build

Migrate to GitHub Actions
This commit is contained in:
eugene yokota 2020-11-09 05:22:10 -05:00 committed by GitHub
commit d651c95c03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 60 deletions

View File

@ -9,14 +9,28 @@ jobs:
matrix:
include:
- os: ubuntu-latest
java: 8
java: 11
jobtype: 1
- os: ubuntu-latest
java: 11
jobtype: 1
jobtype: 2
- os: ubuntu-latest
java: 11
jobtype: 3
- os: ubuntu-latest
java: 11
jobtype: 4
- os: ubuntu-latest
java: 8
jobtype: 5
runs-on: ${{ matrix.os }}
env:
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M
JAVA_OPTS: -Xms800M -Xmx800M -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dsbt.io.virtual=false -Dfile.encoding=UTF-8
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
@ -32,4 +46,32 @@ jobs:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Build and test
run: echo hello GitHub
run: |
case ${{ matrix.jobtype }} in
1)
sbt -v "mimaReportBinaryIssues ; javafmtCheck ; Test / javafmtCheck; scalafmtCheckAll ; scalafmtSbtCheck; serverTestProj/scalafmtCheckAll; headerCheck ;test:headerCheck ;whitesourceOnPush ;test:compile; publishLocal; test; serverTestProj/test; doc; $UTIL_TESTS; ++$SCALA_213; $UTIL_TESTS"
;;
2)
sbt -v "scripted actions/* apiinfo/* compiler-project/* ivy-deps-management/* reporter/* tests/* watch/* classloader-cache/* package/*"
;;
3)
sbt -v "dependencyTreeProj/publishLocal; scripted dependency-graph/* dependency-management/* plugins/* project-load/* java/* run/* nio/*"
;;
4)
sbt -v "repoOverrideTest:scripted dependency-management/*; scripted source-dependencies/* project/*"
;;
5)
sbt -v publishLocalBin
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/*"
;;
*)
echo unknown jobtype
exit 1
esac
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

View File

@ -1,56 +0,0 @@
dist: xenial
language: scala
env:
global:
- TRAVIS_JDK=adopt@1.11.0-1
- 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"
# WHITESOURCE_PASSWORD=
- SBT_VERSION_PROP=""
- SBT_LOCAL=false
- secure: d3bu2KNwsVHwfhbGgO+gmRfDKBJhfICdCJFGWKf2w3Gv86AJZX9nuTYRxz0KtdvEHO5Xw8WTBZLPb2thSJqhw9OCm4J8TBAVqCP0ruUj4+aqBUFy4bVexQ6WKE6nWHs4JPzPk8c6uC1LG3hMuzlC8RGETXtL/n81Ef1u7NjyXjs=
matrix:
- SBT_CMD="mimaReportBinaryIssues ; javafmtCheck ; Test / javafmtCheck; scalafmtCheckAll ; scalafmtSbtCheck; serverTestProj/scalafmtCheckAll; headerCheck ;test:headerCheck ;whitesourceOnPush ;test:compile; publishLocal; test; serverTestProj/test; doc; $UTIL_TESTS; ++$SCALA_213; $UTIL_TESTS"
- SBT_CMD="scripted actions/* apiinfo/* compiler-project/* ivy-deps-management/* reporter/* tests/* watch/* classloader-cache/* package/*"
- SBT_CMD="dependencyTreeProj/publishLocal; scripted dependency-graph/* dependency-management/* plugins/* project-load/* java/* run/* nio/*"
- SBT_CMD="repoOverrideTest:scripted dependency-management/*; scripted source-dependencies/* project/*"
matrix:
fast_finish: true
include:
- env:
- SBT_LOCAL=true
- SBT_VERSION_PROP=-Dsbt.version=1.4.3-SNAPSHOT
- TRAVIS_JDK=adopt@1.8.0-222
- SBT_CMD="++$SCALA_213; $UTIL_TESTS; ++$SCALA_212; $UTIL_TESTS; scripted actions/* source-dependencies/*1of3 dependency-management/*1of4 java/*"
before_install:
- curl -sL https://raw.githubusercontent.com/shyiko/jabba/0.11.0/install.sh | bash && . ~/.jabba/jabba.sh
- if [ $SBT_LOCAL == true ]; then sbt -Dsbt.io.virtual=false publishLocalBin; fi
- rm -r $(find $HOME/.sbt/boot -name "*-SNAPSHOT") || true
install:
- $JABBA_HOME/bin/jabba install $TRAVIS_JDK
- $JABBA_HOME/bin/jabba install openjdk@1.10
- unset _JAVA_OPTIONS
- export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH" && java -Xmx32m -version
script:
# It doesn't need that much memory because compile and run are forked
- sbt -Dsbt.io.virtual=false $SBT_VERSION_PROP -Dsbt.ci=true -J-XX:ReservedCodeCacheSize=128m -J-Xmx800M -J-Xms800M -J-server "$SBT_CMD"
before_cache:
- find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete
- find $HOME/.sbt -name "*.lock" -delete
- rm -r $(find $HOME/.sbt/boot -name "*-SNAPSHOT") || true
cache:
directories:
- $HOME/.cache/coursier/v1
- $HOME/.ivy2/cache
- $HOME/.sbt/boot
- $HOME/.jabba

View File

@ -1,5 +1,6 @@
# Validate that a bad dependency fails the compile
$ copy-file changes/BadCommon.scala common/src/main/scala/Common.scala
> common/compile
> common/publish
# Force dep resolution to be successful, then compilation to fail