Skip to content

Commit

Permalink
Fixed LLVM install action and test
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Jul 30, 2023
1 parent 4a88f07 commit 6160426
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
13 changes: 8 additions & 5 deletions .github/actions/install-llvm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6160426

Please sign in to comment.