-
Notifications
You must be signed in to change notification settings - Fork 431
/
Copy pathperl6.rb
66 lines (55 loc) · 1.75 KB
/
perl6.rb
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
# Maintained by:
# Paul Cochrane @paultcochrane paul@liekut.de
# Rob Hoelz @hoelzro rob@hoelz.ro
# Nick Logan @ugexe nlogan@gmail.com
# Tony O'Dell @tony-o tony.odell@live.com
module Travis
module Build
class Script
class Perl6 < Script
DEFAULTS = {
perl6: 'latest'
}
def export
super
sh.export 'TRAVIS_PERL6_VERSION', version, echo: false
end
def configure
super
sh.newline
sh.echo 'Perl6 support for Travis-CI is community maintained.', ansi: :red
sh.echo 'Please open any issues at hhttps://travis-ci.community/c/languages/perl6', ansi: :red
sh.echo 'and cc @paultcochrane, @hoelzro, @ugexe, and @tony-o', ansi: :red
sh.echo 'Installing Rakudo (MoarVM)', ansi: :yellow
sh.cmd 'git clone -b v1 https://github.com/tadzik/rakudobrew.git ${TRAVIS_HOME}/.rakudobrew'
sh.export 'PATH', '${TRAVIS_HOME}/.rakudobrew/bin:$PATH', echo: false
end
def setup
super
if version == "latest"
sh.cmd 'rakudobrew build moar',
assert: false, fold: 'setup', timing: true
else
sh.cmd "rakudobrew build moar #{version}",
assert: false, fold: 'setup', timing: true
end
end
def announce
super
sh.cmd 'perl6 --version'
end
def install
end
def script
sh.cmd "PERL6LIB=lib prove --ext .t --ext .t6 -v -r --exec=perl6 t/"
end
def cache_slug
super << '--perl6-' << version
end
def version
Array(config[:perl6]).first.to_s
end
end
end
end
end