sbt/scripts/ci.sh

57 lines
1.1 KiB
Bash
Raw Normal View History

2017-02-27 16:15:15 +01:00
#!/usr/bin/env bash
2018-09-28 17:55:42 +02:00
set -euvx
2015-06-16 20:17:07 +02:00
lmCoursier() {
[ "${LM_COURSIER:-""}" = 1 ]
}
sbtShading() {
2018-09-28 17:55:42 +02:00
[ "${SBT_SHADING:-""}" = 1 ]
}
runLmCoursierTests() {
if [ "$TEST_GROUP" = 1 ]; then
SCRIPTED_EXTRA="sbt-lm-coursier/*"
elif [ "$TEST_GROUP" = 2 ]; then
SCRIPTED_EXTRA="scala-211/*"
else
SCRIPTED_EXTRA=""
fi
# publishing locally to ensure shading runs fine
2019-09-21 16:28:37 +02:00
./metadata/scripts/with-test-repo.sh ./sbt \
2020-06-09 14:23:02 +02:00
evictionCheck \
2020-06-09 14:18:32 +02:00
compatibilityCheck \
lm-coursier-shaded/publishLocal \
lm-coursier/test \
"sbt-lm-coursier/scripted shared-$TEST_GROUP/* $SCRIPTED_EXTRA"
}
2017-02-27 16:15:15 +01:00
runSbtCoursierTests() {
if [ "$TEST_GROUP" = 1 ]; then
SCRIPTED_EXTRA="sbt-coursier/*"
elif [ "$TEST_GROUP" = 2 ]; then
SCRIPTED_EXTRA="scala-211/*"
else
SCRIPTED_EXTRA=""
fi
2019-09-21 16:28:37 +02:00
./metadata/scripts/with-test-repo.sh ./sbt \
sbt-coursier-shared/test \
"sbt-coursier/scripted shared-$TEST_GROUP/* $SCRIPTED_EXTRA"
2017-02-27 16:15:15 +01:00
}
runSbtShadingTests() {
2020-09-14 15:49:49 +02:00
./sbt sbt-shading/scripted
2017-07-08 14:18:03 +02:00
}
2017-02-27 16:15:15 +01:00
2018-09-28 17:55:42 +02:00
if sbtShading; then
runSbtShadingTests
elif lmCoursier; then
runLmCoursierTests
2017-02-27 16:15:15 +01:00
else
2018-09-28 17:55:42 +02:00
runSbtCoursierTests
2015-06-16 20:17:07 +02:00
fi
2015-06-17 19:36:53 +02:00