Skip to content

Commit

Permalink
Fix path issues in stainless-CI.yml and stainless-ci.sh (#1622)
Browse files Browse the repository at this point in the history
* try to add stainless to path

* new way to add temp folder to options

* opne line

* line break

* print in tests

* change permission of temp folder

* debug

* debug

* trying to reduce path

* temporary fix , with one temp folder per CI, which is cleaned up anyway

* better temp

* add rm folder

* remove print that was causing errors
  • Loading branch information
samuelchassot authored Dec 11, 2024
1 parent 269b00d commit dae4288
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/stainless-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ jobs:
runs-on:
labels: [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 -Djava.io.tmpdir=./tmp_java
JVM_OPTS: -Dsbt.io.implicit.relative.glob.conversion=allow -Xss512M -Xms1024M -Xmx12G -XX:MaxMetaspaceSize=2G -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=768M -Djava.io.tmpdir=./tmp_java
SBT_OPTS: -Djava.io.tmpdir=./temp_java --sbt-dir ./temp_java/.sbt
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_TMP_DIR: /tmp/tmp_${{ github.run_id }}_${{ github.run_attempt }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -25,6 +24,13 @@ jobs:
with:
distribution: temurin
java-version: 17
- name: Setup java options
run: |
echo "JAVA_OPTS=$JAVA_OPTS -Djava.io.tmpdir=$JAVA_OPTS_TMP_DIR" >> "$GITHUB_ENV" && \
echo "JVM_OPTS=$JVM_OPTS -Djava.io.tmpdir=$JAVA_OPTS_TMP_DIR" >> "$GITHUB_ENV" && \
echo "SBT_OPTS=-Djava.io.tmpdir=$JAVA_OPTS_TMP_DIR --sbt-dir $JAVA_OPTS_TMP_DIR" >> "$GITHUB_ENV"
- name: Creating temp folder
run: rm -rf $JAVA_OPTS_TMP_DIR && mkdir -p $JAVA_OPTS_TMP_DIR && chmod 777 $JAVA_OPTS_TMP_DIR
- name: Install and unpack sbt
run: |
wget https://github.com/sbt/sbt/releases/download/v1.10.1/sbt-1.10.1.tgz
Expand All @@ -37,7 +43,7 @@ jobs:
- name: Test solvers availability
run: cvc5 --version && z3 --version && cvc4 --version
- name: Build and Package
run: ./stainless-ci.sh --build-only
run: ./stainless-ci.sh --build-only && echo "PATH=./frontends/dotty/target/universal/stage/bin:$PATH" >> "$GITHUB_ENV"
- name: Run Tests and Integration Tests
run: ./stainless-ci.sh --skip-build --skip-bolts --skip-sbt-plugin
- name: Sbt Plugin Tests
Expand Down
1 change: 1 addition & 0 deletions stainless-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ SBT_TEMP=$ROOT_DIR/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
chmod 777 $JAVA_OPTS_TMP_DIR
SBT_DIR=$ROOT_DIR/temp # make better later
SBT=${SBT_DIR}/sbt/bin/sbt

Expand Down

0 comments on commit dae4288

Please sign in to comment.