/
matrix.rb
59 lines (48 loc) · 1.27 KB
/
matrix.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
# frozen_string_literal: true
require 'travis/yml/schema/dsl/map'
require 'travis/yml/schema/dsl/seq'
module Travis
module Yml
module Schema
module Def
class Matrix < Dsl::Map
register :matrix
def define
normal
prefix :include
map :include, to: :matrix_entries
map :exclude, to: :matrix_entries
map :allow_failures, to: :matrix_entries, alias: :allowed_failures
map :fast_finish, to: :bool, alias: :fast_failure
export
end
class Entries < Dsl::Seq
register :matrix_entries
def define
type :matrix_entry
export
end
end
class Entry < Dsl::Map
register :matrix_entry
def define
strict false
aliases :jobs
map :name, to: :str, unique: true
map :language
map :os
map :arch
map :dist
map :sudo
map :env, to: :env_vars
map :stage
map :compiler, to: :compilers
include :job
export
end
end
end
end
end
end
end