From da9e77d1f688e7f01d528bd3609ae7460f291f22 Mon Sep 17 00:00:00 2001 From: Viktor Kuncak Date: Fri, 6 Dec 2024 20:48:47 +0100 Subject: [PATCH] gh actions: separate explicit-fastmachines CI from unrestricted one --- .github/workflows/stainless-CI.yml | 1 - .../stainless-explicit-fastmachines.yml | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/stainless-explicit-fastmachines.yml diff --git a/.github/workflows/stainless-CI.yml b/.github/workflows/stainless-CI.yml index 936565e1c..6cc5eb737 100644 --- a/.github/workflows/stainless-CI.yml +++ b/.github/workflows/stainless-CI.yml @@ -8,7 +8,6 @@ on: jobs: tests: runs-on: - group: fast-machines labels: [self-hosted, linux] env: JAVA_OPTS_TMP_DIR: ./tmp_java diff --git a/.github/workflows/stainless-explicit-fastmachines.yml b/.github/workflows/stainless-explicit-fastmachines.yml new file mode 100644 index 000000000..5b4e4e07a --- /dev/null +++ b/.github/workflows/stainless-explicit-fastmachines.yml @@ -0,0 +1,50 @@ +name: Stainless Explicit fast-machines +on: + workflow_dispatch: + pull_request: +jobs: + tests: + runs-on: + group: fast-machines + 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=$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 + with: + submodules: recursive + - name: Setup JDK + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + - name: Install and unpack sbt + run: | + wget https://github.com/sbt/sbt/releases/download/v1.10.1/sbt-1.10.1.tgz + tar xfz sbt-1.10.1.tgz + echo "PATH=./sbt/bin/:$PATH" >> "$GITHUB_ENV" + - name: Install solvers + run: ./stainless-ci.sh --install-solvers $GITHUB_WORKSPACE/.local/bin + - name: Add solvers to PATH + run: echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH + - name: Test solvers availability + run: cvc5 --version && z3 --version && cvc4 --version + - name: Build and Package + 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: 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] + steps: + - name: Fails in order to indicate that pull request needs to be marked as ready to review and tests workflows need to pass. + run: exit 1 +