From 1a530bdbb99bc547b71f573d02dfe5457a2a4722 Mon Sep 17 00:00:00 2001 From: Levente Bajczi Date: Sun, 10 Nov 2024 20:10:44 +0100 Subject: [PATCH] Added env step --- .../actions/build-spec-transformation/action.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/build-spec-transformation/action.yml b/.github/actions/build-spec-transformation/action.yml index 1a79fa5b13..3ec7c5b736 100644 --- a/.github/actions/build-spec-transformation/action.yml +++ b/.github/actions/build-spec-transformation/action.yml @@ -8,15 +8,15 @@ runs: shell: bash run: | echo ${{ format('{0}/{1}', github.action_path, 'specification-transformation.bin') }} - ls -l ${{ format('{0}/{1}', github.action_path, 'specification-transformation.bin') }} + ls -l ${{ format('{0}/{1}', github.action_path, 'specification-transformation.bin') }} && echo "file_exists=true" >> "$GITHUB_ENV" || && echo "file_exists=false" >> "$GITHUB_ENV" - name: Setup java 17 - if: ${{ hashFiles(format('{0}/{1}', github.action_path, 'specification-transformation.bin')) == '' }} + if: ! env.file_exists uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0 with: distribution: temurin java-version: 17 - name: Checkout specification-transformation - if: ${{ hashFiles(format('{0}/{1}', github.action_path, 'specification-transformation.bin')) == '' }} + if: ! env.file_exists shell: bash run: | git clone https://gitlab.com/sosy-lab/software/specification-transformation.git specification-transformation @@ -24,7 +24,7 @@ runs: git checkout d966deb4ea0e34c1bc658d7c979a032340c93b13 # Fri Nov 8 10:43:02 2024 git apply $GITHUB_ACTION_PATH/patch.diff - name: Build cpachecker - if: ${{ hashFiles(format('{0}/{1}', github.action_path, 'specification-transformation.bin')) == '' }} + if: ! env.file_exists shell: bash run: | cd specification-transformation/lib @@ -38,18 +38,18 @@ runs: mv lib/cpachecker/config cpachecker/ mv lib/cpachecker/cpachecker.jar cpachecker/ - name: Install nuitka - if: ${{ hashFiles(format('{0}/{1}', github.action_path, 'specification-transformation.bin')) == '' }} + if: ! env.file_exists shell: bash run: | sudo apt update && sudo apt -y --no-install-recommends install nuitka libfuse2 - name: Run nuitka - if: ${{ hashFiles(format('{0}/{1}', github.action_path, 'specification-transformation.bin')) == '' }} + if: ! env.file_exists shell: bash run: | cd specification-transformation bash -c "yes yes || true" | nuitka3 --onefile --standalone --include-data-dir="cpachecker=cpachecker" src/specification-transformation.py - name: Move if exists - if: ${{ hashFiles(format('{0}/{1}', github.action_path, 'specification-transformation.bin')) != '' }} + if: env.file_exists shell: bash run: | mkdir specification-transformation