File tree Expand file tree Collapse file tree 7 files changed +44
-6
lines changed Expand file tree Collapse file tree 7 files changed +44
-6
lines changed Original file line number Diff line number Diff line change 24
24
- name : Run the memory leak checks (gcc)
25
25
run : |
26
26
make memcheck
27
+ make memcheck-compiler
27
28
28
29
- name : Build (clang)
29
30
run : |
33
34
- name : Run the memory leak checks (clang)
34
35
run : |
35
36
make memcheck
37
+ make memcheck-compiler
Original file line number Diff line number Diff line change 78
78
- name : Run the tests (gcc)
79
79
run : |
80
80
make test
81
+ make test-compiler
81
82
82
83
- name : Build (clang)
83
84
run : |
87
88
- name : Run the tests (clang)
88
89
run : |
89
90
make test
91
+ make test-compiler
90
92
91
93
macos :
92
94
name : macos
@@ -99,27 +101,30 @@ jobs:
99
101
run : |
100
102
mv /usr/local/bin/gcc-8 /usr/local/bin/gcc
101
103
make requirements
102
- brew install gnu-sed
103
104
104
105
- name : Build (gcc)
105
106
run : |
106
107
source ~/.bash_profile
107
108
cd .chaos/ && make && make install && cd ..
109
+ source ~/.bash_profile
108
110
make
109
111
110
112
- name : Run the tests (gcc)
111
113
run : |
112
114
make test
115
+ make test-compiler
113
116
114
117
- name : Build (clang)
115
118
run : |
116
119
source ~/.bash_profile
117
120
cd .chaos/ && make clang && make install && cd ..
121
+ source ~/.bash_profile
118
122
make clang
119
123
120
124
- name : Run the tests (clang)
121
125
run : |
122
126
make test
127
+ make test-compiler
123
128
124
129
windows :
125
130
name : windows
@@ -143,6 +148,7 @@ jobs:
143
148
shell : cmd
144
149
run : |
145
150
call make.bat test
151
+ call make.bat test-compiler
146
152
147
153
- name : Build (clang)
148
154
shell : cmd
@@ -156,3 +162,4 @@ jobs:
156
162
run : |
157
163
call RefreshEnv.cmd
158
164
call make.bat test
165
+ call make.bat test-compiler
Original file line number Diff line number Diff line change @@ -18,3 +18,6 @@ spells/
18
18
19
19
# Chaos project directory
20
20
.chaos /
21
+
22
+ # Chaos build directory
23
+ build
Original file line number Diff line number Diff line change @@ -35,12 +35,18 @@ spell:
35
35
test : spell
36
36
./test.sh
37
37
38
+ test-compiler : spell
39
+ ./test.sh compile
40
+
38
41
memcheck : spell
39
42
valgrind --tool=memcheck --leak-check=full --show-reachable=yes --num-callers=20 --track-fds=yes --track-origins=yes --error-exitcode=1 chaos test.kaos || exit 1
40
43
44
+ memcheck-compiler : spell
45
+ valgrind --tool=memcheck --leak-check=full --show-reachable=yes --num-callers=20 --track-fds=yes --track-origins=yes --error-exitcode=1 chaos -c test.kaos || exit 1
46
+ valgrind --tool=memcheck --leak-check=full --show-reachable=yes --num-callers=20 --track-fds=yes --track-origins=yes --error-exitcode=1 build/main || exit 1
47
+
41
48
requirements :
42
49
git clone https://github.com/chaos-lang/chaos.git .chaos/ && \
43
50
cd .chaos/ && \
44
51
make requirements && \
45
- make requirements-dev && \
46
52
rm -rf .chaos/
Original file line number Diff line number Diff line change @@ -16,6 +16,15 @@ IF [%1]==[clang] (
16
16
EXIT /B 1
17
17
)
18
18
EXIT /B 0
19
+ ) ELSE IF [%1 ]== [test-compiler] (
20
+ IF not exist spells\%spell_name% mkdir spells\%spell_name%
21
+ COPY %spell_name% .dll spells\%spell_name%
22
+
23
+ CALL test.bat compile
24
+ IF errorlevel 1 (
25
+ EXIT /B 1
26
+ )
27
+ EXIT /B 0
19
28
) ELSE IF [%1 ]== [requirements] (
20
29
git clone https://github.com/chaos-lang/chaos.git .chaos/
21
30
CD .chaos\
Original file line number Diff line number Diff line change 1
1
@ ECHO OFF
2
2
setlocal EnableDelayedExpansion
3
3
4
- chaos test.kaos > tmpFile
4
+ IF " %~1 " == " compile" (
5
+ chaos -c test.kaos
6
+ build\main > tmpFile
7
+ ) ELSE (
8
+ chaos test.kaos > tmpFile
9
+ )
10
+
5
11
FC test.out tmpFile
6
12
IF errorlevel 1 (
7
13
DEL tmpFile
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
out=$( < " test.out" )
4
- test=$( chaos test.kaos)
5
- if [ " $test " == " $out " ]
6
- then
4
+ if [ " $# " -gt 0 ] && [ $1 == " compile" ]; then
5
+ chaos -c test.kaos && \
6
+ test=$( build/main)
7
+ else
8
+ test=$( chaos test.kaos)
9
+ fi
10
+
11
+ if [ " $test " == " $out " ]; then
7
12
echo " OK"
8
13
else
9
14
echo " $test "
You can’t perform that action at this time.
0 commit comments