Merge pull request #231 from ararslan/aa/ci

Enable Travis for continuous integration testing
This commit is contained in:
Justin Ethier 2017-11-11 20:37:21 -05:00 committed by GitHub
commit 3c6d578429
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 5 deletions

45
.travis.yml Normal file
View file

@ -0,0 +1,45 @@
language: c
sudo: required
matrix:
include:
- os: linux
compiler: gcc
addons:
apt:
packages:
- libtommath-dev
- os: linux
compiler: clang
addons:
apt:
packages:
- libtommath-dev
- clang-3.9
- os: osx
image: xcode8
notifications:
email: false
before_install:
- if [ "$(uname)" = "Darwin" ]; then
brew update;
brew install -v libtommath concurrencykit;
fi
- |
git clone https://github.com/concurrencykit/ck.git ${HOME}/ck
cd ${HOME}/ck
git checkout v0.6.0
./configure PREFIX=/usr
make all
sudo make install
if [ "$(uname)" = "Linux" ]; then
sudo ldconfig
fi
- |
git clone https://github.com/justinethier/cyclone-bootstrap.git ${HOME}/cyclone-bootstrap
cd ${HOME}/cyclone-bootstrap
make
sudo make install
script:
- make
- sudo make install
- make test

View file

@ -15,13 +15,20 @@ endif
# Compiler options # Compiler options
CFLAGS ?= -O2 -fPIC -Wall -Iinclude CFLAGS ?= -O2 -fPIC -Wall -Iinclude
COMP_CFLAGS ?= -O2 -fPIC -Wall -I$(PREFIX)/include -L$(PREFIX)/lib -Wl,--export-dynamic COMP_CFLAGS ?= -O2 -fPIC -Wall -I$(PREFIX)/include -L$(PREFIX)/lib
# Use these lines instead for debugging or profiling # Use these lines instead for debugging or profiling
#CFLAGS = -g -Wall #CFLAGS = -g -Wall
#CFLAGS = -g -pg -Wall #CFLAGS = -g -pg -Wall
# Linker options # Linker options
LDFLAGS ?= -Wl,--export-dynamic -L. LDFLAGS ?= -L.
ifeq ($(OS),Darwin)
LDFLAGS += -Wl,-export-dynamic -Wl,-undefined -Wl,dynamic_lookup
COMP_CFLAGS += -Wl,-export-dynamic
else
LDFLAGS += -Wl,--export-dynamic
COMP_CFLAGS += -Wl,--export-dynamic
endif
# /usr/local is not in the search path by default on FreeBSD, so if libtommath and/or # /usr/local is not in the search path by default on FreeBSD, so if libtommath and/or
# concurrencykit was installed via Ports, it won't be picked up without explicitly looking # concurrencykit was installed via Ports, it won't be picked up without explicitly looking
@ -35,7 +42,7 @@ endif
CC_PROG ?= "$(CC) ~src-file~ $(COMP_CFLAGS) -c -o ~exec-file~.o" CC_PROG ?= "$(CC) ~src-file~ $(COMP_CFLAGS) -c -o ~exec-file~.o"
CC_EXEC ?= "$(CC) ~exec-file~.o ~obj-files~ $(LIBS) $(COMP_CFLAGS) -o ~exec-file~" CC_EXEC ?= "$(CC) ~exec-file~.o ~obj-files~ $(LIBS) $(COMP_CFLAGS) -o ~exec-file~"
CC_LIB ?= "$(CC) ~src-file~ $(COMP_CFLAGS) -c -o ~exec-file~.o" CC_LIB ?= "$(CC) ~src-file~ $(COMP_CFLAGS) -c -o ~exec-file~.o"
CC_SO ?= "$(CC) -shared -rdynamic -o ~exec-file~.so ~exec-file~.o" CC_SO ?= "$(CC) -shared $(LDFLAGS) -o ~exec-file~.so ~exec-file~.o"
AR ?= ar AR ?= ar
#CD ?= cd #CD ?= cd
@ -57,8 +64,8 @@ DESTDIR ?=
# Automatically detect platform-specific flags, instead of using autoconf # Automatically detect platform-specific flags, instead of using autoconf
#CYC_PLATFORM_HAS_MEMSTREAM ?= 1 #CYC_PLATFORM_HAS_MEMSTREAM ?= 1
CYC_PLATFORM_HAS_MEMSTREAM := $(shell echo "main(){char *buf; int len; open_memstream(&buf, &len);}" | gcc -xc - >/dev/null 2>/dev/null && echo 1 || echo 0) CYC_PLATFORM_HAS_MEMSTREAM := $(shell echo "main(){char *buf; int len; open_memstream(&buf, &len);}" | $(CC) -xc - >/dev/null 2>/dev/null && echo 1 || echo 0)
CYC_PLATFORM_HAS_FMEMOPEN := $(shell echo "main(){char *buf; fmemopen(&buf, 0, \"r\");}" | gcc -xc - >/dev/null 2>/dev/null && echo 1 || echo 0) CYC_PLATFORM_HAS_FMEMOPEN := $(shell echo "main(){char *buf; fmemopen(&buf, 0, \"r\");}" | $(CC) -xc - >/dev/null 2>/dev/null && echo 1 || echo 0)
# code from chibi's makefile to detect platform # code from chibi's makefile to detect platform
ifndef PLATFORM ifndef PLATFORM