-
Notifications
You must be signed in to change notification settings - Fork 123
/
.travis.yml
85 lines (76 loc) · 2.31 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
language: c
sudo: required
services:
- docker
matrix:
include:
- env:
- TARGET_OS=linux64
- DOCKER_IMAGE=multiarch/crossbuild
- CROSS_TRIPLE=x86_64-linux-gnu
- BUILD_DIR=/workdir
- 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
- DOCKER_IMAGE=multiarch/crossbuild
- CROSS_TRIPLE=arm-linux-gnueabihf
- BUILD_DIR=/workdir
- env:
- TARGET_OS=win32
- DOCKER_IMAGE=multiarch/crossbuild
- CROSS_TRIPLE=i686-w64-mingw32
- BUILD_DIR=/workdir
# 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'
- env:
- TARGET_OS=osx
- DOCKER_IMAGE=multiarch/crossbuild
- CROSS_TRIPLE=x86_64-apple-darwin
- BUILD_DIR=/workdir
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}
make clean dist
# for windows, prepare zip archive
- |
if [ $TARGET_OS = "win32" ]; then
rm -f esptool-${VER}-win32.tar.gz
zip -r esptool-${VER}-win32.zip esptool-${VER}-win32/
fi
# Diagnostics
- file esptool-${VER}-${TARGET_OS}/*
- ls -l esptool-${VER}-${TARGET_OS}/*
# Prepare a file with size and sha256
- export DIST_NAME=$(ls -1 esptool-${VER}-${TARGET_OS}.*)
- DIST_SIZE=$(wc -c <${DIST_NAME} 2>/dev/null | tr -d ' ')
- DIST_SHA256=$(shasum -a 256 ${DIST_NAME} | cut -d ' ' -f1)
- echo ${DIST_NAME} ${DIST_SIZE} ${DIST_SHA256} >esptool-${VER}-${TARGET_OS}.sha256.txt
notifications:
email:
recipients:
on_success: change
on_failure: change
deploy:
provider: releases
skip_cleanup: true
file_glob: true
api_key:
secure: "SsAnTtkjpHq2OQCnfZskdUY2R3lIRgl4iuVbKtMsGBS7YYZvpv8l+TdCcPXGaOXDRymJnWiNZs2/wJU1haVhwnDkp46Suo3m9OKQ40K4YQ6rpXBM5/f2ahdSKhNxR7lbVaAZnJWXO3PgGTM73F+d619oj5GGF/1SbCQ1thSRMQs="
file: esptool-$TRAVIS_TAG-$TARGET_OS.*
on:
repo: igrr/esptool-ck
tags: true