Skip to content

Commit

Permalink
add a temp folder for CI jvm
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelchassot committed Oct 9, 2024
1 parent 1187551 commit 02bc92c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/stainless-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
6 changes: 4 additions & 2 deletions stainless-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"

0 comments on commit 02bc92c

Please sign in to comment.