ci/travis: add .travis.yml file. build matrix: linux-gcc, linux-clang, osx-clang.
authorRejean Loyer <redj@ecere.com>
Sun, 11 Sep 2016 17:13:03 +0000 (13:13 -0400)
committerJerome St-Louis <jerome@ecere.com>
Mon, 12 Sep 2016 20:14:09 +0000 (16:14 -0400)
.travis.yml [new file with mode: 0644]
Makefile
default.cf

diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..4709166
--- /dev/null
@@ -0,0 +1,41 @@
+language: c
+cache: ccache
+
+git:
+  depth: 3
+
+compiler:
+  - clang
+  - gcc
+
+os:
+  - linux
+  - osx
+
+matrix:
+  exclude:
+    - os: osx
+      compiler: gcc
+
+addons:
+  apt:
+    packages:
+      - zlib1g-dev
+      - libpng12-dev
+      - libjpeg62-dev
+      - libgif-dev
+      - libncurses5-dev
+      - libfreetype6-dev
+      - libfontconfig1-dev
+      - libx11-dev
+      - libxrender-dev
+      - libgl1-mesa-dev
+      - libxext-dev
+      - upx-ucl
+      - libsqlite3-dev
+      - libssl-dev
+      - libffi-dev
+      - libasound2-dev
+
+script:
+  - make -j1 V=1 ENABLE_SSL=y
index 3ac08c4..db30e6f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -183,6 +183,10 @@ ifdef CROSS_TARGET
 endif
 
 bootstrap: outputdirs
+ifdef CI
+       @$(call echo,$(CC))
+       @$(CC) --version
+endif
        +cd compiler && $(_MAKE) $(XBOOT) bootstrap
 
 deps:
index e1a1756..8c9aa81 100644 (file)
@@ -26,8 +26,12 @@ HOST_LP := $(if $(WINDOWS_HOST),$(if $(STATIC_LIBRARY_TARGET),lib,),lib)
 .SUFFIXES: .c .ec .sym .imp .bowl $(O) $(A)
 
 # TOOLCHAIN
+ifdef TRAVIS
+export CPP     = $(CC)
+else
 export CC      = $(CCACHE_COMPILE)$(DISTCC_COMPILE)$(GCC_PREFIX)gcc$(_SYSROOT)$(if $(GCC_CC_FLAGS),$(space)$(GCC_CC_FLAGS),)
 export CPP     = $(CCACHE_COMPILE)$(DISTCC_COMPILE)$(GCC_PREFIX)gcc$(_SYSROOT)
+endif
 export AS      = $(GCC_PREFIX)as
 export LD      = $(GCC_PREFIX)ld
 export AR      = $(GCC_PREFIX)ar