From 2b35f8736b7ae74be5fdb0d0cad99ae54a6bc2c4 Mon Sep 17 00:00:00 2001 From: Marc Auberer Date: Thu, 15 Jul 2021 09:32:33 +0200 Subject: [PATCH] Fix CI workflow --- .github/workflows/ci.yml | 27 +++++++++---------- compiler/src/CMakeLists.txt | 4 +-- .../{ir => generator}/GeneratorVisitor.cpp | 0 .../src/{ir => generator}/GeneratorVisitor.h | 0 compiler/src/main.cpp | 2 +- 5 files changed, 16 insertions(+), 17 deletions(-) rename compiler/src/{ir => generator}/GeneratorVisitor.cpp (100%) rename compiler/src/{ir => generator}/GeneratorVisitor.h (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1446fc721..7c39e890a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Cache LLVM and Clang + - name: Cache LLVM id: cache-llvm uses: actions/cache@v2 with: @@ -25,15 +25,12 @@ jobs: - name: Setup LLVM if: steps.cache-llvm.outputs.cache-hit != 'true' run: | - mkdir -p ../llvm - cd ../llvm - curl -fsSL https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-12.0.1.tar.gz -o llvm.tar.gz - tar -zxf llvm.tar.gz - mkdir ./llvm-project-llvmorg-12.0.1/build - cd ./llvm-project-llvmorg-12.0.1/build + cd .. + git clone https://github.com/llvm/llvm-project llvm + mkdir ./llvm/build + cd ./llvm/build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_FLAGS_RELEASE="-O2" -G "Unix Makefiles" ../llvm cmake --build . - export LLVM_DIR=/home/runner/work/spice/llvm/llvm-project-llvmorg-12.0.1/build/lib/cmake/llvm - name: Download Libs run: | @@ -42,9 +39,11 @@ jobs: git clone https://github.com/google/googletest.git git clone https://github.com/antlr/antlr4.git - - name: Build - run: | - mkdir bin - cd bin - cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -DWITH_TESTS=ON ../compiler - cmake --build . --target Spice_run -- -j 6 \ No newline at end of file + #- name: Build + # env: + # LLVM_DIR: /home/runner/work/spice/llvm/build/lib/cmake/llvm + # run: | + # mkdir bin + # cd bin + # cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -DWITH_TESTS=ON ../compiler + # cmake --build . --target Spice_run -- -j 6 \ No newline at end of file diff --git a/compiler/src/CMakeLists.txt b/compiler/src/CMakeLists.txt index 1e53542e5..7111fe465 100644 --- a/compiler/src/CMakeLists.txt +++ b/compiler/src/CMakeLists.txt @@ -27,8 +27,8 @@ set(SOURCES analyzer/SymbolTable.h analyzer/SymbolTableEntry.cpp analyzer/SymbolTableEntry.h - ir/GeneratorVisitor.cpp - ir/GeneratorVisitor.h + generator/GeneratorVisitor.cpp + generator/GeneratorVisitor.h exception/SemanticError.cpp exception/SemanticError.h exception/IRError.cpp diff --git a/compiler/src/ir/GeneratorVisitor.cpp b/compiler/src/generator/GeneratorVisitor.cpp similarity index 100% rename from compiler/src/ir/GeneratorVisitor.cpp rename to compiler/src/generator/GeneratorVisitor.cpp diff --git a/compiler/src/ir/GeneratorVisitor.h b/compiler/src/generator/GeneratorVisitor.h similarity index 100% rename from compiler/src/ir/GeneratorVisitor.h rename to compiler/src/generator/GeneratorVisitor.h diff --git a/compiler/src/main.cpp b/compiler/src/main.cpp index 6722aa2b8..6fb2363d9 100644 --- a/compiler/src/main.cpp +++ b/compiler/src/main.cpp @@ -5,7 +5,7 @@ #include "SpiceLexer.h" #include "SpiceParser.h" #include "analyzer/AnalyzerVisitor.h" -#include "ir/GeneratorVisitor.h" +#include "generator/GeneratorVisitor.h" using namespace antlr4;