-
Notifications
You must be signed in to change notification settings - Fork 92
/
.travis.yml
92 lines (84 loc) · 2.86 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
language: c
sudo: required
services:
- docker
env:
global:
- BUILD_CMD=./build_all_configs.sh
- BUILD_DIR=/workdir
- DOCKER_IMAGE=multiarch/crossbuild
matrix:
include:
- env:
- TARGET_OS=linux64
- CROSS_TRIPLE=x86_64-linux-gnu
- env:
- TARGET_OS=linux32
# multiarch/crossbuild doesn't come with 32-bit compilers, use a different image
- DOCKER_IMAGE=dockcross/linux-x86
- CROSS_TRIPLE=i686-linux-gnu
- BUILD_DIR=/work
- env:
- TARGET_OS=linux-armhf
- CROSS_TRIPLE=arm-linux-gnueabihf
- EXTRA_ARGS='-e SKIP_TESTS=1'
- env:
- TARGET_OS=linux-arm64
- CROSS_TRIPLE=aarch64-linux-gnu
- EXTRA_ARGS='-e SKIP_TESTS=1'
- env:
- TARGET_OS=win32
- CROSS_TRIPLE=i686-w64-mingw32
# multiarch/crossbuild doesn't come with 'zip',
# so we build a tgz archive in the container, and re-package it later in the script.
- EXTRA_ARGS='-e ARCHIVE=tar -e SKIP_TESTS=1'
- env:
- TARGET_OS=osx
- CROSS_TRIPLE=x86_64-apple-darwin
- EXTRA_ARGS='-e SKIP_TESTS=1 -e CXX=c++'
script:
- export VER=$(git describe)
- echo ${VER}
- >-
docker run --rm
-v ${PWD}:${BUILD_DIR}
-e TARGET_OS=${TARGET_OS}
-e CROSS_TRIPLE=${CROSS_TRIPLE}
${EXTRA_ARGS}
${DOCKER_IMAGE}
${BUILD_CMD}
# Diagnostics
- ls -l
# for windows, prepare zip archives
- |
if [ $TARGET_OS = "win32" ]; then
for dirname in $(ls -d mkspiffs-*/); do
name=${dirname%/}
zip -r $name.zip $dirname
rm -f $name.tar.gz
done
fi
# Prepare files with sizes and sha256 hashes
- |
for name in $(ls -1 mkspiffs-*-${TARGET_OS}.*); do
DIST_SIZE=$(wc -c <${name} 2>/dev/null | tr -d ' ')
DIST_SHA256=$(shasum -a 256 ${name} | cut -d ' ' -f1)
echo ${name} ${DIST_SIZE} ${DIST_SHA256}
echo ${name} ${DIST_SIZE} ${DIST_SHA256} >${name}.sha256.txt
done
notifications:
email:
recipients:
on_success: change
on_failure: always
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: "AdgaAHsU3xkyKqcZu6Yp3njmWTXFm/Ggsq9n6cC9byHTDdcQ6UqdX1gPzud53YkSDbUjst5vok0i9xywH2pFWVt6G+FAD5uI/h1IiacQQ9rjnDef++nz+KkZtsPUhAD8LOdKPvJ7TmNNnkN35VFqyQETr/18bdzGC0tEZQK2BFQQrdz6cOGeez1ADYal0LAVHHcfolnwZb9jCT51nPEpSMlhxwSNNFncG2Y8MLDT2Q1y0xR3iI6aSSkMxqWCYYIdEC12rffwyRbC2P+JXp+AXNayLuKjCFnWB/QIyvrvoXtwbAEfW1pZzrWZAI5fI6zQaKKjixhf3Kr1f7y/xSPSdsPemdakRgANRTZW0R6wiXxUsTEjVGV6fWqUKT9pm335k8vWq2i+6exSrIVmYyxz4J3u6+Mgdbij5hI1NLVLq+It0KUVt99IOWaTOy01y6a0m1AprYYPgyw7fwlgChMPsLcaRrq1gtjtJr7wQKLaIlfYdEB4b0DtE/fx+b78mMQqXS/WvwSUGkJ5C2poLX2zdUxFe3phjeL3P0Daa0gLDQ2tCf/VmvPy20//b7MaO10URoeeV16fs+2BFzLjh38kzLRrPaRcBcwQFlzI1P+4mWPRDMuKvBn6i0sodFEzlUQMFSa8xyVtE5wIDLqepeG/9roW8woKIAmwG1k1YtM3XeE="
file_glob: true
file: mkspiffs-*-$TARGET_OS.*
on:
repo: igrr/mkspiffs
tags: true