-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
141 lines (125 loc) · 4.2 KB
/
.gitlab-ci.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
stages:
- build
- srv_basic
- srv_commands
- srv_event
- ia_protocol
srv_compile:
stage: build
script:
- make -C server
artifacts:
paths:
- server/zappy_server
expire_in: 10 minutes
allow_failure: false
gui_compile:
image: node:9
stage: build
script:
- cd gui
- npm install --progress=false
- npm install -g webpack webpack-cli --progress=false
- webpack --verbose
allow_failure: false
srv_connect:
stage: srv_basic
retry: 2
script:
- ./server/zappy_server -f 10 -n test -c 10 -x 20 -y 20 &
- nc 0 4242 -w 5 < test/server/connect.input > /tmp/zappy_output
- cat /tmp/zappy_output | grep "`cat test/server/connect.output`"
allow_failure: false
srv_join:
stage: srv_basic
retry: 2
script:
- ./server/zappy_server -f 100 -n test -c 10 -x 20 -y 20 &
- nc 0 4242 -w 5 < test/server/join.input > /tmp/zappy_output
- cat /tmp/zappy_output | grep "`cat test/server/join.output`"
allow_failure: false
srv_unknown:
stage: srv_commands
retry: 2
script:
- ./server/zappy_server -f 100 -n test -c 10 -x 20 -y 20 &
- nc 0 4242 -w 5 < test/server/unknown.input > /tmp/zappy_output
- cat /tmp/zappy_output | grep "`cat test/server/unknown.output`"
srv_player_forward:
stage: srv_commands
retry: 2
script:
- ./server/zappy_server -f 100 -n test -c 10 -x 20 -y 20 &
- nc 0 4242 -w 5 < test/server/forward.input > /tmp/zappy_output
- cat /tmp/zappy_output | grep "`cat test/server/forward.output`"
srv_player_death:
stage: srv_commands
retry: 2
script:
- ./server/zappy_server -f 1000 -n test -c 10 -x 20 -y 20 &
- nc 0 4242 -w 10 < test/server/death.input > /tmp/zappy_output
- cat /tmp/zappy_output | grep "`cat test/server/death.output`"
srv_player_broadcast:
stage: srv_commands
retry: 2
script:
- ./server/zappy_server -f 100 -n test -c 10 -x 20 -y 20 &
- nc 0 4242 -w 5 < test/server/join.input > /tmp/zappy_output &
- nc 0 4242 -w 5 < test/server/broadcast.input
- cat /tmp/zappy_output | grep "`cat test/server/broadcast.output`"
srv_player_connect_nbr:
stage: srv_commands
retry: 2
script:
- ./server/zappy_server -f 100 -n test -c 10 -x 20 -y 20 &
- nc 0 4242 -w 5 < test/server/connect_nbr.input > /tmp/zappy_output
- cat /tmp/zappy_output | grep "`cat test/server/connect_nbr.output`"
srv_player_fork:
stage: srv_commands
retry: 2
script:
- ./server/zappy_server -f 1000 -n test -c 10 -x 20 -y 20 &
- nc 0 4242 -w 10 < test/server/gui_connect.input > /tmp/zappy_output &
- nc 0 4242 -w 10 < test/server/fork.input
- cat /tmp/zappy_output | grep "`sed '1q;d' test/server/fork.output`" && cat /tmp/zappy_output | grep "`sed '2q;d' test/server/fork.output`"
srv_player_incantation_fail:
stage: srv_commands
retry: 2
script:
- ./server/zappy_server -f 1000 -n test -c 10 -x 20 -y 20 &
- nc 0 4242 -w 10 < test/server/gui_connect.input > /tmp/zappy_output &
- nc 0 4242 -w 10 < test/server/incantation_fail.input
- cat /tmp/zappy_output | grep "`cat test/server/incantation_fail.output`"
srv_player_inventory:
stage: srv_commands
retry: 2
script:
- ./server/zappy_server -f 100 -n test -c 10 -x 20 -y 20 &
- nc 0 4242 -w 5 < test/server/inventory.input > /tmp/zappy_output
- cat /tmp/zappy_output | grep "`cat test/server/inventory.output`"
srv_gui_event_join:
stage: srv_event
retry: 2
script:
- ./server/zappy_server -f 100 -n test -c 10 -x 20 -y 20 &
- nc 0 4242 -w 5 < test/server/gui_connect.input > /tmp/zappy_output &
- nc 0 4242 -w 5 < test/server/join.input
- cat /tmp/zappy_output | grep "`cat test/server/event_join.output`"
srv_gui_event_broadcast:
stage: srv_event
retry: 2
script:
git status
srv_gui_event_egg:
stage: srv_event
retry: 2
script:
- ./server/zappy_server -f 1000 -n test -c 10 -x 20 -y 20 &
- nc 0 4242 -w 10 < test/server/gui_connect.input > /tmp/zappy_output &
- nc 0 4242 -w 10 < test/server/fork.input
- cat /tmp/zappy_output | grep "`sed '1q;d' test/server/event_egg.output`" && cat /tmp/zappy_output | grep "`sed '2q;d' test/server/event_egg.output`"
ia_protocol:
stage: ia_protocol
retry: 2
script:
- python3 ia/src/classes/ia_res/MsgProtocol.py