mirror of https://github.com/sbt/sbt.git
Adapt lm-coursier-ci.sh
This commit is contained in:
parent
a010d35fd2
commit
b71a412203
|
|
@ -221,13 +221,12 @@ jobs:
|
||||||
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
|
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
|
||||||
find $HOME/.sbt -name "*.lock" -delete || true
|
find $HOME/.sbt -name "*.lock" -delete || true
|
||||||
coursier-test:
|
coursier-test:
|
||||||
name: ${{ matrix.os }} ${{ matrix.PLUGIN }} group ${{ matrix.TEST_GROUP }}
|
name: test lm-coursier (${{ matrix.os }}, ${{ matrix.TEST_GROUP }})
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-latest]
|
||||||
PLUGIN: [sbt-lm-coursier] # , sbt-coursier]
|
|
||||||
TEST_GROUP: [1, 2]
|
TEST_GROUP: [1, 2]
|
||||||
steps:
|
steps:
|
||||||
- name: Don't convert LF to CRLF during checkout
|
- name: Don't convert LF to CRLF during checkout
|
||||||
|
|
@ -244,8 +243,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
jvm: 8
|
jvm: 8
|
||||||
apps: sbt
|
apps: sbt
|
||||||
- run: scripts/ci.sh
|
- run: scripts/lm-coursier-ci.sh
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
PLUGIN: ${{ matrix.PLUGIN }}
|
|
||||||
TEST_GROUP: ${{ matrix.TEST_GROUP }}
|
TEST_GROUP: ${{ matrix.TEST_GROUP }}
|
||||||
|
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -euvx
|
|
||||||
|
|
||||||
# Force the use of coursier JNI stuff on Windows, which ought to work fine.
|
|
||||||
# JNI stuff is used to compute the default cache location on Windows (to get the AppData local
|
|
||||||
# dir, or something like this, via native Windows APIs).
|
|
||||||
# Without this, if ever coursier fails to load its JNI library on Windows, it falls back
|
|
||||||
# to using some powershell scripts (via dirs-dev/directories-jvm), which are often a problem,
|
|
||||||
# see sbt/sbt#5206.
|
|
||||||
# Enable this once sbt uses the upcoming lm-coursier-shaded version (> 2.0.10-1)
|
|
||||||
# export COURSIER_JNI="force"
|
|
||||||
|
|
||||||
if [ "$(expr substr $(uname -s) 1 5 2>/dev/null)" == "Linux" ]; then
|
|
||||||
SBT="sbt"
|
|
||||||
elif [ "$(uname)" == "Darwin" ]; then
|
|
||||||
SBT="sbt"
|
|
||||||
else
|
|
||||||
SBT="sbt.bat"
|
|
||||||
fi
|
|
||||||
|
|
||||||
lmCoursier() {
|
|
||||||
[ "${PLUGIN:-""}" = "sbt-lm-coursier" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
./metadata/scripts/with-test-repo.sh $SBT \
|
|
||||||
lm-coursier-shaded/publishLocal \
|
|
||||||
lm-coursier/test \
|
|
||||||
# +lm-coursier-shaded/publishLocal \
|
|
||||||
# +lm-coursier/test \
|
|
||||||
# "sbt-lm-coursier/scripted shared-$TEST_GROUP/* $SCRIPTED_EXTRA"
|
|
||||||
}
|
|
||||||
|
|
||||||
runSbtCoursierTests() {
|
|
||||||
if [ "$TEST_GROUP" = 1 ]; then
|
|
||||||
SCRIPTED_EXTRA="sbt-coursier/*"
|
|
||||||
elif [ "$TEST_GROUP" = 2 ]; then
|
|
||||||
SCRIPTED_EXTRA="scala-211/*"
|
|
||||||
else
|
|
||||||
SCRIPTED_EXTRA=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
./metadata/scripts/with-test-repo.sh $SBT \
|
|
||||||
sbt-coursier-shared/test \
|
|
||||||
"sbt-coursier/scripted shared-$TEST_GROUP/* $SCRIPTED_EXTRA"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if lmCoursier; then
|
|
||||||
runLmCoursierTests
|
|
||||||
else
|
|
||||||
runSbtCoursierTests
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euvx
|
||||||
|
|
||||||
|
# Force the use of coursier JNI stuff on Windows, which ought to work fine.
|
||||||
|
# JNI stuff is used to compute the default cache location on Windows (to get the AppData local
|
||||||
|
# dir, or something like this, via native Windows APIs).
|
||||||
|
# Without this, if ever coursier fails to load its JNI library on Windows, it falls back
|
||||||
|
# to using some powershell scripts (via dirs-dev/directories-jvm), which are often a problem,
|
||||||
|
# see sbt/sbt#5206.
|
||||||
|
# Enable this once sbt uses the upcoming lm-coursier-shaded version (> 2.0.10-1)
|
||||||
|
# export COURSIER_JNI="force"
|
||||||
|
|
||||||
|
if [ "$(expr substr $(uname -s) 1 5 2>/dev/null)" == "Linux" ]; then
|
||||||
|
SBT="sbt"
|
||||||
|
elif [ "$(uname)" == "Darwin" ]; then
|
||||||
|
SBT="sbt"
|
||||||
|
else
|
||||||
|
SBT="sbt.bat"
|
||||||
|
fi
|
||||||
|
|
||||||
|
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
|
||||||
|
./lm-coursier/metadata/scripts/with-test-repo.sh $SBT \
|
||||||
|
lmCoursierShaded/publishLocal \
|
||||||
|
lmCoursier/test \
|
||||||
|
# +lm-coursier-shaded/publishLocal \
|
||||||
|
# +lm-coursier/test \
|
||||||
|
# "sbt-lm-coursier/scripted shared-$TEST_GROUP/* $SCRIPTED_EXTRA"
|
||||||
Loading…
Reference in New Issue