diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index 3eb0b06ef..23ba71442 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -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] diff --git a/build.sbt b/build.sbt index 82d18e483..2a9248e5c 100644 --- a/build.sbt +++ b/build.sbt @@ -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 diff --git a/stainless-ci.sh b/stainless-ci.sh index bb86e8a26..1cb085b74 100755 --- a/stainless-ci.sh +++ b/stainless-ci.sh @@ -17,7 +17,6 @@ EOM } - # Run the complete CI pipeline # Record the time to compute the total duration @@ -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" @@ -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 @@ -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 @@ -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 @@ -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"