From 6160426f44d296bfae678c0794fc784fd6ce688e Mon Sep 17 00:00:00 2001 From: Levente Bajczi Date: Sun, 30 Jul 2023 18:06:03 +0200 Subject: [PATCH] Fixed LLVM install action and test --- .github/actions/install-llvm/action.yml | 13 ++++++++----- .../hu/bme/mit/theta/xcfa/cli/XcfaCliParseTest.kt | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/actions/install-llvm/action.yml b/.github/actions/install-llvm/action.yml index 0f87cd1615..ffff4eb4d5 100644 --- a/.github/actions/install-llvm/action.yml +++ b/.github/actions/install-llvm/action.yml @@ -9,11 +9,14 @@ runs: - name: Run install script shell: bash run: | - wget https://apt.llvm.org/llvm.sh - chmod +x llvm.sh - sudo ./llvm.sh ${{ inputs.version }} - sudo ln -sf $(which clang-${{inputs.version}}) /usr/bin/clang - sudo ln -sf $(which llvm-config-${{inputs.version}}) /usr/bin/llvm-config + # wget https://apt.llvm.org/llvm.sh + # chmod +x llvm.sh + # sudo ./llvm.sh ${{ inputs.version }} + # sudo ln -sf $(which clang-${{inputs.version}}) /usr/bin/clang + # sudo ln -sf $(which llvm-config-${{inputs.version}}) /usr/bin/llvm-config + wget https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04.tar.xz -O llvm.tar.xz + sudo tar xvJf llvm.tar.xz --directory /opt + echo "/opt/*/bin" >> $GITHUB_PATH - name: Test version shell: bash run: | diff --git a/subprojects/xcfa/xcfa-cli/src/test/java/hu/bme/mit/theta/xcfa/cli/XcfaCliParseTest.kt b/subprojects/xcfa/xcfa-cli/src/test/java/hu/bme/mit/theta/xcfa/cli/XcfaCliParseTest.kt index 76c71731ab..4716769d4e 100644 --- a/subprojects/xcfa/xcfa-cli/src/test/java/hu/bme/mit/theta/xcfa/cli/XcfaCliParseTest.kt +++ b/subprojects/xcfa/xcfa-cli/src/test/java/hu/bme/mit/theta/xcfa/cli/XcfaCliParseTest.kt @@ -15,6 +15,7 @@ */ package hu.bme.mit.theta.xcfa.cli +import hu.bme.mit.theta.common.OsHelper import hu.bme.mit.theta.frontend.chc.ChcFrontend import hu.bme.mit.theta.xcfa.cli.XcfaCli.Companion.main import org.junit.jupiter.params.ParameterizedTest @@ -164,11 +165,13 @@ class XcfaCliParseTest { @ParameterizedTest @MethodSource("llvmFiles") fun testLLVMParse(filePath: String) { - main(arrayOf( - "--input-type", "LLVM", - "--input", javaClass.getResource(filePath)!!.path, - "--parse-only", "--stacktrace" - )) + if (OsHelper.getOs() == OsHelper.OperatingSystem.LINUX) { + main(arrayOf( + "--input-type", "LLVM", + "--input", javaClass.getResource(filePath)!!.path, + "--parse-only", "--stacktrace" + )) + } } @ParameterizedTest