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

@ -17,7 +17,7 @@ matrix:
- os: linux - os: linux
sudo: false 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 # 14.04 LTS Server Edition 64 bit

View File

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

View File

@ -48,7 +48,7 @@ CPPFLAGS= -DXXH_NAMESPACE=LZ4_
CFLAGS ?= -O3 CFLAGS ?= -O3
CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \
-Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \ -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \
-Wpointer-arith # -Wstrict-aliasing=1 -Wpointer-arith -Wstrict-aliasing=1
CFLAGS += $(MOREFLAGS) CFLAGS += $(MOREFLAGS)
FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)

View File

@ -34,8 +34,10 @@ BINDIR := $(PREFIX)/bin
MANDIR := $(PREFIX)/share/man/man1 MANDIR := $(PREFIX)/share/man/man1
LZ4DIR := ../lib LZ4DIR := ../lib
CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make 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 CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow \
-Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes \
-Wpointer-arith -Wstrict-aliasing=1
CFLAGS += $(MOREFLAGS) CFLAGS += $(MOREFLAGS)
CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
@ -54,9 +56,9 @@ default: lz4
m32: lz4c32 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 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) $(CC) $(FLAGS) $^ -o $@$(EXT)

View File

@ -42,7 +42,8 @@ TESTDIR := versionsTest
PYTHON ?= python3 PYTHON ?= python3
CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make 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) CFLAGS += $(MOREFLAGS)
CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
@ -62,13 +63,13 @@ FUZZER_TIME := -T3mn
NB_LOOPS ?= -i1 NB_LOOPS ?= -i1
default: bins default: native
m32: fullbench32 fuzzer32 frametest32 m32: fullbench32 fuzzer32 frametest32
bins: fullbench fuzzer frametest datagen fasttest native: fullbench fuzzer frametest datagen fasttest
all: bins m32 all: native m32
lz4: lz4: