-
Notifications
You must be signed in to change notification settings - Fork 38
/
.travis.yml
47 lines (38 loc) · 1.33 KB
/
.travis.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
language: c
compiler: gcc
sudo: false
env:
- LUA="lua=5.1"
- LUA="lua=5.1" EXTERNAL=true
- LUA="lua=5.1" COMPILER="g++"
- LUA="lua=5.1" EXTERNAL=true COMPILER="g++"
- LUA="[email protected] --compat=none"
- LUA="[email protected] --compat=none" EXTERNAL=true
- LUA="[email protected] --compat=all"
- LUA="[email protected] --compat=all" EXTERNAL=true
- LUA="lua=5.2"
- LUA="lua=5.2" EXTERNAL=true
- LUA="lua=5.2" COMPILER="g++"
- LUA="lua=5.2" EXTERNAL=true COMPILER="g++"
branches:
only:
- master
git:
depth: 3
notifications:
email: false
before_install:
- pip install --user hererocks
- hererocks old --$LUA
- test -e old/bin/lua || (cd old/bin && ln -s luajit* lua)
- hererocks new --lua=5.3
install:
- export CC="${COMPILER:-gcc}" DEF="" SRC="" CFLAGS="-Wall -Wextra -Ic-api -O2 -fPIC"
- if [ "x${EXTERNAL:-}" = xtrue ]; then DEF="-DCOMPAT53_PREFIX=compat53" SRC="c-api/compat-5.3.c"; fi
- ${CC} ${CFLAGS} -Iold/include ${DEF} -shared -o old/testmod.so tests/testmod.c ${SRC}
- ${CC} ${CFLAGS} -Inew/include ${DEF} -shared -o new/testmod.so tests/testmod.c ${SRC}
- gcc ${CFLAGS} -Iold/include ${DEF} -shared -o old/compat53.so ltablib.c lutf8lib.c lstrlib.c liolib.c ${SRC}
script:
- (cd old && bin/lua ../tests/test.lua) > old.txt
- (cd new && bin/lua ../tests/test.lua) > new.txt
- diff old.txt new.txt || true