From d82aacee5aa203f8a691a94e79ff5ba52d6f9ae3 Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 08:00:09 +0100 Subject: [PATCH 01/13] try to add stainless to path --- .github/workflows/stainless-CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index 6ecf766bb..e687a455e 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -37,7 +37,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 From ffa9338a6f7922f5c41b5ee6cd7f9ed785589834 Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 10:23:46 +0100 Subject: [PATCH 02/13] new way to add temp folder to options --- .github/workflows/stainless-CI.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index e687a455e..1eb1e92db 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -10,11 +10,9 @@ 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 steps: - name: Checkout uses: actions/checkout@v4 @@ -25,6 +23,11 @@ jobs: with: distribution: temurin java-version: 17 + - name: Setup temp folder + run: echo "JAVA_OPTS_TMP_DIR=$GITHUB_WORKSPACE//tmp_java" >> "$GITHUB_ENV" && \ + 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: Install and unpack sbt run: | wget https://github.com/sbt/sbt/releases/download/v1.10.1/sbt-1.10.1.tgz From 1e37eb447da2748f4af0dee06a06889e62b3111e Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 10:27:49 +0100 Subject: [PATCH 03/13] opne line --- .github/workflows/stainless-CI.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index 1eb1e92db..59255ee00 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -24,10 +24,7 @@ jobs: distribution: temurin java-version: 17 - name: Setup temp folder - run: echo "JAVA_OPTS_TMP_DIR=$GITHUB_WORKSPACE//tmp_java" >> "$GITHUB_ENV" && \ - 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" + run: echo "JAVA_OPTS_TMP_DIR=$GITHUB_WORKSPACE//tmp_java" >> "$GITHUB_ENV" && 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: Install and unpack sbt run: | wget https://github.com/sbt/sbt/releases/download/v1.10.1/sbt-1.10.1.tgz From 12abf38162dc6d99ddc9d476aeab03bfdbe1f802 Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 10:28:40 +0100 Subject: [PATCH 04/13] line break --- .github/workflows/stainless-CI.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index 59255ee00..a38774e24 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -24,7 +24,11 @@ jobs: distribution: temurin java-version: 17 - name: Setup temp folder - run: echo "JAVA_OPTS_TMP_DIR=$GITHUB_WORKSPACE//tmp_java" >> "$GITHUB_ENV" && 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" + run: | + echo "JAVA_OPTS_TMP_DIR=$GITHUB_WORKSPACE//tmp_java" >> "$GITHUB_ENV" && \ + 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: Install and unpack sbt run: | wget https://github.com/sbt/sbt/releases/download/v1.10.1/sbt-1.10.1.tgz From 17b84732096d26c8d252d04fc764004fa02198e4 Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 10:49:52 +0100 Subject: [PATCH 05/13] print in tests --- frontends/common/src/test/scala/stainless/InputUtils.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontends/common/src/test/scala/stainless/InputUtils.scala b/frontends/common/src/test/scala/stainless/InputUtils.scala index 7d8a296af..f3529f836 100644 --- a/frontends/common/src/test/scala/stainless/InputUtils.scala +++ b/frontends/common/src/test/scala/stainless/InputUtils.scala @@ -46,6 +46,8 @@ trait InputUtils { val t: xt.type = xt } + ctx.reporter.error(files.mkString("\n")) + // Use the callback to collect the trees. val units = ListBuffer[xt.UnitDef]() val cls = ListBuffer[xt.ClassDef]() From db4d3f2a496cb96ebdfbecdf66ceb83a0841ad55 Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 11:01:30 +0100 Subject: [PATCH 06/13] change permission of temp folder --- .github/workflows/stainless-CI.yml | 4 +++- stainless-ci.sh | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index a38774e24..494ddb913 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -28,7 +28,9 @@ jobs: echo "JAVA_OPTS_TMP_DIR=$GITHUB_WORKSPACE//tmp_java" >> "$GITHUB_ENV" && \ 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" + echo "SBT_OPTS=-Djava.io.tmpdir=$JAVA_OPTS_TMP_DIR --sbt-dir $JAVA_OPTS_TMP_DIR" >> "$GITHUB_ENV" && \ + 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 diff --git a/stainless-ci.sh b/stainless-ci.sh index 1a74a70cb..b65566910 100755 --- a/stainless-ci.sh +++ b/stainless-ci.sh @@ -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 From cc07f8067aebb6396f12e2af4cfd15924fa5d301 Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 11:02:50 +0100 Subject: [PATCH 07/13] debug --- .github/workflows/stainless-CI.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index 494ddb913..4c501fe54 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -28,9 +28,9 @@ jobs: echo "JAVA_OPTS_TMP_DIR=$GITHUB_WORKSPACE//tmp_java" >> "$GITHUB_ENV" && \ 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" && \ - mkdir -p $JAVA_OPTS_TMP_DIR && \ - chmod 777 $JAVA_OPTS_TMP_DIR + echo "SBT_OPTS=-Djava.io.tmpdir=$JAVA_OPTS_TMP_DIR --sbt-dir $JAVA_OPTS_TMP_DIR" >> "$GITHUB_ENV" + - name: Creating temp folder + run: 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 From ee92cbfcbbd71ada2149415005d328e9dcb80a1f Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 11:05:59 +0100 Subject: [PATCH 08/13] debug --- .github/workflows/stainless-CI.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index 4c501fe54..fe822b350 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -23,9 +23,10 @@ jobs: with: distribution: temurin java-version: 17 - - name: Setup temp folder + - name: Setup temp directory + run: echo "JAVA_OPTS_TMP_DIR=$GITHUB_WORKSPACE/tmp_java" >> "$GITHUB_ENV" + - name: Setup java options run: | - echo "JAVA_OPTS_TMP_DIR=$GITHUB_WORKSPACE//tmp_java" >> "$GITHUB_ENV" && \ 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" From d89c72a938c5d3a15a34393170ebbc7ece89a349 Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 13:33:47 +0100 Subject: [PATCH 09/13] trying to reduce path --- .github/workflows/stainless-CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index fe822b350..65cd3f272 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -24,7 +24,7 @@ jobs: distribution: temurin java-version: 17 - name: Setup temp directory - run: echo "JAVA_OPTS_TMP_DIR=$GITHUB_WORKSPACE/tmp_java" >> "$GITHUB_ENV" + run: echo "JAVA_OPTS_TMP_DIR=$GITHUB_WORKSPACE/t" >> "$GITHUB_ENV" - name: Setup java options run: | echo "JAVA_OPTS=$JAVA_OPTS -Djava.io.tmpdir=$JAVA_OPTS_TMP_DIR" >> "$GITHUB_ENV" && \ From ce6ac8b0feda256f0d3f94152646bddcb578b646 Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 14:42:32 +0100 Subject: [PATCH 10/13] temporary fix , with one temp folder per CI, which is cleaned up anyway --- .github/workflows/stainless-CI.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index 65cd3f272..a5306cb4b 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -13,6 +13,7 @@ jobs: # 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_TMP_DIR: /tmp_${{ github.run_id }}_${{ github.run_attempt }} steps: - name: Checkout uses: actions/checkout@v4 @@ -23,8 +24,6 @@ jobs: with: distribution: temurin java-version: 17 - - name: Setup temp directory - run: echo "JAVA_OPTS_TMP_DIR=$GITHUB_WORKSPACE/t" >> "$GITHUB_ENV" - name: Setup java options run: | echo "JAVA_OPTS=$JAVA_OPTS -Djava.io.tmpdir=$JAVA_OPTS_TMP_DIR" >> "$GITHUB_ENV" && \ From 4a37dbf49a35cda112901f8f42f3bc657fd53dbb Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 14:44:53 +0100 Subject: [PATCH 11/13] better temp --- .github/workflows/stainless-CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index a5306cb4b..c0a2669db 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -13,7 +13,7 @@ jobs: # 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_TMP_DIR: /tmp_${{ github.run_id }}_${{ github.run_attempt }} + JAVA_OPTS_TMP_DIR: /tmp/tmp_${{ github.run_id }}_${{ github.run_attempt }} steps: - name: Checkout uses: actions/checkout@v4 From 9a38f4f0024f06418c9a9b8c04a7f96f04de09e9 Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 14:53:03 +0100 Subject: [PATCH 12/13] add rm folder --- .github/workflows/stainless-CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index c0a2669db..f7978549c 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -30,7 +30,7 @@ jobs: 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: mkdir -p $JAVA_OPTS_TMP_DIR && chmod 777 $JAVA_OPTS_TMP_DIR + 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 From ca02f1db9412e1b2248a0032a375056c66cfdb97 Mon Sep 17 00:00:00 2001 From: Samuel Chassot Date: Wed, 11 Dec 2024 14:53:51 +0100 Subject: [PATCH 13/13] remove print that was causing errors --- frontends/common/src/test/scala/stainless/InputUtils.scala | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontends/common/src/test/scala/stainless/InputUtils.scala b/frontends/common/src/test/scala/stainless/InputUtils.scala index f3529f836..7d8a296af 100644 --- a/frontends/common/src/test/scala/stainless/InputUtils.scala +++ b/frontends/common/src/test/scala/stainless/InputUtils.scala @@ -46,8 +46,6 @@ trait InputUtils { val t: xt.type = xt } - ctx.reporter.error(files.mkString("\n")) - // Use the callback to collect the trees. val units = ListBuffer[xt.UnitDef]() val cls = ListBuffer[xt.ClassDef]()