Skip to content

Commit 6113f39

Browse files
committed
travis-ci: added many missing testing suites and compilation flags.
1 parent 5b03f38 commit 6113f39

File tree

1 file changed

+73
-22
lines changed

1 file changed

+73
-22
lines changed

.travis.yml

Lines changed: 73 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,100 @@
1-
sudo: required
2-
dist: xenial
3-
41
os: linux
2+
dist: xenial
3+
sudo: false
54

65
language: c
76

7+
arch:
8+
- amd64
9+
#- arm64
10+
811
compiler:
912
- gcc
1013
- clang
1114

1215
addons:
1316
apt:
1417
packages:
15-
- axel
18+
- g++-5
19+
- valgrind
1620
- cpanminus
1721
- libtest-base-perl
1822
- libtext-diff-perl
1923
- libtest-longstring-perl
2024
- liblist-moreutils-perl
2125
- libparallel-forkmanager-perl
22-
- libgd-dev
2326
- libmpc-dev
24-
- build-essential
2527
- libgtk2.0-dev
26-
- valgrind
2728

2829
env:
2930
global:
30-
- JOBS=3
31-
- LUAJIT_PREFIX=/opt/luajit21
32-
- LUAJIT_SYSM_PREFIX=/opt/luajit21-sysm
33-
- LUAJIT_COMMON_XCFLAGS="-DLUA_USE_APICHECK -DLUA_USE_ASSERT -DLUAJIT_NUMMODE=2 -msse4.2 -O1"
31+
- JOBS=6
32+
- PREFIX=$HOME/luajit
33+
- XCFLAGS="-O1 -DLUA_USE_APICHECK -DLUA_USE_ASSERT -DLUAJIT_NUMMODE=2"
3434
matrix:
35-
- LUAJIT_XCFLAGS="$LUAJIT_COMMON_XCFLAGS"
36-
- LUAJIT_XCFLAGS="-DLUAJIT_ENABLE_LUA52COMPAT $LUAJIT_COMMON_XCFLAGS" LUA52=1
37-
- LUAJIT_XCFLAGS="-DLUAJIT_USE_VALGRIND -DLUAJIT_USE_SYSMALLOC -DLUAJIT_ENABLE_LUA52COMPAT $LUAJIT_COMMON_XCFLAGS" LUA52=1 FLAGS=-v
38-
- LUAJIT_XCFLAGS="-DLUAJIT_DISABLE_GC64 -DLUAJIT_ENABLE_LUA52COMPAT $LUAJIT_COMMON_XCFLAGS" LUA52=1
35+
- XCFLAGS="-O3 -DLUAJIT_ENABLE_LUA52COMPAT -DLUAJIT_NUMMODE=2" # OpenResty releases
36+
- XCFLAGS="-DLUAJIT_ENABLE_LUA52COMPAT -DLUAJIT_USE_VALGRIND -DLUAJIT_USE_SYSMALLOC $XCFLAGS"
37+
- XCFLAGS="-DLUAJIT_DISABLE_JIT $XCFLAGS"
38+
- XCFLAGS="-DLUAJIT_DISABLE_GC64 $XCFLAGS"
39+
- XCFLAGS="-DLJ_OR_DISABLE_STRHASHCRC32 $XCFLAGS"
40+
41+
matrix:
42+
fast_finish: true
43+
allow_failures:
44+
- arch: arm64
45+
46+
stages:
47+
- test
48+
- openresty tests
49+
- string hashing tests
50+
51+
jobs:
52+
allow_failures:
53+
- arch: arm64
54+
include:
55+
- stage: openresty tests
56+
script: prove -j$JOBS t
57+
env:
58+
- stage: openresty tests
59+
script: prove -j$JOBS t
60+
env:
61+
arch: arm64
62+
- stage: openresty tests
63+
script: prove -j$JOBS t
64+
env: TEST_LJ_USE_VALGRIND=1 XCFLAGS="-DLUAJIT_USE_VALGRIND -DLUAJIT_USE_SYSMALLOC $XCFLAGS"
65+
- stage: string hashing tests
66+
script: make -C test test
67+
env:
68+
- stage: string hashing tests
69+
script: make -C test test
70+
env:
71+
arch: arm64
72+
- stage: string hashing tests
73+
script: make -C test test
74+
env: WITH_VALGRIND=1 XCFLAGS="-DLUAJIT_USE_VALGRIND -DLUAJIT_USE_SYSMALLOC $XCFLAGS"
75+
76+
before_install:
77+
- cpanm --local-lib=$TRAVIS_BUILD_DIR/perl5 local::lib && eval $(perl -I$TRAVIS_BUILD_DIR/perl5/lib/perl5/ -Mlocal::lib)
78+
- cpanm --notest IPC::Run3
79+
- valgrind --version
80+
- export CXX=g++-5
3981

4082
install:
41-
- git clone https://github.com/openresty/luajit2-test-suite.git ../luajit2-test-suite
83+
- if [[ "$(uname -m)" == "x86_64" ]]; then XCFLAGS="$XCFLAGS -msse4.2"; fi
84+
- if [[ "$(uname -m)" == "aarch64" ]]; then XCFLAGS="$XCFLAGS -march=armv8-a+crc"; fi
85+
- make -j$JOBS CCDEBUG=-g Q= PREFIX=$PREFIX XCFLAGS="$XCFLAGS" >build.log 2>&1 || (cat build.log && exit 1)
86+
- make install PREFIX=$PREFIX >build.log 2>&1 || (cat build.log && exit 1)
87+
- export PATH="$PREFIX/bin:$PATH"
4288

4389
script:
44-
- valgrind --version
45-
- cd ../luajit2
46-
- make -j$JOBS CCDEBUG=-g Q= PREFIX=$LUAJIT_PREFIX CC=$CC XCFLAGS="$LUAJIT_XCFLAGS" > build.log 2>&1 || (cat build.log && exit 1)
47-
- sudo make install PREFIX=$LUAJIT_PREFIX > build.log 2>&1 || (cat build.log && exit 1)
48-
- cd ../luajit2-test-suite
49-
- ./run-tests -j $JOBS $FLAGS $LUAJIT_PREFIX
90+
- if [[ "$XCFLAGS" =~ "LUAJIT_ENABLE_LUA52COMPAT" ]]; then export LUA52=1; fi
91+
- if [[ "$XCFLAGS" =~ "LUAJIT_USE_VALGRIND" ]]; then export FLAGS=-v; fi
92+
- if [[ "$XCFLAGS" =~ "LJ_OR_DISABLE_STRHASHCRC32" ]]; then export NO_STRHASHCRC32=1; fi
93+
- git clone https://github.com/openresty/luajit2-test-suite.git
94+
- pushd luajit2-test-suite
95+
- ./run-tests -j$JOBS $FLAGS $PREFIX $PREFIX/bin/luajit $CC $CXX
96+
97+
cache:
98+
apt: true
99+
directories:
100+
- perl5

0 commit comments

Comments
 (0)