Browse Source

Merge pull request #139 from petercolberg/travis

Test Linux amd64/i686/arm64
Elliot Saba 8 years ago
parent
commit
705cbaea30
5 changed files with 36 additions and 39 deletions
  1. 0 26
      .travis.sh
  2. 32 9
      .travis.yml
  3. 2 2
      Make.inc
  4. 1 1
      amd64/bsd_asm.h
  5. 1 1
      ld80/s_exp2l.c

+ 0 - 26
.travis.sh

@@ -1,26 +0,0 @@
-#!/bin/sh
-set -eux
-
-case "$TARGET" in
-host)
-	uname -a
-	export LOADER=
-	make ;;
-arm32)
-	sudo bash -c 'echo >> /etc/apt/sources.list "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe"'
-	sudo apt-get update
-	sudo apt-get -y install gcc-4.7-arm-linux-gnueabihf qemu binfmt-support
-	make CC="arm-linux-gnueabihf-gcc-4.7"
-	export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib
-	#export LOADER=/usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3
-	export LOADER="echo TESTS DISABLED ON ARM"
-	;;
-*)
-	echo 'Unknown TARGET!'
-	exit 1
-	;;
-esac
-
-$LOADER make check
-
-make clean && git status --ignored --porcelain && test -z "$(git status --ignored --porcelain)"

+ 32 - 9
.travis.yml

@@ -1,13 +1,36 @@
+# We require a full (virtual) machine to load the kernel module for
+# binfmt support, which is needed to test other architectures besides
+# x86 using qemu user emulation. (This will not work in a container.)
+sudo: required
+dist: trusty
 language: c
-script: ./.travis.sh
-os:
-    - linux
-env:
-    - TARGET=host
-    - TARGET=arm32
+
+script:
+    - make $FLAGS
+    - make check $FLAGS $TEST_FLAGS
+    - make clean && git status --ignored --porcelain && test -z "$(git status --ignored --porcelain)"
+
 matrix:
-    exclude:
-        - os: osx
-          env: TARGET=arm32
+    include:
+        - os: linux
+          env: FLAGS="CC=gcc"
+
+        - os: linux
+          env: FLAGS="CC=gcc ARCH=i686"  # implies -m32 -march=i686
+          addons:
+              apt:
+                  packages:
+                      - gcc-multilib
+
+        - os: linux
+          env: FLAGS="CC=aarch64-linux-gnu-gcc" TEST_FLAGS="LDFLAGS=-static"
+          addons:
+              apt:
+                  packages:
+                      - gcc-aarch64-linux-gnu
+                      - libc6-dev-arm64-cross
+                      - qemu-user-static
+                      - binfmt-support
+
 notifications:
     email: false

+ 2 - 2
Make.inc

@@ -111,7 +111,7 @@ endif
 ifeq ($(OS), WINNT)
   SHLIB_EXT = dll
   SONAME_FLAG = -soname
-  override CFLAGS_add += -nodefaultlibs
+  CFLAGS_add += -nodefaultlibs
   shlibdir = $(bindir)
 else
   ifeq ($(OS), Darwin)
@@ -121,7 +121,7 @@ else
     SHLIB_EXT = so
     SONAME_FLAG = -soname
   endif
-  override CFLAGS_add += -fPIC
+  CFLAGS_add += -fPIC
   shlibdir = $(libdir)
 endif
 

+ 1 - 1
amd64/bsd_asm.h

@@ -40,7 +40,7 @@
 #include "../i387/osx_asm.h"
 #define CNAME(x) EXT(x)
 #else
-#include "cdefs-compat.h"
+#include "bsd_cdefs.h"
 
 #ifdef PIC
 #define	PIC_PLT(x)	x@PLT

+ 1 - 1
ld80/s_exp2l.c

@@ -30,7 +30,7 @@
 #include <float.h>
 #include <stdint.h>
 
-#include "cdefs-compat.h"
+#include "bsd_cdefs.h"
 #include "amd64/bsd_ieeefp.h"
 
 #include <openlibm_math.h>