-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
61 lines (53 loc) · 2.37 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
language: cpp
sudo: false
compiler:
- gcc
matrix:
include:
- os: osx
env: PLATFORM=mac DOCKERBUILD=0
- os: linux
env: PLATFORM=amd64 DOCKERBUILD=0
- os: linux
env: PLATFORM=i386 DOCKERBUILD=1
- os: linux
env: PLATFORM=armv7l DOCKERBUILD=1
services:
- docker
addons:
apt:
packages:
- libudev-dev
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install hidapi; fi
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project validation/blhost.xcodeproj; fi
# Docker is used for cross compiling the binaries for 32-bit Linux and armv7l.
# Build the image, create a container from the image and get the container ID,
# then make the directory, as this is normally created automatically using Make.
# Finally copy over the compiled binary to the host.
- 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:/lauszus-blhost/validation/blhost/gcc/Release/blhost validation/blhost/gcc/Release/blhost;
else
make -j2 -C validation/blhost/gcc;
strip validation/blhost/gcc/Release/blhost;
fi
# Rename the binary, so the platform is part of the name.
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
mv validation/blhost/gcc/Release/blhost blhost-$PLATFORM;
else
mv validation/blhost/gcc/Release/blhost blhost-linux-$PLATFORM;
fi
deploy:
provider: releases
api_key:
secure: QqRXxTWE3ZxY6Jr6cFbOSMKhoDVHpE7tOGl3EcbgOfQ8oWczgN3xgoXQKKictK4hjXeX+9GuBIhHMdCLHalZ3EOyelNEG/UJ8bE7h3XWPB2Qp7jzgRriM1NvDo7uhvqoAAQr05ZQVBWyKsS980rLxncDlmRLVJbH8RmvlwB0PRVd1AOUsdkTbK9FkiWb/DpAsK21GLn6B/A+31SHqprXneivrFaQ+aNpyRvB9u3xOWEZ8xu68xwGl+xQvr5H+uvYfrgYgkxOoIXOjDFi3bEZ2gIA9ntSBM8J9veFlWnoO5Yr3sQuZRhBZBCVWykfAggvq1dx8hMAMCfNWPBM6SH3UJfi9sChurId75S5MstJec7w4STMfKQmhJvKvs985JAyAkSzdNOLYXwBvR94U+UEpLFN1RNESadnQY/+1t36Egy6b5lN+5G1cSeRNQXpvoNXr61XdTaDWaX/Fag3KNzc43QJJJ1bDwO15g9epNGVCmUQGIZ1dGakz/H6jjiXMaLSHh4VIKevhf5lUIQ/Qz6+MdT+tPX9jEX7jWbGQ87/eys+zRal6K1LmaQVhks1Hm8x4eyXdjaY7VuYjbkPUWeqJGdQ2cIAFICSZw+xCxokQzGVWL28Y6a47dB3cUsPyvTO/lqsXB4JKwyIGighLkoBEj7GpSmlGMvximFnltXy7BY=
file_glob: true
file: "blhost-*"
skip_cleanup: true
on:
tags: true