-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.buildbot.sh
57 lines (51 loc) · 1.75 KB
/
.buildbot.sh
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
#!/bin/sh
set -e
# First build without the JIT and check the tests still work.
make -j `nproc`
cd tests
../src/lua -e"_U=true" all.lua
cd ..
make clean
# Now test again with the JIT enabled.
export CARGO_HOME="`pwd`/.cargo"
export RUSTUP_HOME="`pwd`/.rustup"
export RUSTUP_INIT_SKIP_PATH_CHECK="yes"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
sh rustup.sh --default-host x86_64-unknown-linux-gnu \
--default-toolchain nightly \
--no-modify-path \
--profile minimal \
-y
export PATH=`pwd`/.cargo/bin/:$PATH
git clone --recurse-submodules --depth 1 https://github.com/softdevteam/yk
cd yk
YKB_YKLLVM_BUILD_ARGS="define:CMAKE_C_COMPILER=/usr/bin/clang,define:CMAKE_CXX_COMPILER=/usr/bin/clang++" \
cargo build
export PATH=`pwd`/bin:${PATH}
cd ..
export YK_BUILD_TYPE=debug
make -j `nproc`
cd tests
# YKFIXME: The JIT can't yet run the test suite, but the following commented
# commands are what we are aiming at having work.
#
# ../src/lua -e"_U=true" all.lua
# YKD_SERIALISE_COMPILATION=1 ../src/lua -e"_U=true" all.lua
#
# (Adding `YKD_SERIALISE_COMPILATION` exercises different threading behaviour
# that could help to shake out more bugs)
#
# Until we can run `all.lua` reliably, we just run the tests that we know to
# run within reasonable time).
#
# Note that the following tests have been known to non-deterministically crash
# (fairly rarely) and should be tested with `try_repeat` before being
# re-enabled: literals, constructs, goto.
LUA=../src/lua
for serialise in 0 1; do
for test in api bwcoercion closure code coroutine events \
gengc pm tpack tracegc utf8 vararg; do
echo "### YKD_SERIALISE_COMPILATION=$serialise $test.lua ###"
YKD_SERIALISE_COMPILATION=$serialise ${LUA} ${test}.lua
done
done