forked from transmission-remote-gui/transgui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
181 lines (160 loc) · 6.21 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
---
language: minimal
git:
depth: 10
env:
global:
- PROG_VER=$(head -n 1 VERSION.txt)
deploy_build: &deploy
- provider: releases
api_key:
secure: "0671vAjL2m6gqjDSdkdjiyfDwuR8uLYrE6OCaeaX9iLvqSxmKAffkLlCZXU9fevmTglEMSmarcmHtwy1AYcqBClChl0dup2YvmM+BzsTfDSjZT43asI1Ok7MJALqqCa/xPO15HH1XfvstHeuOCM16nB61VQKT1+an0T9oz96PNIr5oS/Q8owmaWHvbB18IBoeTNvUZl0OvaqjNGZJ9JnBvBTROPDvsfud1DxlPmlTaCxh+yx8yAZYX2nLOkJFlWhG4b7mtcrlitVENcdjJ90qY4c01uzH3cYNdVn4PH/z0s+cAQT36f2zSX8UpsfBxbsBpB6ANS9Ig4gPp8eOtuhfpd2lOH6fL/DwAaxh9FGbTH5n9eR4cO9bEkmW5BoUeDpcIboIVZKrtZI97/MiRtwMfQzleQuwWuDpanaMqiY+LdS6vllG4kQjGck9fWj5wbaHR/MDTlAODc5/WUYA+69MDjPK/JI34/rPIag+8ZF2pF2VLyVC1kbvpngsYkcvQTRRSWrb6Cj0i7ggrBrCOmU2RrfkiKUGarukaCel/9U2dxnmkxPpfKBVXD0v6ylcUEofMJ6ml4lcGH8XX1jTNlUQebu7uhbfyhsJA9IEyMKXX3RHaq7Tf1XyCtZYIo2sAkFG103u/zSbkVZOAa8qoWqwFO8gx5MAa7ZRJVbuBNswBk="
file: $artifact
skip_cleanup: true
on:
tags: true
linux_after_success: &linux_after_success
- md5sum $artifact
- shasum -a 1 $artifact
- shasum -a 256 $artifact
- if [ -n "$TRAVIS_TAG" ] ; then
curl -F "file=@$artifact" -F apikey=${virustotal} https://www.virustotal.com/vtapi/v2/file/scan ;
curl -F "file=@./transgui" -F apikey=${virustotal} https://www.virustotal.com/vtapi/v2/file/scan ;
else
setup/upload_asset.sh $artifact ;
fi
stages:
- static test
- build
env_template:
- &linux_env
os: linux
dist: bionic
services:
- docker
- &linux_build_env
<<: *linux_env
stage: build
- &nodejs_static_test_env
<<: *linux_env
stage: static test
language: node_js
node_js: 10
install:
- npm i -g $task
before_script:
- type $task
matrix:
include:
- <<: *linux_env
stage: static test
env:
- task=shfmt
script:
- docker run -it --rm -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:2.6.4 shfmt -sr -i 2 -l -w -ci .
- git diff --color
- git diff --stat=220 --color --exit-code
- <<: *linux_env
stage: static test
env:
- task=shellcheck
script:
- find . -type f -name "*.sh" | xargs -n 1 shellcheck
- <<: *nodejs_static_test_env
env:
- task=markdown-link-check
script:
- find . -type f -name "*.md" | xargs -n 1 markdown-link-check
- <<: *nodejs_static_test_env
env:
- task=eclint
script:
- eclint check lang/ setup/ Makefile* *.txt
- <<: *nodejs_static_test_env
env:
- task=doctoc
script:
- doctoc --title "## Table of Contents" --github README.md > /dev/null
- if ! git diff --quiet README.md; then
>&2 echo 'README.md "Table of Contents" dated! Please update it';
>&2 git diff -w README.md
exit 1;
fi
- <<: *linux_build_env
env:
- task=zip-tarball-test
script:
- docker run -e DEBIAN_FRONTEND=noninteractive -it --rm -v "${PWD}:/transgui" debian:stretch-backports bash -c "cd /transgui/ && ./setup/unix/debian-ubuntu-install_deps.sh && lazbuild -B transgui.lpi --lazarusdir=/usr/lib/lazarus/default/ && make -j$(nproc) zipdist && ls -al ./Release/transgui-$PROG_VER-x86_64-linux.zip"
- <<: *linux_build_env
env:
- arch=amd64
- artifact=./Release/transgui-$PROG_VER-x86_64-Linux.txz
script:
- docker run -e DEBIAN_FRONTEND=noninteractive -it --rm -v "${PWD}:/transgui" debian:stretch-backports bash -c "cd /transgui/setup/unix/ && ./debian-ubuntu-install_deps.sh && apt upgrade -y && ./build.sh"
after_success: *linux_after_success
deploy: *deploy
- <<: *linux_build_env
env:
- arch=i386
- artifact=./Release/transgui-$PROG_VER-i686-Linux.txz
script:
- docker run -e DEBIAN_FRONTEND=noninteractive --privileged -it --rm -v "${PWD}:/transgui" i386/debian:stretch-backports linux32 --32bit bash -c "cd /transgui/setup/unix/ && ./debian-ubuntu-install_deps.sh && apt upgrade -y && ./build.sh"
after_success: *linux_after_success
deploy: *deploy
- <<: *linux_build_env
env:
- arch=rpi-armv6l
- artifact=./Release/transgui-$PROG_VER-armv6l-Linux.txz
addons:
apt:
packages:
- qemu-user-static
script:
- docker run -e DEBIAN_FRONTEND=noninteractive -it --rm -v "${PWD}:/transgui" -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static balenalib/rpi-raspbian:stretch bash -c "sed -i 's/archive.raspbian.org/mirrors.ocf.berkeley.edu\/raspbian/g' /etc/apt/sources.list && cd /transgui/setup/unix/ && ./debian-ubuntu-install_deps.sh && apt upgrade -y && ./build.sh"
after_success: *linux_after_success
deploy: *deploy
- <<: *linux_build_env
env:
- arch=armv7l
- artifact=./Release/transgui-$PROG_VER-armv7l-Linux.txz
addons:
apt:
packages:
- qemu-user-static
script:
- docker run -e DEBIAN_FRONTEND=noninteractive -it --rm -v "${PWD}:/transgui" -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static balenalib/armv7hf-debian:stretch bash -c "cd /transgui/setup/unix/ && ./debian-ubuntu-install_deps.sh && apt upgrade -y && ./build.sh"
after_success: *linux_after_success
deploy: *deploy
- os: osx
osx_image: xcode11.1
stage: build
env:
- arch=osx
- sourceforge_mirror=pilotfiber
- artifact=./Release/transgui-$PROG_VER.dmg
install:
- sh -c 'cd setup/macosx && ./install_deps.sh'
script:
- echo -en 'travis_fold:start:build'
- sh -c 'cd setup/macosx && ./create_app_new.sh'
- echo -en 'travis_fold:end:build'
after_success:
- md5 $artifact
- shasum -a 1 $artifact
- shasum -a 256 $artifact
- if [ -n "$TRAVIS_TAG" ] ; then
curl -F "file=@$artifact" -F apikey=${virustotal} https://www.virustotal.com/vtapi/v2/file/scan ;
curl -F "file=@./transgui" -F apikey=${virustotal} https://www.virustotal.com/vtapi/v2/file/scan ;
else
setup/upload_asset.sh $artifact ;
fi
deploy: *deploy
notifications:
email:
on_failure: true
webhooks:
urls:
- https://www.travisbuddy.com/
on_success: never
on_cancel: never
on_start: never