forked from rjust/defects4j
-
Notifications
You must be signed in to change notification settings - Fork 0
259 lines (257 loc) · 10.5 KB
/
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
name: Run CI tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
JDK_OS: linux
JDK_ARCH: x64
JDK_VERSION: 8u192
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
show-progress: false
- name: Cache JDK
uses: actions/cache@v3
id: cache-jdk
with:
path: ~/.java
key: jdk-${{ env.JDK_OS }}-${{ env.JDK_ARCH }}-${{ env.JDK_VERSION }}
- name: Install JDK
if: steps.cache-jdk.outputs.cache-hit != 'true'
run: |
export JDK_FILE="jdk-$JDK_VERSION-$JDK_OS-$JDK_ARCH.tar.gz"
export JDK_URL="https://defects4j.org/downloads/$JDK_FILE"
if [ ! -f "$JDK_FILE" ]; then mkdir -p ~/.java && (timeout 400 curl -O -s -S -L --retry 3 "$JDK_URL" || curl -O -L --retry 3 "$JDK_URL") && tar -xzf "$JDK_FILE" -C ~/.java; fi
- name: Setup JDK
run: |
export JAVA_HOME=$HOME/.java/jdk1.8.0_192
echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV
echo "$JAVA_HOME/bin" >> $GITHUB_PATH
- name: Install diffstat
run: sudo apt-get install diffstat
- name: Install Carton
uses: perl-actions/install-with-cpanm@v1
with:
install: |
Carton
- name: Install Perl packages
run: timeout 300 carton install || cpan carton install
- name: Run ./init.sh
run: |
./init.sh
# Test the tutorial and basic commands
- run: carton exec ./test_tutorial.sh
name: test_tutorial.sh
working-directory: "./framework/test"
- run: carton exec ./test_mutation_analysis.sh
name: test_mutation_analysis.sh
working-directory: "./framework/test"
- run: carton exec ./test_gen_tests.sh -p Lang -b 6
name: test_gen_tests.sh
working-directory: "./framework/test"
- run: carton exec ./test_fix_test_suite.sh
name: test_fix_test_suite.sh
working-directory: "./framework/test"
- run: carton exec ./test_bug_mining.sh
name: test_bug_mining.sh
working-directory: "./framework/test"
# - run: carton exec ./test_export_command.sh -p Chart -p Cli -p Closure
# name: "test export 1"
# working-directory: "./framework/test"
# - run: carton exec ./test_export_command.sh -p Codec -p Collections -p Compress -p Csv -p JacksonDatabind
# name: "test export 2"
# working-directory: "./framework/test"
# - run: carton exec ./test_export_command.sh -p Gson -p JacksonCore -p JacksonXml -p Jsoup -p JxPath
# name: "test export 3"
# working-directory: "./framework/test"
# - run: carton exec ./test_export_command.sh -p Lang -p Math -p Mockito -p Time
# name: "test export 4"
# working-directory: "./framework/test"
#
# Verifying all bugs is pretty time-consuming. The jobs below should be run as
# part of the release process, but running them on every push and PR is
# unnecessary.
#
# # Verify that all bugs are reproducible (run multiple jobs for projects that
# # take a long time to finish).
### Chart
# - run: carton exec ./test_verify_bugs.sh -p Chart
# name: "Chart"
# working-directory: "./framework/test"
### Cli
# - run: carton exec ./test_verify_bugs.sh -p Cli
# name: "Cli"
# working-directory: "./framework/test"
### Closure
# - run: carton exec ./test_verify_bugs.sh -p Closure -b1..10
# name: "Closure 1-10"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b11..15
# name: "Closure 11-15"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b16..20
# name: "Closure 16-20"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b21..30
# name: "Closure 21-30"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b31..40
# name: "Closure 31-40"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b41..50
# name: "Closure 41-50"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b51..60
# name: "Closure 51-60"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b61..70
# name: "Closure 61-70"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b71..80
# name: "Closure 71-80"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b81..90
# name: "Closure 81-90"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b91..100
# name: "Closure 91-100"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b101..111
# name: "Closure 101-111"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b112..122
# name: "Closure 112-122"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b123..133
# name: "Closure 123-133"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b134..142
# name: "Closure 134-142"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b143..151
# name: "Closure 143-151"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b152..160
# name: "Closure 152-160"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b161..169
# name: "Closure 161-169"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Closure -b170..176
# name: "Closure 170-176"
# working-directory: "./framework/test"
### Codec
# - run: carton exec ./test_verify_bugs.sh -p Codec -b1..18
# name: "Codec"
# working-directory: "./framework/test"
### Collections
# - run: carton exec ./test_verify_bugs.sh -p Collections -b25..28
# name: "Collections"
# working-directory: "./framework/test"
### Compress
# - run: carton exec ./test_verify_bugs.sh -p Compress
# name: "Compress"
# working-directory: "./framework/test"
### Csv
# - run: carton exec ./test_verify_bugs.sh -p Csv -b1..16
# name: "Csv"
# working-directory: "./framework/test"
### Gson
# - run: carton exec ./test_verify_bugs.sh -p Gson -b1..18
# name: "Gson"
# working-directory: "./framework/test"
### JacksonCore
# - run: carton exec ./test_verify_bugs.sh -p JacksonCore
# name: "JacksonCore"
# working-directory: "./framework/test"
### JacksonDatabind
# - run: carton exec ./test_verify_bugs.sh -p JacksonDatabind -b1..14
# name: "JacksonDatabind 1-14"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p JacksonDatabind -b15..28
# name: "JacksonDatabind 15-28"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p JacksonDatabind -b29..43
# name: "JacksonDatabind 29-43"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p JacksonDatabind -b44..57
# name: "JacksonDatabind 44-57"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p JacksonDatabind -b58..67
# name: "JacksonDatabind 58-67"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p JacksonDatabind -b68..76
# name: "JacksonDatabind 68-76"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p JacksonDatabind -b77..86
# name: "JacksonDatabind 77-86"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p JacksonDatabind -b87..96
# name: "JacksonDatabind 87-96"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p JacksonDatabind -b97..104
# name: "JacksonDatabind 97-104"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p JacksonDatabind -b105..112
# name: "JacksonDatabind 105-112"
# working-directory: "./framework/test"
### JacksonXml
# - run: carton exec ./test_verify_bugs.sh -p JacksonXml -b1..6
# name: "JacksonXml"
# working-directory: "./framework/test"
### Jsoup
# - run: carton exec ./test_verify_bugs.sh -p Jsoup -b1..50
# name: "Jsoup 1-50"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Jsoup -b51..93
# name: "Jsoup 51-93"
# working-directory: "./framework/test"
### JxPath
# - run: carton exec ./test_verify_bugs.sh -p JxPath
# name: "JxPath"
# working-directory: "./framework/test"
### Lang
# - run: carton exec ./test_verify_bugs.sh -p Lang
# name: "Lang"
# working-directory: "./framework/test"
### Math
# - run: carton exec ./test_verify_bugs.sh -p Math -b1..18
# name: "Math 1-18"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Math -b19..36
# name: "Math 19-36"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Math -b20..54
# name: "Math 20-54"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Math -b55..80
# name: "Math 55-80"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Math -b81..106
# name: "Math 81-106"
# working-directory: "./framework/test"
### Mockito
# - run: carton exec ./test_verify_bugs.sh -p Mockito -b1..5
# name: "Mockito 1-5"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Mockito -b6..10
# name: "Mockito 6-10"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Mockito -b11..15
# name: "Mockito 11-15"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Mockito -b16..20
# name: "Mockito 16-20"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Mockito -b21..26
# name: "Mockito 21-26"
# working-directory: "./framework/test"
# - run: carton exec ./test_verify_bugs.sh -p Mockito -b27..38
# name: "Mockito 27-38"
# working-directory: "./framework/test"
### Time
# - run: carton exec ./test_verify_bugs.sh -p Time
# name: "Time"
# working-directory: "./framework/test"