-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
181 lines (157 loc) · 5.76 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
stages:
- build
- test
- mubench
- rustfmt
before_script:
- export MU_ZEBU=$CI_PROJECT_DIR
- export ZEBU_BUILD=release
- export CARGO_HOME=.cargo
- export CC=clang
- export CXX=clang++
- export RUST_TEST_THREADS=1
- export LD_LIBRARY_PATH=$MU_ZEBU/target/$ZEBU_BUILD/deps/:$LD_LIBRARY_PATH
- source /home/gitlab-runner/ci/bin/activate
build:
stage: build
script:
- rustup run 1.30.1-x86_64-unknown-linux-gnu cargo clean
- time rustup run 1.30.1-x86_64-unknown-linux-gnu cargo test -j6 --release --no-run --color=always
artifacts:
paths:
- target/release/deps/libmu.so
- target/release/deps/libmu.a
- target/release/deps/lib-*
test:cargo:api:
stage: test
script:
- rustup run 1.30.1-x86_64-unknown-linux-gnu cargo test test_api --release 2> /dev/null
test:cargo:ir:
stage: test
script:
- rustup run 1.30.1-x86_64-unknown-linux-gnu cargo test test_ir --release 2> /dev/null
test:cargo:compiler:
stage: test
script:
- rustup run 1.30.1-x86_64-unknown-linux-gnu cargo test test_compiler --release 2> /dev/null
test:cargo:runtime:
stage: test
script:
- rustup run 1.30.1-x86_64-unknown-linux-gnu cargo test test_runtime --release 2> /dev/null
.build_muc: &build_muc |
if [ -d "tests/test_muc/mu-tool-compiler" ]; then rm -Rf tests/test_muc/mu-tool-compiler; fi
cd tests/test_muc
git clone https://gitlab.anu.edu.au/mu/mu-tool-compiler
cd mu-tool-compiler
export ANTLR_HOME=/home/gitlab-runner/antlr4/runtime/Cpp/run
mkdir lib
cp -r $ANTLR_HOME/usr/local/lib/* $PWD/lib/
cp -r $MU_ZEBU/target/release/deps/* $PWD/lib/
export CC=clang
export CXX=clang++
make
cd ..
testmuc:test_simple:
stage: test
script:
- *build_muc
- LD_LIBRARY_PATH=mu-tool-compiler/lib/ MUC=mu-tool-compiler/muc python2 -m pytest test_simple.py -v
testmuc:test_swapstack:
stage: test
script:
- *build_muc
- LD_LIBRARY_PATH=mu-tool-compiler/lib/ MUC=mu-tool-compiler/muc python2 -m pytest test_thread_and_stack.py -v
testmuc:test_cmp:
stage: test
script:
- *build_muc
- LD_LIBRARY_PATH=mu-tool-compiler/lib/ MUC=mu-tool-compiler/muc python2 -m pytest test_cmp.py -v
testmuc:test_binop:
stage: test
script:
- *build_muc
- LD_LIBRARY_PATH=mu-tool-compiler/lib/ MUC=mu-tool-compiler/muc python2 -m pytest test_binop.py -v
testjit:milestones:
stage: test
script:
- RUST_BACKTRACE=1 pytest tests/test_jit/test_milestones.py -v --color=yes
testjit:binops:
stage: test
script:
- RUST_BACKTRACE=1 pytest tests/test_jit/test_binops.py -v --color=yes
testjit:cmpops:
stage: test
script:
- RUST_BACKTRACE=1 pytest tests/test_jit/test_cmpops.py -v --color=yes
testjit:controlflow:
stage: test
script:
# run this test under test_jit directory
# as a C source file is expected in a relative path to current working directory
- cd tests/test_jit
- RUST_BACKTRACE=1 pytest test_controlflow.py -v --color=yes
testjit:convops:
stage: test
script:
- RUST_BACKTRACE=1 pytest tests/test_jit/test_convops.py -v --color=yes
testjit:double:
stage: test
script:
- RUST_BACKTRACE=1 pytest tests/test_jit/test_double.py -v --color=yes
testjit:memops:
stage: test
script:
- RUST_BACKTRACE=1 pytest tests/test_jit/test_memops.py -v --color=yes
testjit:milestones:
stage: test
script:
- RUST_BACKTRACE=1 pytest tests/test_jit/test_milestones.py -v --color=yes
testjit:otherops:
stage: test
script:
- RUST_BACKTRACE=1 pytest tests/test_jit/test_otherops.py -v --color=yes
testjit:rpython:
stage: test
script:
- if [ -d "tests/test_jit/mu-client-pypy" ]; then rm -Rf tests/test_jit/mu-client-pypy; fi
- git clone https://gitlab.anu.edu.au/mu/mu-client-pypy.git tests/test_jit/mu-client-pypy
- cd tests/test_jit/mu-client-pypy
- git checkout mu-rewrite
- git apply pypy.patch
- cd $CI_PROJECT_DIR/tests/test_jit
- MU_LOG_LEVEL=info LD_LIBRARY_PATH=./emit:$LD_LIBRARY_PATH RUST_BACKTRACE=1 PYTHONPATH=mu-client-pypy pytest test_rpython*.py -v --color=yes
testjit:som:
stage: test
script:
- if [ -d "tests/test_jit/RPySOM" ]; then rm -Rf tests/test_jit/RPySOM; fi
- git clone https://github.com/microvm/RPySOM.git tests/test_jit/RPySOM
- cd tests/test_jit/RPySOM; git submodule init; git submodule update; cd $CI_PROJECT_DIR
- if [ -d "tests/test_jit/mu-client-pypy" ]; then rm -Rf tests/test_jit/mu-client-pypy; fi
- git clone https://gitlab.anu.edu.au/mu/mu-client-pypy.git tests/test_jit/mu-client-pypy
- cd tests/test_jit/mu-client-pypy
- git checkout mu-rewrite
- git apply pypy.patch
- cd $CI_PROJECT_DIR/tests/test_jit
- MU_LOG_LEVEL=info LD_LIBRARY_PATH=./emit:$LD_LIBRARY_PATH RUST_BACKTRACE=1 PYTHONPATH=mu-client-pypy:RPySOM/src RPYSOM=RPySOM pytest test_som.py -v --color=yes
mubench:
stage: mubench
script:
- cp ./target/release/deps/libmu.so ./target/release/libmu.so
- deactivate
- git clone https://gitlab.anu.edu.au/mu/mu-perf-benchmarks.git
- git clone https://gitlab.anu.edu.au/mu/mu-client-pypy.git
- cd mu-client-pypy; git apply pypy.patch; git apply clang_opt_flag.patch; cd $CI_PROJECT_DIR
- git clone https://github.com/microvm/RPySOM.git
- cd RPySOM; git submodule init; git submodule update; cd $CI_PROJECT_DIR
- export RPYSOM=RPySOM
- export PYPY=mu-client-pypy
- virtualenv -p python3 mubench_venv
- source mubench_venv/bin/activate
- pip install -Ue ./mu-perf-benchmarks
- mkdir ci
- mubench local ./mu-perf-benchmarks/ci/*.yml --dump /home/gitlab-runner/results/$(git log -1 --pretty="%h_%at") --pipeline ""
- rsync -a /home/gitlab-runner/results/* squirrel:~/mu-impl-fast/angus
rustfmt:
stage: rustfmt
script:
- cargo-fmt -- --check --verbose -- src/lib.rs src/ast/src/lib.rs src/gc/src/lib.rs src/utils/src/lib.rs