2323 - ' **'
2424
2525jobs :
26- build_on_linux :
27- name : Build on Linux
26+ build_and_test_on_linux :
27+ name : Build and Test on Linux
2828 runs-on : ${{ matrix.os }}
2929 strategy :
3030 matrix :
@@ -48,14 +48,14 @@ jobs:
4848 run : |
4949 sudo wget https://apt.llvm.org/llvm.sh
5050 sudo chmod +x llvm.sh
51- sudo ./llvm.sh 11
51+ sudo ./llvm.sh
5252 sudo apt-get -y install uuid-dev pkg-config doxygen graphviz
5353 - name : Install Antlr4 and Antlr4 Runtime
5454 if : steps.cache-antlr.outputs.cache-hit != 'true'
5555 run : |
5656 sudo mkdir -p thirdparty/antlr && cd thirdparty/antlr
57- sudo wget https://www.antlr.org/download/antlr-4.9-complete.jar
58- sudo wget -O ${{ runner.temp }}/antlr4-src.zip https://www.antlr.org/download/antlr4-cpp-runtime-4.9-source.zip
57+ sudo wget https://www.antlr.org/download/antlr-4.9.2 -complete.jar
58+ sudo wget -O ${{ runner.temp }}/antlr4-src.zip https://www.antlr.org/download/antlr4-cpp-runtime-4.9.2 -source.zip
5959 cd ${{ runner.temp }}
6060 sudo unzip antlr4-src.zip
6161 sudo mkdir build && cd build
@@ -74,30 +74,18 @@ jobs:
7474 cd cmake-build-debug
7575 sudo cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-w" -G "Unix Makefiles" ..
7676 sudo cmake --build . --target staticscript document -- -j $THREAD_COUNT
77+ sudo ctest --extra-verbose
7778 cd ../cmake-build-release
7879 sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-w" -G "Unix Makefiles" ..
7980 sudo cmake --build . --target staticscript document -- -j $THREAD_COUNT
80- - name : Upload Debug File
81- uses : actions/upload-artifact@v2
82- with :
83- name : staticscript-${{ matrix.os }}-${{ matrix.compiler.cc }}-debug
84- path : |
85- cmake-build-debug/staticscript
86- cmake-build-debug/lib/*.bc
87- - name : Upload Release File
88- uses : actions/upload-artifact@v2
89- with :
90- name : staticscript-${{ matrix.os }}-${{ matrix.compiler.cc }}-release
91- path : |
92- cmake-build-release/staticscript
93- cmake-build-release/lib/*.bc
81+ sudo ctest --extra-verbose
9482
95- build_on_macos :
96- name : Build on macOS
83+ build_and_test_on_macos :
84+ name : Build and Test on macOS
9785 runs-on : ${{ matrix.os }}
9886 strategy :
9987 matrix :
100- os : [ macos-10.15, macos-11.0 ]
88+ os : [ macos-10.15 ]
10189 compiler :
10290 - { cc: gcc, cxx: g++ }
10391 - { cc: clang, cxx: clang++ }
@@ -116,70 +104,8 @@ jobs:
116104 cd cmake-build-debug
117105 sudo cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-w" -G "Unix Makefiles" ..
118106 sudo cmake --build . --target staticscript document -- -j $THREAD_COUNT
107+ sudo ctest --extra-verbose
119108 cd ../cmake-build-release
120109 sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-w" -G "Unix Makefiles" ..
121110 sudo cmake --build . --target staticscript document -- -j $THREAD_COUNT
122- - name : Upload Debug File
123- uses : actions/upload-artifact@v2
124- with :
125- name : staticscript-${{ matrix.os }}-${{ matrix.compiler.cc }}-debug
126- path : |
127- cmake-build-debug/staticscript
128- cmake-build-debug/lib/*.bc
129- - name : Upload Release File
130- uses : actions/upload-artifact@v2
131- with :
132- name : staticscript-${{ matrix.os }}-${{ matrix.compiler.cc }}-release
133- path : |
134- cmake-build-release/staticscript
135- cmake-build-release/lib/*.bc
136-
137- test :
138- name : Test
139- needs : [ build_on_linux, build_on_macos ]
140- runs-on : ${{ matrix.os }}
141- strategy :
142- matrix :
143- os : [ ubuntu-18.04, ubuntu-20.04, macos-10.15, macos-11.0 ]
144- compiler :
145- - { cc: gcc, cxx: g++ }
146- - { cc: clang, cxx: clang++ }
147- steps :
148- - name : Fetch Codebase
149- uses : actions/checkout@v2
150- - name : Download Debug File
151- uses : actions/download-artifact@v2
152- with :
153- name : staticscript-${{ matrix.os }}-${{ matrix.compiler.cc }}-debug
154- path : executables/debug
155- - name : Download Release File
156- uses : actions/download-artifact@v2
157- with :
158- name : staticscript-${{ matrix.os }}-${{ matrix.compiler.cc }}-release
159- path : executables/release
160- - name : Test Exmaple Code on Debug Compiler
161- working-directory : executables/debug
162- run : |
163- chmod +x ./staticscript
164- for file in ${{ github.workspace }}/tests/*.ss
165- do
166- base=$(basename $file)
167- sudo ./staticscript $file -L lib --emit-llvm -o $base.ll
168- sudo ./staticscript $file -L lib -c -o $base.o
169- sudo ./staticscript $file -L lib -o $base.exe
170- sudo clang $base.o -lm -o $base.exe
171- sudo ./$base.exe
172- done
173- - name : Test Exmaple Code on Release Compiler
174- working-directory : executables/release
175- run : |
176- chmod +x ./staticscript
177- for file in ${{ github.workspace }}/tests/*.ss
178- do
179- base=$(basename $file)
180- sudo ./staticscript $file -L lib --emit-llvm -o $base.ll
181- sudo ./staticscript $file -L lib -c -o $base.o
182- sudo ./staticscript $file -L lib -o $base.exe
183- sudo clang $base.o -lm -o $base.exe
184- sudo ./$base.exe
185- done
111+ sudo ctest --extra-verbose
0 commit comments