-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
183 lines (172 loc) · 3.45 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
stages:
- Build
- Generate # transfrom included
- Solve
- Stability
- Style
Build with Makefile (5%):
stage: Build
before_script:
- "cp /tmp/$(basename $(readlink -f ../)) platform_env"
- source platform_env
- git checkout $SHA
script:
- rm -f generate transform solve *.o
- make
- "[[ -e generate && -e transform && -e solve ]]"
after_script:
- source platform_env
- curl https://pd2a.imslab.org/updateGrade?token=$TOKEN
artifacts:
paths:
- solve
- generate
- transform
- platform_env
except:
- pushes
- web
Generate problem (10%):
stage: Generate
dependencies:
- Build with Makefile (5%)
script:
- sudoku-judge -mode=generate -base=`pwd`
allow_failure: true
artifacts:
when: always
paths:
- crashed
except:
- pushes
- web
Can transform (10%):
stage: Generate
dependencies:
- Build with Makefile (5%)
script:
- sudoku-judge -mode=transform -base=`pwd` -prob=/home/hty/testfile/transform
allow_failure: true
artifacts:
when: always
paths:
- crashed
except:
- pushes
- web
Solve lv1 (20%):
stage: Solve
dependencies:
- Build with Makefile (5%)
script:
- sudoku-judge -mode=solve -base=`pwd` -prob=/home/hty/testfile/solve/all -level=0
allow_failure: true
artifacts:
when: always
paths:
- crashed
except:
- pushes
- web
Solve lv2 (10%):
stage: Solve
dependencies:
- Build with Makefile (5%)
script:
- sudoku-judge -mode=solve -base=`pwd` -prob=/home/hty/testfile/solve/all -level=1
allow_failure: true
artifacts:
when: always
paths:
- crashed
except:
- pushes
- web
Solve lv3 (10%):
stage: Solve
dependencies:
- Build with Makefile (5%)
script:
- sudoku-judge -mode=solve -base=`pwd` -prob=/home/hty/testfile/solve/all -level=2
allow_failure: true
artifacts:
when: always
paths:
- crashed
except:
- pushes
- web
Speed lv1 (10%):
stage: Solve
dependencies:
- Build with Makefile (5%)
script:
- sudoku-judge -mode=speed -base=`pwd` -prob=/home/hty/testfile/speeeed -level=0
allow_failure: true
artifacts:
when: always
paths:
- crashed
except:
- pushes
- web
Speed lv2 (5%):
stage: Solve
dependencies:
- Build with Makefile (5%)
script:
- sudoku-judge -mode=speed -base=`pwd` -prob=/home/hty/testfile/speeeed -level=1
allow_failure: true
artifacts:
when: always
paths:
- crashed
except:
- pushes
- web
Speed lv3 (5%):
stage: Solve
dependencies:
- Build with Makefile (5%)
script:
- sudoku-judge -mode=speed -base=`pwd` -prob=/home/hty/testfile/speeeed -level=2
allow_failure: true
artifacts:
when: always
paths:
- crashed
except:
- pushes
- web
Finish normally (10%):
stage: Stability
dependencies:
- Generate problem (10%)
- Can transform (10%)
- Solve lv1 (20%)
- Solve lv2 (10%)
- Solve lv3 (10%)
- Speed lv1 (10%)
- Speed lv2 (5%)
- Speed lv3 (5%)
script:
- ls
- "[[ ! -e crashed ]]"
allow_failure: true
except:
- pushes
- web
Coding style checking (5%):
stage: Style
before_script:
- source platform_env
- git checkout $SHA
script:
- bash ./.scripts/style.sh
after_script:
- source platform_env
- curl https://pd2a.imslab.org/updateGrade?token=$TOKEN
allow_failure: true
except:
- pushes
- web