forked from jazzdotdev/jazz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
116 lines (116 loc) · 5.39 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
language: rust
rust: stable
sudo: required
env:
global:
- PROJECT: torchbear
matrix:
include:
- os: linux
rust: stable
env:
- ARCH=x86_64
- PLATFORM=linux
- CHANNEL=stable
services: docker
script: if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo "cargo test temporarily disabled"; fi
before_deploy:
- |
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker build -t build-${PROJECT}-image .
docker run -it --name build-${PROJECT} build-${PROJECT}-image
docker cp build-${PROJECT}:/home/rust/src/target/x86_64-unknown-linux-musl/release/${PROJECT} ${PROJECT}
docker rm build-${PROJECT}
docker rmi build-${PROJECT}-image
wget -O init.lua https://raw.githubusercontent.com/foundpatterns/file-witness/master/sign.lua
./${PROJECT}
zip ${PROJECT}-${TRAVIS_TAG}-${ARCH}-${PLATFORM}-${CHANNEL}.zip ${PROJECT}
fi
- os: osx
rust: stable
env:
- ARCH=x86_64
- PLATFORM=apple
- CHANNEL=stable
script: if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo "cargo test temporarily disabled"; fi
before_deploy:
- |
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
cargo build --release
mv target/release/${PROJECT} .
wget -O init.lua https://raw.githubusercontent.com/foundpatterns/file-witness/master/sign.lua
./${PROJECT}
zip ${PROJECT}-${TRAVIS_TAG}-${ARCH}-${PLATFORM}-${CHANNEL}.zip ${PROJECT}
fi
- os: linux
env:
- ARCH=arm64
- PLATFORM=android
- CHANNEL=stable
script: if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo "cargo test temporarily disabled"; fi
before_deploy:
- |
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
export PATH="$HOME/.cargo/bin:$PATH"
rustup target add aarch64-linux-android
wget -q https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip
unzip -qq android-ndk-r18b-linux-x86_64.zip
export NDK_HOME="$PWD/android-ndk-r18b"
mkdir NDK
${NDK_HOME}/build/tools/make-standalone-toolchain.sh --arch=arm64 --install-dir=NDK/aarch64 --platform=android-22
export PATH="$PATH:$PWD/NDK/aarch64/bin"
cargo build --target="aarch64-linux-android" --release
wget https://github.com/foundpatterns/torchbear/releases/download/0.10.6/torchbear-0.10.6-x86_64-linux-stable.zip
sudo unzip -q -o torchbear-0.10.6-x86_64-linux-stable.zip -d /usr/local/bin
mv target/aarch64-linux-android/release/${PROJECT} .
wget -O init.lua https://raw.githubusercontent.com/foundpatterns/file-witness/master/sign.lua
/usr/local/bin/torchbear
zip ${PROJECT}-${TRAVIS_TAG}-${ARCH}-${PLATFORM}-${CHANNEL}.zip ${PROJECT}
fi
- os: linux
env:
- ARCH=arm32
- PLATFORM=android
- CHANNEL=stable
script: if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo "cargo test temporarily disabled"; fi
before_deploy:
- |
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
export PATH="$HOME/.cargo/bin:$PATH"
rustup target add arm-linux-androideabi
wget -q https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip
unzip -qq android-ndk-r18b-linux-x86_64.zip
export NDK_HOME="$PWD/android-ndk-r18b"
mkdir NDK
${NDK_HOME}/build/tools/make-standalone-toolchain.sh --arch=arm --install-dir=NDK/arm --platform=android-22
export PATH="$PATH:$PWD/NDK/arm/bin"
cargo build --target="arm-linux-androideabi" --release
wget https://github.com/foundpatterns/torchbear/releases/download/0.10.6/torchbear-0.10.6-x86_64-linux-stable.zip
sudo unzip -q -o torchbear-0.10.6-x86_64-linux-stable.zip -d /usr/local/bin
mv target/arm-linux-androideabi/release/${PROJECT} .
wget -O init.lua https://raw.githubusercontent.com/foundpatterns/file-witness/master/sign.lua
/usr/local/bin/torchbear
zip ${PROJECT}-${TRAVIS_TAG}-${ARCH}-${PLATFORM}-${CHANNEL}.zip ${PROJECT}
fi
before_install:
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then openssl aes-256-cbc -K $encrypted_3f0c7a8b3f66_key -iv $encrypted_3f0c7a8b3f66_iv -in private_key.enc -out private_key -d; fi
deploy:
provider: releases
api_key:
secure: CgTP0SwOefwSUsePWKYuZCEV2QNVH3GJcMfComUgBCnPbdrfA8vnC7Ao3Sb31NHZ43k89+DhxCsVtDaWBhmMWqnost5aJ7LGfaEvObL9Cdg06OJv8o9UAcowSqU4k3eHEr0ZRJzEWEiAMTAtclzosmA1PfzyY7MyIv6ZAcoyoUg1uwzr0KJrc/dGN+tkWv/6M1IBgh5kji0yfg9yxjxClJ28GikAJoRmTv+Yx1tQQ+Q/qlkbVT+fVAc0vWwvk/YIauF1s2LBPhMKqkUmmpHyZVk9g3er421ddYjesLt25wMocmtRlWTrEn4G1RVLbQG6+mE+adyw7Oi081CvmJjF4eojsyOYbWI89qJBM0ZAAqzrXNwizZCdL7ShX/I5jHJTA/AMa2GyyLTFbR4CQT/+Otn0nfPLFfiY1g654CFcL73mRnDtixpGMx1aMJ4ScXbMR8rCDDO8hix7pOm71LtCqUAchOYCyNsn4MCkz2+LaH9WZ/hDJDmUgMVVBoqhGLb2vnaf3fd+vbeKFwpLDluFLRrunM+qdNPDPDHzb3qoXcospNnZEt18O3Pu5vMssxIaKEiesm2zTsd/+R4pl4Acotgiy/jLJucFRVs5Id+RpD/eETk/ZnR3Jekpkl6T95w82an1mGS8o8fl/F+CkNBOAn5J8a6gz0nXhjp6APLfErg=
file_glob: true
file:
- "${PROJECT}-${TRAVIS_TAG}-${ARCH}-${PLATFORM}-${CHANNEL}.zip"
- "${PROJECT}-${TRAVIS_TAG}-${ARCH}-${PLATFORM}-${CHANNEL}.sig"
skip_cleanup: true
on:
repo: foundpatterns/torchbear
tags: true
branches:
only:
- master
- /.*/
- /^\d+\.\d+\.\d+.*$/
notifications:
email:
on_success: never