mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-19 11:09:42 +00:00
Add travis build
This commit is contained in:
1 parent
f2fba1d200
commit
87de05881c
3 files changed
+31
-20
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
language: c
|
||||
sudo: false
|
||||
after_success: bash <(curl -s https://codecov.io/bash)
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
- windows
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
script: make mg_prefix cpp test ex
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
compiler: msvc98
|
||||
script: make vc98 vc2017
|
||||
sudo: required
|
||||
services:
|
||||
- docker
|
||||
@@ -40,37 +40,37 @@ cpp: unamalgamated
|
||||
|
||||
# Make sure we can build from an unamalgamated sources
|
||||
unamalgamated: $(SRCS) $(HDRS) Makefile
|
||||
$(CLANG) src/*.c tests/unit_test.c $(CFLAGS) $(LDFLAGS) -g -o unit_test
|
||||
$(CLANG) src/*.c test/unit_test.c $(CFLAGS) $(LDFLAGS) -g -o unit_test
|
||||
|
||||
fuzz: mongoose.c mongoose.h Makefile tests/fuzz.c
|
||||
$(CLANG) mongoose.c tests/fuzz.c $(CFLAGS) -DMG_ENABLE_LOG=0 -fsanitize=fuzzer,signed-integer-overflow,address $(LDFLAGS) -g -o fuzzer
|
||||
fuzz: mongoose.c mongoose.h Makefile test/fuzz.c
|
||||
$(CLANG) mongoose.c test/fuzz.c $(CFLAGS) -DMG_ENABLE_LOG=0 -fsanitize=fuzzer,signed-integer-overflow,address $(LDFLAGS) -g -o fuzzer
|
||||
$(DEBUGGER) ./fuzzer
|
||||
|
||||
# make CC=/usr/local/opt/llvm\@8/bin/clang DEBUGGER=ASAN_OPTIONS=detect_leaks=1
|
||||
test: CFLAGS += -DMG_ENABLE_IPV6=1 -fsanitize=address#,undefined
|
||||
test: mongoose.c mongoose.h clean Makefile tests/unit_test.c
|
||||
$(CLANG) mongoose.c tests/unit_test.c $(CFLAGS) -coverage $(LDFLAGS) -g -o unit_test
|
||||
test: mongoose.c mongoose.h clean Makefile test/unit_test.c
|
||||
$(CLANG) mongoose.c test/unit_test.c $(CFLAGS) -coverage $(LDFLAGS) -g -o unit_test
|
||||
ASAN_OPTIONS=detect_leaks=1 $(DEBUGGER) ./unit_test
|
||||
|
||||
coverage: test
|
||||
gcov -l -n *.gcno | sed '/^$$/d' | sed 'N;s/\n/ /'
|
||||
|
||||
infer:
|
||||
infer run -- cc tests/unit_test.c -c -W -Wall -Werror -Isrc -I. -O2 -DMG_ENABLE_MBEDTLS=1 -DMG_ENABLE_LINES -I/usr/local/Cellar/mbedtls/2.23.0/include -DMG_ENABLE_IPV6=1 -g -o /dev/null
|
||||
infer run -- cc test/unit_test.c -c -W -Wall -Werror -Isrc -I. -O2 -DMG_ENABLE_MBEDTLS=1 -DMG_ENABLE_LINES -I/usr/local/Cellar/mbedtls/2.23.0/include -DMG_ENABLE_IPV6=1 -g -o /dev/null
|
||||
|
||||
#vc98: VCFLAGS += -DMG_ENABLE_IPV6=1
|
||||
vc98: clean Makefile mongoose.c mongoose.h tests/unit_test.c
|
||||
$(VC98) wine cl mongoose.c tests/unit_test.c $(VCFLAGS) ws2_32.lib /Fe$@.exe
|
||||
vc98: clean Makefile mongoose.c mongoose.h test/unit_test.c
|
||||
$(VC98) wine cl mongoose.c test/unit_test.c $(VCFLAGS) ws2_32.lib /Fe$@.exe
|
||||
$(VC98) wine $@.exe
|
||||
|
||||
vc2017: CFLAGS += -DMG_ENABLE_IPV6=1
|
||||
vc2017: clean Makefile mongoose.c mongoose.h tests/unit_test.c
|
||||
$(VC2017) wine64 cl mongoose.c tests/unit_test.c $(VCFLAGS) ws2_32.lib /Fe$@.exe
|
||||
vc2017: clean Makefile mongoose.c mongoose.h test/unit_test.c
|
||||
$(VC2017) wine64 cl mongoose.c test/unit_test.c $(VCFLAGS) ws2_32.lib /Fe$@.exe
|
||||
$(VC2017) wine64 $@.exe
|
||||
|
||||
linux: CFLAGS += -DMG_ENABLE_IPV6=1 -fsanitize=address,undefined
|
||||
linux: clean Makefile mongoose.c mongoose.h tests/unit_test.c
|
||||
$(GCC) gcc mongoose.c tests/unit_test.c $(CFLAGS) $(LDFLAGS) -o unit_test_gcc
|
||||
linux: clean Makefile mongoose.c mongoose.h test/unit_test.c
|
||||
$(GCC) gcc mongoose.c test/unit_test.c $(CFLAGS) $(LDFLAGS) -o unit_test_gcc
|
||||
$(GCC) ./unit_test_gcc
|
||||
|
||||
mongoose.c: $(SRCS) Makefile
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)/..
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_CFLAGS := -std=c99 -O2 -W -Wall -pthread -pipe $(COPT)
|
||||
LOCAL_MODULE := mongoose
|
||||
LOCAL_SRC_FILES := examples/simplest_web_server/simplest_web_server.c mongoose.c
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
Reference in new issue
Block a user