forked from red/red
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
160 lines (138 loc) · 5.23 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
# Only use continuous integration on the master branch
branches:
only:
- master
notifications:
email:
# Send notifications on every build failure to comitter and author.
# Never send notifications for sucessful builds.
on_success: never
webhooks:
urls:
# Gitter
- secure: "FWx+7+aWMapJfqykkpcBSiaNylWkSXRiXt28pXlbg5LHHgMz5Fh44BwdSB3RnD/lFqLWw+0w0XfvTjqEcqkn0x3nb9UKN/LJfh+QJGEv6wfjg2X+zlLuLVmFgRurWeHk3dDS1Y8SN4jdcondXmRP+KHKrwx5v/18LDYSHMWjO0Y="
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false
# Disables Travis CI's Ruby-specific defaults.
language: c
env:
global:
- STATUS=1
# STATUS_URL
- secure: "OGj4ljDpWyvhS8pBDJxFt5Xm7J+dX6tOJpMvQRBb2Q+2QPAniHwNCbQbJj02vTFR5eGAzmgFuv8ovKdPtOwSgKVeS0cxr3PCGBdV8GGEq1LjAP96YQshYIvW5najvwuhcE0jM4MujIiYxa+X+ftjcBstsN1h3ItskrvyZv5/4BM="
matrix:
# allow_failures: # Enable to disregard ARM build failures
# - env: OS=arm # Enable to disregard ARM build failures
include:
### Linux ############################################################
- os: linux
dist: trusty
sudo: required
env: OS=linux
script: # Run i386 tests
- >
docker run -v ${PWD}:/red -w /red
i386/debian:red rebol -qws tests/run-all.r --batch
- mv quick-test/quick-test.log quick-test/quick-test-red.log
- >
docker run -v ${PWD}:/red -w /red
i386/debian:red rebol -qws system/tests/run-all.r --batch
### ARMel ############################################################
- os: linux
dist: trusty
sudo: required
env: OS=armel
script: # Run ARMv5el tests
- >
docker run -v ${PWD}:/red
-w /red/quick-test/runnable/arm-tests/red/
--entrypoint /red/quick-test/runnable/arm-tests/red/run-all.sh
balenalib/armv5e-debian:latest
- >
docker run -v ${PWD}:/red
-e LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/red/quick-test/runnable/arm-tests/system/'
-w /red/quick-test/runnable/arm-tests/system/
--entrypoint /red/quick-test/runnable/arm-tests/system/run-all.sh
balenalib/armv5e-debian:latest
### ARMhf ############################################################
- os: linux
dist: trusty
sudo: required
env: OS=armhf
script: # Run ARMv7hf tests
- >
docker run -v ${PWD}:/red
-w /red/quick-test/runnable/arm-tests/red/
--entrypoint /red/quick-test/runnable/arm-tests/red/run-all.sh
balenalib/raspberry-pi2-debian:latest
- >
docker run -v ${PWD}:/red
-e LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/red/quick-test/runnable/arm-tests/system/'
-w /red/quick-test/runnable/arm-tests/system/
--entrypoint /red/quick-test/runnable/arm-tests/system/run-all.sh
balenalib/raspberry-pi2-debian:latest
### macOS ############################################################
- os: osx
env: OS=macos
script: # Run macOS tests
- rebol -qws tests/run-all.r --batch
- mv quick-test/quick-test.log quick-test/quick-test-red.log
- rebol -qws system/tests/run-all.r --batch
###### all ##############################################################
install:
# Linux: hook up qemu, build 32bit image including curl and rebol
- >
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
docker run --rm --privileged
multiarch/qemu-user-static:register &&
printf
'FROM i386/debian:latest\n
RUN apt-get update &&
apt-get install -y curl libcurl4 &&
curl -o /bin/rebol https://static.red-lang.org/tmp/rebol &&
chmod +x /bin/rebol\n
' > Dockerfile &&
docker build -t i386/debian:red . ;
fi
# ARMel: build tests on i386
- >
if [[ ${OS} == "armel" ]]; then
docker run -v ${PWD}:/red -w /red
i386/debian:red rebol -qws tests/build-arm-tests.r '-t Linux-ARM' &&
docker run -v ${PWD}:/red -w /red
i386/debian:red rebol -qws system/tests/build-arm-tests.r '-t Linux-ARM' &&
docker pull balenalib/armv5e-debian:latest ;
fi
# ARMhf: build tests on i386
- >
if [[ ${OS} == "armhf" ]]; then
docker run -v ${PWD}:/red -w /red
i386/debian:red rebol -qws tests/build-arm-tests.r '-t RPi' &&
docker run -v ${PWD}:/red -w /red
i386/debian:red rebol -qws system/tests/build-arm-tests.r '-t RPi' &&
docker pull balenalib/raspberry-pi2-debian:latest ;
fi
# macOS: install rebol
- >
if [[ ${OS} == "macos" ]]; then
sudo curl -o /usr/local/bin/rebol
https://static.red-lang.org/tmp/rebol-osx &&
sudo chmod +x /usr/local/bin/rebol ;
fi
# If tests fail, change status code and save test logs into Travis logs
after_failure:
- >
STATUS=0 ;
if [[ ${OS} == "armel" ]] || [[ ${OS} == "armhf" ]]; then
cat quick-test/runnable/arm-tests/red/quick-test.log ;
printf '\n\n\n\n' ;
cat quick-test/runnable/arm-tests/system/quick-test.log ;
else
cat quick-test/quick-test-red.log ;
printf '\n\n\n\n' ;
cat quick-test/quick-test.log ;
fi
# Notify build status
after_script:
- curl ${STATUS_URL}/${OS}/${STATUS}