diff --git a/.travis.yml b/.travis.yml index b5e82e9..66dc764 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,14 @@ compiler: matrix: include: + - os: osx + env: PLATFORM=mac DOCKERBUILD=0 - os: linux - env: TOXENV=amd64 + env: PLATFORM=amd64 DOCKERBUILD=0 - os: linux - env: TOXENV=armv7l - - os: osx - env: TOXENV=mac + env: PLATFORM=i386 DOCKERBUILD=1 + - os: linux + env: PLATFORM=armv7l DOCKERBUILD=1 services: - docker @@ -28,18 +30,18 @@ before_install: script: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project validation/blhost.xcodeproj; fi - - if [[ "$TOXENV" == "armv7l" ]]; then - docker build -t lauszus/blhost .; + - if [[ "$DOCKERBUILD" == "1" ]]; then + docker build -f Dockerfile.$PLATFORM -t lauszus/blhost .; CONTAINER_ID=$(docker create lauszus/blhost); mkdir -p validation/blhost/gcc/Release; - docker cp $CONTAINER_ID:/validation/blhost/gcc/Release/blhost validation/blhost/gcc/Release/blhost; + docker cp $CONTAINER_ID:/lauszus-blhost/validation/blhost/gcc/Release/blhost validation/blhost/gcc/Release/blhost; else make -j2 -C validation/blhost/gcc; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - mv validation/blhost/gcc/Release/blhost blhost-$TOXENV; + mv validation/blhost/gcc/Release/blhost blhost-$PLATFORM; else - mv validation/blhost/gcc/Release/blhost blhost-linux-$TOXENV; + mv validation/blhost/gcc/Release/blhost blhost-linux-$PLATFORM; fi deploy: diff --git a/Dockerfile b/Dockerfile.armv7l similarity index 70% rename from Dockerfile rename to Dockerfile.armv7l index 59676dd..beafbc2 100644 --- a/Dockerfile +++ b/Dockerfile.armv7l @@ -1,6 +1,6 @@ FROM balenalib/armv7hf-debian:stretch -COPY . / +COPY . /lauszus-blhost RUN [ "cross-build-start" ] @@ -8,6 +8,6 @@ RUN apt-get update RUN apt-get install -y apt-utils RUN apt-get install -y build-essential libudev-dev -RUN cd validation/blhost/gcc && make clean && make -j$(nproc) +RUN make -j$(nproc) -C /lauszus-blhost/validation/blhost/gcc RUN [ "cross-build-end" ] diff --git a/Dockerfile.i386 b/Dockerfile.i386 new file mode 100644 index 0000000..2fb33f0 --- /dev/null +++ b/Dockerfile.i386 @@ -0,0 +1,8 @@ +FROM i386/centos:centos7 + +COPY . /lauszus-blhost + +RUN yum -y update +RUN yum -y install gcc gcc-c++ make libudev-devel + +RUN linux32 --32bit i386 make -j$(nproc) -C /lauszus-blhost/validation/blhost/gcc diff --git a/validation/blhost/gcc/Makefile b/validation/blhost/gcc/Makefile index e763ca1..de44f39 100644 --- a/validation/blhost/gcc/Makefile +++ b/validation/blhost/gcc/Makefile @@ -77,7 +77,7 @@ SOURCES := $(BOOT_ROOT)/validation/blhost/src/blhost.cpp \ $(BOOT_ROOT)/src/blfwk/src/utils.cpp \ $(BOOT_ROOT)/src/blfwk/src/Value.cpp \ $(BOOT_ROOT)/src/crc/src/crc16.c \ - $(BOOT_ROOT)/src/crc/src/crc32.c \ + $(BOOT_ROOT)/src/crc/src/crc32.c #$(BOOT_ROOT)/src/blfwk/src/Simulator.cpp #$(BOOT_ROOT)/src/blfwk/src/SimulatorMemory.cpp #$(BOOT_ROOT)/src/blfwk/src/SimPacketizer.cpp