mirror of https://github.com/sbt/sbt.git
Migrate to GitHub Actions
This commit is contained in:
parent
3faeccaeb5
commit
86f9061fae
|
|
@ -11,12 +11,18 @@ jobs:
|
|||
- os: ubuntu-latest
|
||||
java: 8
|
||||
jobtype: 1
|
||||
- os: ubuntu-latest
|
||||
java: 11
|
||||
jobtype: 1
|
||||
- os: macos-latest
|
||||
java: 8
|
||||
jobtype: 2
|
||||
- os: windows-latest
|
||||
java: 8
|
||||
jobtype: 3
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M
|
||||
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
|
||||
SBT_VER: 1.4.2
|
||||
SBT_ETC_FILE: $HOME/etc/sbt/sbtopts
|
||||
JDK11: adopt@1.11.0-9
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
|
@ -32,4 +38,39 @@ jobs:
|
|||
path: ~/.sbt
|
||||
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
|
||||
- name: Build and test
|
||||
run: echo hello GitHub
|
||||
shell: bash
|
||||
run: |
|
||||
case ${{ matrix.jobtype }} in
|
||||
1)
|
||||
echo build using JDK 8 test using JDK 8 and JDK 11
|
||||
sbt -Dsbt.build.version=$SBT_VER rpm:packageBin debian:packageBin
|
||||
sbt -Dsbt.build.version=$SBT_VER universal:packageBin universal:stage integrationTest/test
|
||||
cd citest && ./test.sh
|
||||
$HOME/bin/jabba install $JDK11 && exec $HOME/bin/jabba which --home $JDK11
|
||||
java -Xmx32m -version
|
||||
./test.sh
|
||||
;;
|
||||
2)
|
||||
echo build using JDK 8, test using JDK 8, on macOS
|
||||
bin/coursier resolve
|
||||
sbt -Dsbt.build.version=$SBT_VER universal:packageBin universal:stage integrationTest/test
|
||||
cd citest && ./test.sh
|
||||
;;
|
||||
3)
|
||||
echo build using JDK 8, test using JDK 8, on Windows
|
||||
bin/coursier.bat resolve
|
||||
sbt -Dsbt.build.version=$SBT_VER universal:packageBin universal:stage integrationTest/test
|
||||
cd citest
|
||||
./test.bat
|
||||
test3/test3.bat
|
||||
;;
|
||||
*)
|
||||
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
|
||||
|
|
|
|||
88
.travis.yml
88
.travis.yml
|
|
@ -1,88 +0,0 @@
|
|||
sudo: false
|
||||
dist: xenial
|
||||
group: stable
|
||||
|
||||
language: scala
|
||||
scala: 2.10.7
|
||||
|
||||
env:
|
||||
global:
|
||||
- SBT_VER=1.3.13
|
||||
- TRAVIS_JDK=adopt@1.8.0-222
|
||||
- JABBA_HOME=$HOME/.jabba
|
||||
- TRAVIS_JDK11=openjdk@1.11.0
|
||||
## ignore Travis CI's default /etc/sbt/sbtopts
|
||||
- SBT_ETC_FILE=$HOME/etc/sbt/sbtopts
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: windows
|
||||
language: bash
|
||||
before_install:
|
||||
- "PowerShell -ExecutionPolicy Bypass -Command '[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-Expression (Invoke-WebRequest https://raw.githubusercontent.com/shyiko/jabba/0.11.2/install.ps1 -UseBasicParsing).Content'"
|
||||
install:
|
||||
- $JABBA_HOME/bin/jabba.exe install $TRAVIS_JDK && export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH"
|
||||
- java -Xmx32m -version
|
||||
- curl --fail https://github.com/sbt/sbt/releases/download/v$SBT_VER/sbt-$SBT_VER.zip -L --output /tmp/sbt.zip
|
||||
- unzip /tmp/sbt.zip -d $HOME/sbt
|
||||
- export PATH="$HOME/sbt/sbt/bin:$PATH"
|
||||
- bin/coursier.bat resolve
|
||||
script:
|
||||
- sbt -Dsbt.build.version=$SBT_VER universal:packageBin universal:stage integrationTest/test
|
||||
- cd citest
|
||||
- "./test.bat"
|
||||
- "test3/test3.bat"
|
||||
|
||||
## build using JDK 8, test using JDK 8, on macOS
|
||||
- os: osx
|
||||
osx_image: xcode9.2
|
||||
language: java
|
||||
before_install:
|
||||
- curl -sL https://raw.githubusercontent.com/shyiko/jabba/0.11.2/install.sh | bash && . ~/.jabba/jabba.sh
|
||||
install:
|
||||
- $JABBA_HOME/bin/jabba install $TRAVIS_JDK && export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK/Contents/Home" && export PATH="$JAVA_HOME/bin:$PATH"
|
||||
- java -Xmx32m -version
|
||||
- unset SBT_OPTS
|
||||
- curl --fail https://github.com/sbt/sbt/releases/download/v$SBT_VER/sbt-$SBT_VER.zip -L --output /tmp/sbt.zip
|
||||
- unzip /tmp/sbt.zip -d $HOME/sbt
|
||||
- export PATH="$HOME/sbt/sbt/bin:$PATH"
|
||||
- bin/coursier resolve
|
||||
script:
|
||||
- sbt -Dsbt.build.version=$SBT_VER universal:packageBin universal:stage integrationTest/test
|
||||
- cd citest && ./test.sh
|
||||
|
||||
- name: "build using JDK 8 test using JDK 8 and JDK 11"
|
||||
script:
|
||||
- sbt -Dsbt.build.version=$SBT_VER rpm:packageBin debian:packageBin
|
||||
- sbt -Dsbt.build.version=$SBT_VER universal:packageBin universal:stage integrationTest/test
|
||||
- cd citest && ./test.sh
|
||||
- $JABBA_HOME/bin/jabba install $TRAVIS_JDK11 && export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK11" && export PATH="$JAVA_HOME/bin:$PATH"
|
||||
- java -Xmx32m -version
|
||||
- ./test.sh
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- fakeroot
|
||||
- rpm
|
||||
|
||||
before_install:
|
||||
- curl -sL https://raw.githubusercontent.com/shyiko/jabba/0.10.1/install.sh | bash && . ~/.jabba/jabba.sh
|
||||
|
||||
install:
|
||||
- $JABBA_HOME/bin/jabba install $TRAVIS_JDK && export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH"
|
||||
- java -Xmx32m -version
|
||||
- unset SBT_OPTS
|
||||
- curl --fail https://github.com/sbt/sbt/releases/download/v$SBT_VER/sbt-$SBT_VER.zip -L --output /tmp/sbt.zip
|
||||
- unzip /tmp/sbt.zip -d $HOME/sbt
|
||||
- export PATH="$HOME/sbt/sbt/bin:$PATH"
|
||||
- bin/coursier resolve
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.ivy2/cache
|
||||
- $HOME/.sbt/boot
|
||||
- $HOME/.jabba/jdk
|
||||
|
||||
before_cache:
|
||||
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete
|
||||
- find $HOME/.sbt -name "*.lock" -delete
|
||||
Loading…
Reference in New Issue