clang and g++ tests restricted to native only on Travis CI Ubuntu v12 environment

This commit is contained in:
Yann Collet 2016-11-14 08:51:28 -08:00
parent 1b24cc1155
commit 5a5ebeec15
5 changed files with 47 additions and 30 deletions

View File

@ -5,21 +5,21 @@ matrix:
# OS X Mavericks
- os: osx
env: Ubu=OS_X_Mavericks Cmd='make -C tests test-lz4 CC=clang MOREFLAGS="-Werror -Wconversion -Wno-sign-conversion"' COMPILER=clang
# Container-based 12.04 LTS Server Edition 64 bit (doesn't support 32-bit includes)
- os: linux
sudo: false
env: Ubu=12.04cont Cmd='make -C tests test-lz4 test-lz4c test-fasttest test-fullbench' COMPILER=cc
- os: linux
sudo: false
env: Ubu=12.04cont Cmd='make -C tests test-frametest test-fuzzer' COMPILER=cc
- os: linux
sudo: false
env: Ubu=12.04cont Cmd="make gpptest && make clean && make examples && make clean && make cmake && make clean && make travis-install && make clean && make clangtest" COMPILER=cc
env: Ubu=12.04cont Cmd="make gpptest-native && make clean && make examples && make clean && make cmake && make clean && make travis-install && make clean && make clangtest-native" COMPILER=cc
# 14.04 LTS Server Edition 64 bit
- env: Ubu=14.04 Cmd='make -C tests test-lz4c32 test-fullbench32 versionsTest' COMPILER=cc
dist: trusty
@ -30,7 +30,7 @@ matrix:
- python3
- libc6-dev-i386
- gcc-multilib
- env: Ubu=14.04 Cmd='make -C tests test-frametest32 test-fuzzer32' COMPILER=cc
dist: trusty
sudo: required
@ -39,7 +39,7 @@ matrix:
packages:
- libc6-dev-i386
- gcc-multilib
- env: Ubu=14.04 Cmd='make sanitize' COMPILER=clang
dist: trusty
sudo: required
@ -47,7 +47,7 @@ matrix:
apt:
packages:
- valgrind
- env: Ubu=14.04 Cmd='make staticAnalyze' COMPILER=clang
dist: trusty
sudo: required
@ -55,7 +55,7 @@ matrix:
apt:
packages:
- clang
- env: Ubu=14.04 Cmd='make platformTest CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static && make platformTest CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static' COMPILER=arm-linux-gnueabi-gcc
dist: trusty
sudo: required
@ -65,10 +65,10 @@ matrix:
- qemu-system-arm
- qemu-user-static
- gcc-arm-linux-gnueabi
- libc6-dev-armel-cross
- libc6-dev-armel-cross
- gcc-aarch64-linux-gnu
- libc6-dev-arm64-cross
- env: Ubu=14.04 Cmd='make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static && make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS=-m64' COMPILER=powerpc-linux-gnu-gcc
dist: trusty
sudo: required
@ -78,7 +78,7 @@ matrix:
- qemu-system-ppc
- qemu-user-static
- gcc-powerpc-linux-gnu
- env: Ubu=14.04 Cmd='make c_standards && make -C tests test-lz4 test-mem' COMPILER=cc
dist: trusty
sudo: required
@ -86,7 +86,7 @@ matrix:
apt:
packages:
- valgrind
- env: Ubu=14.04 Cmd='make -C tests test-lz4 test-lz4c32 CC=gcc-5 MOREFLAGS=-Werror' COMPILER=gcc-5
dist: trusty
sudo: required
@ -99,7 +99,7 @@ matrix:
- gcc-multilib
- gcc-5
- gcc-5-multilib
- env: Ubu=14.04 Cmd='make c_standards CC=gcc-6 && make -C tests test-lz4 CC=gcc-6 MOREFLAGS=-Werror' COMPILER=gcc-6
dist: trusty
sudo: required
@ -109,7 +109,7 @@ matrix:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- env: Ubu=14.04 Cmd='make -C tests test-lz4 CC=clang-3.8' COMPILER=clang-3.8
dist: trusty
sudo: required

View File

@ -91,13 +91,18 @@ travis-install:
test:
$(MAKE) -C $(TESTDIR) test
clangtest: CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion"
clangtest: clean
clang -v
@CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(LZ4DIR) all CC=clang
@CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(PRGDIR) all CC=clang
@CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(TESTDIR) all CC=clang
clangtest-native: clean
clang -v
@CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(LZ4DIR) all CC=clang
@CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(PRGDIR) native CC=clang
@CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(TESTDIR) native CC=clang
sanitize: clean
CFLAGS="-O3 -g -fsanitize=undefined" $(MAKE) test CC=clang FUZZER_TIME="-T1mn" NB_LOOPS=-i1
@ -108,8 +113,8 @@ platformTest: clean
@echo "\n ---- test lz4 with $(CC) compiler ----"
@$(CC) -v
CFLAGS="-O3 -Werror" $(MAKE) -C $(LZ4DIR) all
CFLAGS="-O3 -Werror -static" $(MAKE) -C $(PRGDIR) bins
CFLAGS="-O3 -Werror -static" $(MAKE) -C $(TESTDIR) bins
CFLAGS="-O3 -Werror -static" $(MAKE) -C $(PRGDIR) native
CFLAGS="-O3 -Werror -static" $(MAKE) -C $(TESTDIR) native
$(MAKE) -C $(TESTDIR) test-platform
versionsTest: clean
@ -138,7 +143,16 @@ cmake:
@cd contrib/cmake_unofficial; cmake $(CMAKE_PARAMS) CMakeLists.txt; $(MAKE)
gpptest: clean
CC=g++ $(MAKE) all CFLAGS="-O3 -I../lib -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
g++ -v
CC=g++ $(MAKE) -C $(LZ4DIR) all CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
CC=g++ $(MAKE) -C $(PRGDIR) all CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
CC=g++ $(MAKE) -C $(TESTDIR) all CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
gpptest-native: clean
g++ -v
CC=g++ $(MAKE) -C $(LZ4DIR) all CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
CC=g++ $(MAKE) -C $(PRGDIR) native CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
CC=g++ $(MAKE) -C $(TESTDIR) native CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
c_standards: clean
$(MAKE) all MOREFLAGS="-std=gnu90 -Werror"

View File

@ -48,7 +48,7 @@ CPPFLAGS= -DXXH_NAMESPACE=LZ4_
CFLAGS ?= -O3
CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \
-Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \
-Wpointer-arith # -Wstrict-aliasing=1
-Wpointer-arith -Wstrict-aliasing=1
CFLAGS += $(MOREFLAGS)
FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
@ -85,7 +85,7 @@ endif
liblz4: *.c
@echo compiling dynamic library $(LIBVER)
ifneq (,$(filter Windows%,$(OS)))
ifneq (,$(filter Windows%,$(OS)))
@$(CC) $(FLAGS) -DLZ4_DLL_EXPORT=1 -shared $^ -o $@.dll
dlltool -D liblz4.dll -d liblz4.def -l liblz4.dll.a
else

View File

@ -34,8 +34,10 @@ BINDIR := $(PREFIX)/bin
MANDIR := $(PREFIX)/share/man/man1
LZ4DIR := ../lib
CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make
CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wpointer-arith
CFLAGS ?= -O3 # allows custom optimization flags. For example : CFLAGS="-O2 -g" make
CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow \
-Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes \
-Wpointer-arith -Wstrict-aliasing=1
CFLAGS += $(MOREFLAGS)
CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
@ -54,9 +56,9 @@ default: lz4
m32: lz4c32
bins: lz4 lz4c
native: lz4 lz4c
all: bins m32
all: native m32
lz4: $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/lz4frame.o $(LZ4DIR)/xxhash.o bench.o lz4io.o lz4cli.o datagen.o
$(CC) $(FLAGS) $^ -o $@$(EXT)

View File

@ -42,7 +42,8 @@ TESTDIR := versionsTest
PYTHON ?= python3
CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make
CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes
CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum \
-Wdeclaration-after-statement -Wstrict-prototypes
CFLAGS += $(MOREFLAGS)
CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
@ -62,13 +63,13 @@ FUZZER_TIME := -T3mn
NB_LOOPS ?= -i1
default: bins
default: native
m32: fullbench32 fuzzer32 frametest32
bins: fullbench fuzzer frametest datagen fasttest
native: fullbench fuzzer frametest datagen fasttest
all: bins m32
all: native m32
lz4: