Skip to content

Commit

Permalink
Build for Linux 32-bit as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauszus committed Apr 21, 2019
1 parent 856b771 commit 1625618
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
20 changes: 11 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile → Dockerfile.armv7l
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM balenalib/armv7hf-debian:stretch

COPY . /
COPY . /lauszus-blhost

RUN [ "cross-build-start" ]

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" ]
8 changes: 8 additions & 0 deletions Dockerfile.i386
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion validation/blhost/gcc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1625618

Please sign in to comment.