From 02bc92c190d21f37409cc7cd5147bccbc5fe3e25 Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 9 Oct 2024 12:11:32 +0200 Subject: [PATCH] add a temp folder for CI jvm --- .github/workflows/stainless-CI.yml | 7 +++++-- stainless-ci.sh | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index efbf92569..578bf83bc 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -10,9 +10,10 @@ jobs: if: github.event.pull_request.draft == false runs-on: [self-hosted, linux] env: + JAVA_OPTS_TMP_DIR: ./tmp_java # define Java options for both official sbt and sbt-extras - JAVA_OPTS: -Dsbt.io.implicit.relative.glob.conversion=allow -Xss512M -Xms1024M -Xmx12G -XX:MaxMetaspaceSize=2G -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=768M - JVM_OPTS: -Dsbt.io.implicit.relative.glob.conversion=allow -Xss512M -Xms1024M -Xmx12G -XX:MaxMetaspaceSize=2G -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=768M + JAVA_OPTS: -Dsbt.io.implicit.relative.glob.conversion=allow -Xss512M -Xms1024M -Xmx12G -XX:MaxMetaspaceSize=2G -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=768M -Djava.io.tmpdir=$JAVA_OPTS_TMP_DIR + JVM_OPTS: -Dsbt.io.implicit.relative.glob.conversion=allow -Xss512M -Xms1024M -Xmx12G -XX:MaxMetaspaceSize=2G -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=768M -Djava.io.tmpdir=$JAVA_OPTS_TMP_DIR steps: - name: Checkout uses: actions/checkout@v4 @@ -40,6 +41,8 @@ jobs: 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: Clean up + run: rm -rf $JAVA_OPTS_TMP_DIR fail_if_pull_request_is_draft: if: github.event.pull_request.draft == true runs-on: [self-hosted, linux] diff --git a/stainless-ci.sh b/stainless-ci.sh index 62532d857..1a74a70cb 100755 --- a/stainless-ci.sh +++ b/stainless-ci.sh @@ -30,7 +30,9 @@ SKIP_TESTS=false ROOT_DIR=$PWD SBT_TEMP=$ROOT_DIR/sbt-temp -mkdir -p $SBT_TEMP +# if TEMP_DIR is not set, set it to the default +JAVA_OPTS_TMP_DIR=${JAVA_OPTS_TMP_DIR:-$ROOT_DIR/temporary} +mkdir -p $JAVA_OPTS_TMP_DIR SBT_DIR=$ROOT_DIR/temp # make better later SBT=${SBT_DIR}/sbt/bin/sbt @@ -195,5 +197,5 @@ 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 +rm -rf $JAVA_OPTS_TMP_DIR echo "Total time: $DURATION seconds"