2424 compiler :
2525 - { cc: gcc, cxx: g++ }
2626 - { cc: clang, cxx: clang++ }
27- fail-fast : false
2827 steps :
2928 - name : Fetch Codebase
3029 uses : actions/checkout@v2
@@ -35,13 +34,14 @@ jobs:
3534 path : ${{ github.workspace }}/thirdparty
3635 key : ${{ matrix.os }}-${{ matrix.compiler.cc }}-antlr
3736 - name : Install Prerequirements
38- run : sudo apt-get install uuid-dev pkg-config doxygen graphviz
37+ run : sudo apt-get -y install uuid-dev pkg-config doxygen graphviz llvm-10
3938 - name : Install Antlr4 and Antlr4 Runtime
4039 if : steps.cache-antlr.outputs.cache-hit != 'true'
4140 env :
4241 CC : ${{ matrix.compiler.cc }}
4342 CXX : ${{ matrix.compiler.cxx }}
4443 run : |
44+ thread_count=`sudo cat /proc/cpuinfo| grep "processor"| wc -l`
4545 sudo mkdir -p thirdparty/antlr && cd thirdparty/antlr
4646 sudo wget https://www.antlr.org/download/antlr-4.8-complete.jar
4747 sudo wget -O ${{ runner.temp }}/antlr4-src.zip https://www.antlr.org/download/antlr4-cpp-runtime-4.8-source.zip
5050 sudo mkdir build && cd build
5151 sudo mkdir -p ${{ github.workspace }}/thirdparty/antlr-runtime
5252 sudo cmake .. -DANTLR4_INSTALL=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-w" -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/thirdparty/antlr-runtime
53- sudo cmake --build . --target install
53+ sudo cmake --build . --target install -- -j $thread_count
5454 - name : Move Antlr Runtime into /usr/local
5555 run : |
5656 cd ${{ github.workspace }}/thirdparty/antlr-runtime
@@ -61,20 +61,23 @@ jobs:
6161 CC : ${{ matrix.compiler.cc }}
6262 CXX : ${{ matrix.compiler.cxx }}
6363 run : |
64+ thread_count=`sudo cat /proc/cpuinfo| grep "processor"| wc -l`
6465 sudo mkdir cmake-build-debug cmake-build-release
6566 cd cmake-build-debug
66- sudo cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-w" -G "CodeBlocks - Unix Makefiles" ..
67- sudo cmake --build . --target staticscript document
67+ sudo cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-w" -DCMAKE_CXX_FLAGS_DEBUG="-g -ggdb" -G " Unix Makefiles" ..
68+ sudo cmake --build . --target staticscript document -- -j $thread_count
6869 for file in ../examples/*
6970 do
70- sudo ./lib/staticscript $file
71+ sudo ./lib/staticscript $file --emit-llvm -o ss-ir.ll
72+ sudo ./lib/staticscript $file -o ss-obj.o
7173 done
7274 cd ../cmake-build-release
73- sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-w" -G "CodeBlocks - Unix Makefiles" ..
74- sudo cmake --build . --target staticscript document
75+ sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-w" -G "Unix Makefiles" ..
76+ sudo cmake --build . --target staticscript document -- -j $thread_count
7577 for file in ../examples/*
7678 do
77- sudo ./lib/staticscript $file
79+ sudo ./lib/staticscript $file --emit-llvm -o ss-ir.ll
80+ sudo ./lib/staticscript $file -o ss-obj.o
7881 done
7982
8083 build_on_macos :
@@ -96,18 +99,21 @@ jobs:
9699 CC : ${{ matrix.compiler.cc }}
97100 CXX : ${{ matrix.compiler.cxx }}
98101 run : |
102+ thread_count=`sudo sysctl -n machdep.cpu.thread_count`
99103 sudo mkdir cmake-build-debug cmake-build-release
100104 cd cmake-build-debug
101- sudo cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-w" -G "CodeBlocks - Unix Makefiles" ..
102- sudo cmake --build . --target staticscript document
105+ sudo cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-w" -G "Unix Makefiles" ..
106+ sudo cmake --build . --target staticscript document -- -j $thread_count
103107 for file in ../examples/*
104108 do
105- sudo ./lib/staticscript $file
109+ sudo ./lib/staticscript $file --emit-llvm -o ss-ir.ll
110+ sudo ./lib/staticscript $file -o ss-obj.o
106111 done
107112 cd ../cmake-build-release
108- sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-w" -G "CodeBlocks - Unix Makefiles" ..
109- sudo cmake --build . --target staticscript document
113+ sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-w" -G "Unix Makefiles" ..
114+ sudo cmake --build . --target staticscript document -- -j $thread_count
110115 for file in ../examples/*
111116 do
112- sudo ./lib/staticscript $file
117+ sudo ./lib/staticscript $file --emit-llvm -o ss-ir.ll
118+ sudo ./lib/staticscript $file -o ss-obj.o
113119 done
0 commit comments