forked from adoyle-h/lobash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (62 loc) · 1.52 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
language: bash
git:
depth: 1
submodules: false
if: |
tag =~ ^v OR \
branch = "test"
services:
- docker
os:
- linux
- osx
env:
- BASHVER=4.0
- BASHVER=4.1
- BASHVER=4.2
- BASHVER=4.3
- BASHVER=4.4
- BASHVER=5.0
- BASHVER=5.1
- BASHVER=5.2
cache:
directories:
- $TRAVIS_BUILD_DIR/build-bash
install:
- |
# Default Travis CI use Bash 4.3 in Linux, and 3.2 in MacOS.
# Out script use shopt -s inherit_errexit but only Bash 4.4+ supported.
if [[ -x $TRAVIS_BUILD_DIR/build-bash/${BASHVER}/bin/bash ]]; then
echo "Use cache: build-bash"
else
echo "No cache, to install and build Bash ${BASHVER}"
./tools/install-bash ${BASHVER} 2>&1 >> build.log || cat build.log
fi
- |
if [[ "$TRAVIS_OS_NAME" == 'osx' ]]; then
git submodule update --init --depth 1
fi
- |
if [[ "$TRAVIS_OS_NAME" == 'linux' ]]; then
docker pull lobash/test-bash:${BASHVER}
fi
script:
- export PATH="$TRAVIS_BUILD_DIR/build-bash/$BASHVER/bin:$PATH"
- printf "%s\n%s\n" "The Bash used for test:" "$(bash --version)"
- |
if [[ "$TRAVIS_OS_NAME" == 'linux' ]]; then
echo "Start to test in Bash docker"
BUILD_DIST=true time bash ./tools/test-in-docker
else
if [[ $BASHVER == 4.0 ]]; then
echo "Skip to test Bash 4.0 in MacOS."
return
fi
echo "To build ./dist/lobash.bash"
bash ./build ./dist/
echo "Start to test in MacOS Bash"
time bash ./test -d
fi
notifications:
email:
on_success: never