-
Notifications
You must be signed in to change notification settings - Fork 29
/
ci-test.sh
56 lines (40 loc) · 1.3 KB
/
ci-test.sh
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
#!/usr/bin/env bash
LTS=1.10.6
LTS_FAMILY=$(echo "$LTS" | cut -d. -f1-2)
if [ -z "$VERSION" ]; then
echo "Variable VERSION must be set"
exit 1
fi
msg() {
echo -e "\033[0;31m$1\033[0m"
}
msg "Installing latest Julia"
echo "yy" | $SUDO bash jill.sh
msg "Testing julia is installed"
julia -v
version=$(julia -v | grep "[0-9]*\.[0-9]*\.[0-9]*" -o)
major=$(echo "$version" | cut -d. -f1-2)
msg "Testing julia-x.y.z is installed"
julia-"$version" -v
msg "Testing julia-x-y is installed"
julia-"$major" -v
msg "Installing specific Julia version"
echo "yy" | $SUDO bash jill.sh --version "$VERSION"
julia-"$VERSION" -v
msg "Testing if the version is correct"
[[ $(julia-"$VERSION" -v) == "julia version $VERSION" ]]
msg "Installing latest Julia without interactive prompt"
$SUDO bash jill.sh -y
msg "Installing Julia LTS version"
$SUDO bash jill.sh -y --lts
[[ $(julia-$LTS -v) == "julia version $LTS" ]]
julia -e 'using Pkg; Pkg.update(); Pkg.add("Example")'
msg "Upgrading to the latest Julia"
$SUDO bash jill.sh -y -u "$LTS_FAMILY"
julia -e 'using Pkg; Pkg.status()' | grep Example
julia -e 'using Pkg; Pkg.update()' # Issue 73
msg "Installing release candidate version"
$SUDO bash jill.sh --rc -y
RC=$(julia -v | cut -d' ' -f3)
msg "Testing if the version is correct"
[[ $(julia-"$RC" -v) == "julia version $RC" ]]