Fix a typo in 'primitives' word in ChangeLog
[platform/upstream/libgc.git] / .travis.yml
1 language: c++
2
3 matrix:
4   include:
5   - os: linux
6     compiler: clang
7     env:
8     - CONF_OPTIONS="--enable-cplusplus"
9     - NO_CLONE_LIBATOMIC_OPS=true
10   - os: linux
11     compiler: gcc
12     env:
13     - CONF_OPTIONS="--enable-cplusplus"
14   - os: osx
15     env:
16     - CONF_OPTIONS="--enable-cplusplus"
17     - NO_CLONE_LIBATOMIC_OPS=true
18   - os: linux
19     env:
20     - COVERITY_SCAN_BRANCH=1
21     addons:
22       coverity_scan:
23         project:
24           name: ivmai/bdwgc
25           version: 8.1.0
26         notification_email: ivmai@mail.ru
27         branch_pattern: master
28         build_command_prepend: "./configure --enable-cplusplus --disable-shared --enable-single-obj-compilation"
29         build_command: make -j check CFLAGS_EXTRA=-DLINT2
30   - os: linux
31     env:
32     - MAKEFILE_TARGETS="distcheck"
33     - AUTOMAKE_VER=1.15
34     - M4_VER=1.4.18
35     - LIBTOOL_VER=2.4.6
36     - NO_CLONE_LIBATOMIC_OPS=true
37   - os: linux
38     env:
39     - MAKEFILE_TARGETS="dist"
40   - os: linux
41     env:
42     - CPPCHECK_ENABLE="--enable=unusedFunction -I libatomic_ops/src extra/gc.c tests/*.c"
43   - os: linux
44     env:
45     - CPPCHECK_ENABLE="--enable=unusedFunction --force -D GC_BUILTIN_ATOMIC *.cc cord/*.c cord/tests/*.c tests/*.c tests/*.cc"
46     - CPPCHECK_OUT_FILTER="Z"
47     - NO_CLONE_LIBATOMIC_OPS=true
48   - os: linux
49     env:
50     - CPPCHECK_ENABLE="-j4 --enable=information,performance,portability,style,warning --force -U GC_PRIVATE_H -I libatomic_ops/src *.c"
51   - os: linux
52     env:
53     - CPPCHECK_ENABLE="-j4 --enable=information,performance,portability,style,warning --force -U GC_PRIVATE_H -I libatomic_ops/src *.cc cord/*.c cord/tests/*.c extra/AmigaOS.c extra/MacOS.c extra/msvc_dbg.c extra/symbian.cpp tests/*.c tests/*.cc tools/*.c"
54   - os: linux
55     compiler: gcc
56     env:
57     - CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus --enable-static"
58     - NO_CLONE_LIBATOMIC_OPS=true
59   - os: linux
60     addons:
61       apt:
62         packages:
63         - gcc-multilib
64     compiler: clang
65     env:
66     - CFLAGS_EXTRA="-m32"
67     - CONF_OPTIONS="--enable-gc-assertions"
68     - NO_CLONE_LIBATOMIC_OPS=true
69   - os: linux
70     addons:
71       apt:
72         packages:
73         - gcc-multilib
74     compiler: gcc
75     env:
76     - CFLAGS_EXTRA="-m32"
77     - CONF_OPTIONS="--enable-gc-assertions --enable-mmap"
78   - os: osx
79     env:
80     - CFLAGS_EXTRA="-m32"
81     - CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus"
82     - NO_CLONE_LIBATOMIC_OPS=true
83   - os: linux
84     compiler: gcc
85     env:
86     - CONF_OPTIONS="--disable-threads --enable-checksums --disable-munmap --enable-cplusplus"
87     - NO_CLONE_LIBATOMIC_OPS=true
88   - os: linux
89     compiler: clang
90     env:
91     - CFLAGS_EXTRA="-D DBG_HDRS_ALL -D SHORT_DBG_HDRS"
92     - CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus"
93     - NO_CLONE_LIBATOMIC_OPS=true
94   - os: osx
95     env:
96     - CFLAGS_EXTRA="-D DBG_HDRS_ALL -D SHORT_DBG_HDRS -D LINT2"
97     - CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus --enable-handle-fork=manual"
98     - NO_CLONE_LIBATOMIC_OPS=true
99   - os: linux
100     compiler: gcc
101     env:
102     - CFLAGS_EXTRA="-D DEBUG_ADD_DEL_ROOTS -D DEBUG_THREADS -D GC_DEBUG -D GC_LOG_TO_FILE_ALWAYS"
103     - CONF_OPTIONS="--enable-cplusplus"
104   - os: linux
105     compiler: gcc
106     env:
107     - CFLAGS_EXTRA="-D BSD_TIME -D DEFAULT_STACK_MAYBE_SMALL -D ENABLE_TRACE -D EMPTY_GETENV_RESULTS -D GC_ALWAYS_MULTITHREADED -D GC_NETBSD_THREADS_WORKAROUND -D CPPCHECK"
108     - CONF_OPTIONS="--enable-cplusplus"
109   - os: linux
110     compiler: clang
111     env:
112     - CFLAGS_EXTRA="-march=native -D _FORTIFY_SOURCE=2 -D DEFAULT_VDB -D TEST_WITH_SYSTEM_MALLOC"
113     - CONF_OPTIONS="--with-libatomic-ops=no --enable-cplusplus --disable-handle-fork"
114   - os: linux
115     addons:
116       apt:
117         packages:
118         - libatomic-ops-dev
119     compiler: gcc
120     env:
121     - CONF_OPTIONS="--with-libatomic-ops=yes --enable-gc-assertions --enable-cplusplus"
122     - CFLAGS_EXTRA="-D TEST_PAGES_EXECUTABLE"
123     - NO_CLONE_LIBATOMIC_OPS=true
124   - os: osx
125     env:
126     - CFLAGS_EXTRA="-march=native -D _FORTIFY_SOURCE=2 -D AO_DISABLE_GCC_ATOMICS"
127     - CONF_OPTIONS="--with-libatomic-ops=no --enable-munmap --enable-cplusplus --enable-static"
128   - os: linux
129     compiler: gcc
130     env:
131     - CONF_CFLAGS="-D AO_USE_PTHREAD_DEFS"
132     - CONF_OPTIONS="--with-libatomic-ops=no --enable-gc-assertions --enable-cplusplus --enable-static"
133   - os: linux
134     addons:
135       apt:
136         packages:
137         - libatomic-ops-dev
138     compiler: clang
139     env:
140     - CONF_CFLAGS="-D AO_USE_PTHREAD_DEFS"
141     - CONF_OPTIONS="--with-libatomic-ops=yes --enable-gc-assertions --enable-cplusplus --enable-static"
142     - NO_CLONE_LIBATOMIC_OPS=true
143   - os: linux
144     compiler: gcc
145     env:
146     - CFLAGS_EXTRA="-D DONT_ADD_BYTE_AT_END -D GC_TIME_LIMIT=10"
147     - CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus"
148   - os: linux
149     addons:
150       apt:
151         packages:
152         - gcc-multilib
153     compiler: gcc
154     env:
155     - CFLAGS_EXTRA="-m32 -D MARK_BIT_PER_OBJ -D USE_CUSTOM_SPECIFIC"
156     - CONF_OPTIONS="--enable-gc-assertions"
157   - os: linux
158     compiler: clang
159     env:
160     - CFLAGS_EXTRA="-D MARK_BIT_PER_OBJ"
161     - CONF_OPTIONS="--enable-cplusplus"
162   - os: linux
163     compiler: gcc
164     env:
165     - CFLAGS_EXTRA="-D NO_CLOCK -D POINTER_MASK=~0xf"
166     - CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus --enable-handle-fork=manual"
167   - os: linux
168     compiler: gcc
169     env:
170     - CFLAGS_EXTRA="-D PROC_VDB -D GC_NO_SYS_FAULT_H -D NO_INCREMENTAL -D DEBUG_DIRTY_BITS"
171     - CONF_OPTIONS="--enable-cplusplus --disable-docs"
172   - os: linux
173     compiler: clang
174     env:
175     - CFLAGS_EXTRA="-D TEST_MANUAL_VDB"
176     - CONF_OPTIONS="--enable-gc-assertions --disable-parallel-mark"
177   - os: linux
178     compiler: gcc
179     env:
180     - CFLAGS_EXTRA="-D TEST_MANUAL_VDB"
181     - CONF_OPTIONS="--enable-gc-assertions --disable-munmap"
182   - os: linux
183     compiler: gcc
184     env:
185     - CFLAGS_EXTRA="-D FIND_LEAK -D SKIP_LEAKED_OBJECTS_PRINTING"
186     - CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus"
187   - os: linux
188     compiler: gcc
189     env:
190     - CFLAGS_EXTRA="-D SMALL_CONFIG -D NO_GETENV"
191     - CONF_OPTIONS="--enable-cplusplus"
192   - os: linux
193     compiler: gcc
194     env:
195     - CFLAGS_EXTRA="-std=c11 -D GC_NO_SIGSETJMP"
196     - CONF_OPTIONS="--disable-threads --enable-gc-assertions --enable-cplusplus"
197     - NO_CLONE_LIBATOMIC_OPS=true
198   - os: linux
199     compiler: clang
200     env:
201     - CONF_OPTIONS="--disable-thread-local-alloc --enable-cplusplus --enable-static"
202     - NO_CLONE_LIBATOMIC_OPS=true
203   - os: linux
204     compiler: gcc
205     env:
206     - CONF_OPTIONS="--disable-parallel-mark --disable-thread-local-alloc --enable-gc-assertions --enable-cplusplus"
207   - os: linux
208     addons:
209       apt:
210         packages:
211         - lcov
212     compiler: gcc
213     env:
214     - CONF_OPTIONS="--enable-gcov --enable-single-obj-compilation --enable-cplusplus --disable-shared --enable-gc-assertions"
215     - CFLAGS_EXTRA="-D USE_CUSTOM_SPECIFIC"
216     - REPORT_COVERAGE=true
217   - os: linux
218     compiler: gcc
219     env:
220     - CONF_OPTIONS="--enable-gc-debug --enable-cplusplus"
221   - os: linux
222     compiler: gcc
223     env:
224     - CONF_OPTIONS="--disable-gc-debug --enable-cplusplus"
225   - os: linux
226     compiler: clang
227     env:
228     - CONF_OPTIONS="--enable-large-config --enable-cplusplus --disable-shared --enable-static"
229     - NO_CLONE_LIBATOMIC_OPS=true
230   - os: osx
231     env:
232     - CONF_OPTIONS="--enable-cplusplus --disable-shared --enable-static"
233   - os: osx
234     env:
235     - CONF_OPTIONS="--enable-large-config --enable-cplusplus --disable-handle-fork"
236     - NO_CLONE_LIBATOMIC_OPS=true
237   - os: linux
238     addons:
239       apt:
240         packages:
241         - gcc-multilib
242     compiler: gcc
243     env:
244     - CONF_OPTIONS="--enable-large-config --disable-munmap"
245     - CFLAGS_EXTRA="-m32"
246   - os: linux
247     compiler: gcc
248     env:
249     - CONF_OPTIONS="--enable-large-config --enable-cplusplus --enable-gc-assertions --enable-static"
250     - CFLAGS_EXTRA="-D LINT2"
251   - os: linux
252     addons:
253       apt:
254         packages:
255         - gcc-multilib
256     compiler: clang
257     env:
258     - CONF_OPTIONS="--enable-redirect-malloc --enable-static --disable-threads"
259     - CFLAGS_EXTRA="-m32"
260     - NO_CLONE_LIBATOMIC_OPS=true
261   - os: osx
262     env:
263     - CONF_OPTIONS="--enable-redirect-malloc --enable-cplusplus --enable-static --disable-threads"
264     - CFLAGS_EXTRA="-m32"
265     - NO_CLONE_LIBATOMIC_OPS=true
266   - os: linux
267     compiler: gcc
268     env:
269     - CONF_OPTIONS="--enable-redirect-malloc --enable-gc-debug --enable-cplusplus --enable-gc-assertions"
270   - os: linux
271     compiler: clang
272     env:
273     - CONF_OPTIONS="--disable-threads --enable-cplusplus"
274     - CFLAGS_EXTRA="-O3 -march=native"
275     - NO_CLONE_LIBATOMIC_OPS=true
276   - os: linux
277     compiler: gcc
278     env:
279     - CONF_OPTIONS="--disable-static --disable-threads --enable-cplusplus"
280     - CFLAGS_EXTRA="-O3 -march=native"
281     - NO_CLONE_LIBATOMIC_OPS=true
282   - os: osx
283     env:
284     - CONF_OPTIONS="--disable-threads --enable-cplusplus"
285     - CFLAGS_EXTRA="-O3 -march=native"
286     - NO_CLONE_LIBATOMIC_OPS=true
287   - os: linux
288     compiler: clang
289     env:
290     - CMAKE_CONFIG="Debug"
291     - CMAKE_OPTIONS="-Denable_cplusplus=ON -Denable_gc_assertions=ON"
292     - NO_CLONE_LIBATOMIC_OPS=true
293   - os: linux
294     compiler: gcc
295     env:
296     - CMAKE_CONFIG="Release"
297     - CMAKE_OPTIONS="-Denable_cplusplus=ON -Denable_large_config=ON"
298     - NO_CLONE_LIBATOMIC_OPS=true
299   - os: linux
300     compiler: gcc
301     env:
302     - CMAKE_CONFIG="Debug"
303     - CMAKE_OPTIONS="-DBUILD_SHARED_LIBS=OFF -Denable_gc_debug=ON"
304     - NO_CLONE_LIBATOMIC_OPS=true
305   - os: linux
306     compiler: gcc
307     env:
308     - CMAKE_CONFIG="Release"
309     - CMAKE_OPTIONS="-DBUILD_SHARED_LIBS=OFF -Denable_threads=OFF"
310     - NO_CLONE_LIBATOMIC_OPS=true
311   - os: osx
312     env:
313     - CMAKE_CONFIG="Debug"
314     - CMAKE_OPTIONS="-Denable_cplusplus=ON"
315     - NO_CLONE_LIBATOMIC_OPS=true
316   - os: osx
317     env:
318     - CMAKE_CONFIG="Release"
319     - CMAKE_OPTIONS="-DBUILD_SHARED_LIBS=OFF -Denable_cplusplus=ON -Denable_gc_assertions=ON -Denable_large_config=ON"
320     - NO_CLONE_LIBATOMIC_OPS=true
321   - os: osx
322     env:
323     - CSA_CHECK=true
324     - CFLAGS_EXTRA="-m32"
325   - os: linux
326     compiler: clang
327     language: c
328     env:
329     - CSA_CHECK=true
330     - CFLAGS_EXTRA="-D ALL_INTERIOR_POINTERS -D CHECKSUMS -D DBG_HDRS_ALL -D DEBUG_THREADS -D ENABLE_TRACE -D GC_ALWAYS_MULTITHREADED -D GC_ASSERTIONS -D GC_ATOMIC_UNCOLLECTABLE -D GC_ENABLE_SUSPEND_THREAD -D GC_GCJ_SUPPORT -D GC_PRINT_BACK_HEIGHT -D GC_THREADS -D HANDLE_FORK -D JAVA_FINALIZATION -D KEEP_BACK_PTRS -D MAKE_BACK_GRAPH -D PARALLEL_MARK -D PRINT_BLACK_LIST -D THREAD_LOCAL_ALLOC -D USE_MMAP -D USE_MUNMAP"
331   - os: linux
332     compiler: clang
333     env:
334     - MAKEFILE_NAME=Makefile.direct
335     - MAKEFILE_TARGETS="check cord/de"
336   - os: linux
337     compiler: gcc
338     env:
339     - MAKEFILE_NAME=Makefile.direct
340     - MAKEFILE_TARGETS="check cord/de"
341   - os: osx
342     env:
343     - MAKEFILE_NAME=Makefile.direct
344     - MAKEFILE_TARGETS="check cord/de"
345   - os: linux
346     addons:
347       apt:
348         packages:
349         - musl-tools
350     compiler: musl-gcc
351     language: c
352     env:
353     - CONF_OPTIONS="--disable-parallel-mark --enable-gc-assertions"
354   - os: linux
355     compiler: clang
356     env:
357     - CFLAGS_EXTRA="-fsanitize=address -fno-common -fno-omit-frame-pointer"
358     - CONF_OPTIONS="--enable-cplusplus --enable-static"
359     - NO_CLONE_LIBATOMIC_OPS=true
360     - TESTS_CUSTOM_RUN=true
361   - os: linux
362     addons:
363       apt:
364         packages:
365         - gcc-5
366         sources:
367         - ubuntu-toolchain-r-test
368     compiler: gcc-5
369     language: c
370     env:
371     - CFLAGS_EXTRA="-fsanitize=address -O0"
372     - CONF_OPTIONS="--enable-gc-assertions"
373     - LDFLAGS="-fuse-ld=gold"
374   - os: osx
375     env:
376     - CFLAGS_EXTRA="-fsanitize=address -m32 -fno-omit-frame-pointer"
377     - CONF_OPTIONS="--disable-shared --enable-cplusplus"
378     - NO_CLONE_LIBATOMIC_OPS=true
379   - os: linux
380     compiler: clang
381     language: c
382     env:
383     - CFLAGS_EXTRA="-fsanitize=memory -fno-omit-frame-pointer -std=gnu11"
384     - CONF_OPTIONS="--enable-static"
385     - TESTS_CUSTOM_RUN=true
386     - NO_CLONE_LIBATOMIC_OPS=true
387   - os: linux
388     compiler: clang
389     env:
390     - CFLAGS_EXTRA="-fsanitize=undefined -fno-common -fno-omit-frame-pointer"
391     - TESTS_CUSTOM_RUN=true
392     - CONF_OPTIONS="--enable-cplusplus --enable-static"
393     - NO_CLONE_LIBATOMIC_OPS=true
394   - os: linux
395     compiler: clang
396     env:
397     - CFLAGS_EXTRA="-fsanitize=thread -D NO_CANCEL_SAFE -D NO_INCREMENTAL -D USE_SPIN_LOCK -fno-omit-frame-pointer -D TEST_FORK_WITHOUT_ATFORK"
398     - CONF_OPTIONS="--enable-gc-assertions --enable-handle-fork=manual"
399     - NO_CLONE_LIBATOMIC_OPS=true
400   - os: linux
401     compiler: clang
402     env:
403     - CFLAGS_EXTRA="-fsanitize=thread -D NO_CANCEL_SAFE -D NO_INCREMENTAL -D USE_SPIN_LOCK -fno-omit-frame-pointer -D TEST_FORK_WITHOUT_ATFORK"
404     - CONF_OPTIONS="--enable-gc-assertions --enable-gc-debug --enable-handle-fork=manual --enable-large-config --with-libatomic-ops=no"
405   - os: linux
406     compiler: clang
407     env:
408     - CFLAGS_EXTRA="-fsanitize=thread -D NO_CANCEL_SAFE -D NO_INCREMENTAL -D USE_SPIN_LOCK -fno-omit-frame-pointer -D NTHREADS=15"
409     - CONF_OPTIONS="--disable-parallel-mark"
410     - NO_CLONE_LIBATOMIC_OPS=true
411   - os: linux
412     compiler: clang
413     env:
414     - CFLAGS_EXTRA="-fsanitize=thread -D NO_CANCEL_SAFE -D NO_INCREMENTAL -fno-omit-frame-pointer"
415     - CONF_OPTIONS="--disable-parallel-mark --disable-thread-local-alloc --disable-shared --enable-gc-assertions --with-libatomic-ops=no"
416   - os: linux
417     compiler: clang
418     env:
419     - CFLAGS_EXTRA="-O3 -march=native"
420     - CONF_OPTIONS="--enable-cplusplus --enable-static --enable-single-obj-compilation"
421     - NO_CLONE_LIBATOMIC_OPS=true
422   - os: linux
423     addons:
424       apt:
425         packages:
426         - gcc-multilib
427     compiler: clang
428     env:
429     - CFLAGS_EXTRA="-m32 -D _FORTIFY_SOURCE=2 -D GC_DISABLE_INCREMENTAL -std=gnu11"
430     - CONF_OPTIONS="--enable-gc-assertions --enable-gc-debug"
431     - NO_CLONE_LIBATOMIC_OPS=true
432   - os: linux
433     addons:
434       apt:
435         packages:
436         - gcc-8
437         - g++-8
438         sources:
439         - ubuntu-toolchain-r-test
440     compiler: gcc-8
441     language: c
442     env:
443     - CXX=g++-8
444     - CONF_OPTIONS="--enable-cplusplus --enable-gc-assertions --enable-static"
445     - NO_CLONE_LIBATOMIC_OPS=true
446   - os: linux
447     addons:
448       apt:
449         packages:
450         - gcc-8
451         - gcc-8-multilib
452         - gcc-multilib
453         sources:
454         - ubuntu-toolchain-r-test
455     compiler: gcc-8
456     language: c
457     env:
458     - CFLAGS_EXTRA="-m32 -O3 -std=gnu11"
459     - CONF_OPTIONS="--disable-shared --enable-static --enable-single-obj-compilation"
460     - NO_CLONE_LIBATOMIC_OPS=true
461   - os: linux
462     addons:
463       apt:
464         packages:
465         - gcc-8
466         - gcc-8-multilib
467         - gcc-multilib
468         sources:
469         - ubuntu-toolchain-r-test
470     compiler: gcc-8
471     language: c
472     env:
473     - CFLAGS_EXTRA="-mx32 -march=native -D _FORTIFY_SOURCE=2"
474     - CONF_OPTIONS="--enable-large-config --enable-gc-assertions"
475     - NO_CLONE_LIBATOMIC_OPS=true
476   - os: linux
477     compiler: clang
478     env:
479     - CFLAGS_EXTRA="-x c++"
480     - CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus --enable-gc-debug --disable-shared"
481     - MAKEFILE_TARGETS="all"
482     - NO_CLONE_LIBATOMIC_OPS=true
483   - os: linux
484     compiler: gcc
485     env:
486     - CC_FOR_CHECK=g++
487     - CONF_OPTIONS="--enable-gc-assertions"
488     - MAKEFILE_TARGETS="all"
489     - MAKEFILE_TARGETS_CHECK="check"
490     - NO_CLONE_LIBATOMIC_OPS=true
491   - os: linux
492     compiler: clang
493     env:
494     - CFLAGS_EXTRA="-O3 -Wall -Wextra -Werror -x c++"
495     - MAKEFILE_NAME=Makefile.direct
496     - MAKEFILE_TARGETS="cords"
497   - os: linux
498     compiler: gcc
499     env:
500     - CC_FOR_CHECK=g++
501     - CFLAGS_EXTRA="-O3 -Wall -Wextra -Werror -D TEST_MANUAL_VDB"
502     - MAKEFILE_NAME=Makefile.direct
503     - MAKEFILE_TARGETS="cords"
504     - MAKEFILE_TARGETS_CHECK="cord/de check"
505   - os: linux
506     addons:
507       apt:
508         packages:
509         - g++-mingw-w64
510         - gcc-mingw-w64
511     compiler: x86_64-w64-mingw32-gcc
512     language: c
513     env:
514     - CXX=x86_64-w64-mingw32-g++
515     - CONF_OPTIONS="--host=x86_64-w64-mingw32 --enable-cplusplus --enable-static"
516     - MAKEFILE_TARGETS="all"
517   - os: linux
518     addons:
519       apt:
520         packages:
521         - gcc-mingw-w64
522     compiler: i686-w64-mingw32-gcc
523     language: c
524     env:
525     - CONF_OPTIONS="--host=i686-w64-mingw32"
526     - MAKEFILE_TARGETS="all"
527     - CFLAGS_EXTRA="-fno-omit-frame-pointer"
528
529 before_install:
530 - if [[ "$CPPCHECK_ENABLE" != "" ]]; then
531     CPPCHECK_VER=master;
532     git clone --depth=3 https://github.com/danmar/cppcheck.git
533             ~/cppcheck -b $CPPCHECK_VER;
534     make --directory ~/cppcheck -j8 CXXFLAGS="-O3 -march=native -D NDEBUG";
535   fi
536 - if [[ "$AUTOMAKE_VER" != "" || "$LIBTOOL_VER" != ""
537         || "$M4_VER" != "" ]]; then
538     GNUTOOLS_ROOT=`pwd`/../gnu-tools;
539     export PATH=$GNUTOOLS_ROOT/bin:$PATH;
540     GNU_DOWNLOAD_SITE=https://ftp.gnu.org/gnu;
541   fi
542 - if [[ "$M4_VER" != "" ]]; then
543     M4_XZ_URL=$GNU_DOWNLOAD_SITE/m4/m4-$M4_VER.tar.xz;
544     wget -O - $M4_XZ_URL | tar xf - --xz --directory ~;
545     (cd ~/m4-$M4_VER && ./configure --prefix=$GNUTOOLS_ROOT && make -j check && make install);
546   fi
547 - if [[ "$LIBTOOL_VER" != "" ]]; then
548     LIBTOOL_XZ_URL=$GNU_DOWNLOAD_SITE/libtool/libtool-$LIBTOOL_VER.tar.xz;
549     wget -O - $LIBTOOL_XZ_URL | tar xf - --xz --directory ~;
550     (cd ~/libtool-$LIBTOOL_VER && ./configure --prefix=$GNUTOOLS_ROOT && make -j && make install);
551   fi
552 - if [[ "$AUTOMAKE_VER" != "" ]]; then
553     AUTOMAKE_XZ_URL=$GNU_DOWNLOAD_SITE/automake/automake-$AUTOMAKE_VER.tar.xz;
554     wget -O - $AUTOMAKE_XZ_URL | tar xf - --xz --directory ~;
555     (cd ~/automake-$AUTOMAKE_VER && ./configure --prefix=$GNUTOOLS_ROOT && make -j && make install);
556   fi
557 - if [[ "$MAKEFILE_TARGETS" == *"dist"* ]]; then
558     autoconf --version;
559     automake --version;
560     m4 --version;
561     libtool --version || true;
562   fi
563 - if [[ "$CONF_CFLAGS" == "" ]]; then CONF_CFLAGS="-g -O2"; fi
564 - if [[ "$MAKEFILE_NAME" == "" ]]; then MAKEFILE_NAME=Makefile; fi
565 - if [[ "$MAKEFILE_TARGETS" == "" ]]; then MAKEFILE_TARGETS="check"; fi
566
567 install:
568 - if [[ "$NO_CLONE_LIBATOMIC_OPS" != true ]]; then
569     git clone --depth=50 https://github.com/ivmai/libatomic_ops.git;
570   fi
571 - if [[ "$CMAKE_CONFIG" == "" ]]; then
572     ./autogen.sh;
573   fi
574 - if [[ "$GNUTOOLS_ROOT" != "" ]]; then mv $GNUTOOLS_ROOT $GNUTOOLS_ROOT-x; fi
575 - if [[ "$REPORT_COVERAGE" == true ]]; then gem install coveralls-lcov; fi
576
577 script:
578 - if [[ "$CSA_CHECK" != true && "$CMAKE_CONFIG" == ""
579         && "$CPPCHECK_ENABLE" == "" && "$MAKEFILE_NAME" != "Makefile.direct"
580         && "$COVERITY_SCAN_BRANCH" != 1 ]]; then
581     CFLAGS="$CONF_CFLAGS" ./configure $CONF_OPTIONS --enable-werror &&
582     cat include/config.h;
583   fi
584 - if [[ "$CSA_CHECK" != true && "$CMAKE_CONFIG" == ""
585         && "$CPPCHECK_ENABLE" == "" && "$COVERITY_SCAN_BRANCH" != 1 ]]; then
586     make -j -f $MAKEFILE_NAME $MAKEFILE_TARGETS CFLAGS_EXTRA="$CFLAGS_EXTRA"
587             LDFLAGS="$LDFLAGS";
588   fi
589 - if [[ "$CMAKE_CONFIG" != "" ]]; then
590     cmake $CMAKE_OPTIONS -Dbuild_tests=ON -Denable_werror=ON
591           -Werror=deprecated . &&
592     cmake --build . --config $CMAKE_CONFIG;
593   fi
594 - if [[ "$CMAKE_CONFIG" != "" ]]; then
595     ctest --build-config $CMAKE_CONFIG -V;
596   fi
597 - if [[ "$CC_FOR_CHECK" != "" ]]; then
598     make -f $MAKEFILE_NAME $MAKEFILE_TARGETS_CHECK CC=$CC_FOR_CHECK
599             CFLAGS_EXTRA="$CFLAGS_EXTRA";
600   fi
601 - if [ -f gctest.log ]; then cat gctest.log; fi
602 - if [ -f disclaim_bench.log ]; then cat disclaim_bench.log; fi
603 - if [ -f disclaim_test.log ]; then cat disclaim_test.log; fi
604 - if [ -f disclaim_weakmap_test.log ]; then cat disclaim_weakmap_test.log; fi
605 - if [ -f threadkey_test.log ]; then cat threadkey_test.log; fi
606 - if [ -f threadleaktest.log ]; then cat threadleaktest.log; fi
607 - if [[ "$CSA_CHECK" == true ]]; then
608     ${CC} --analyze -Xanalyzer -analyzer-output=text -Werror
609         -I include -I libatomic_ops/src $CFLAGS_EXTRA
610         *.c *.cc cord/*.c cord/tests/cordtest.c cord/tests/de.c extra/gc.c
611         extra/msvc_dbg.c extra/pcr_interface.c extra/real_malloc.c
612         tests/*.c tests/*.cc tools/*.c;
613   fi
614 - if [[ "$CPPCHECK_ENABLE" != "" ]]; then
615     if [[ "$CPPCHECK_OUT_FILTER" == "" ]]; then CPPCHECK_OUT_FILTER="c "; fi;
616     set -o pipefail; ~/cppcheck/cppcheck --error-exitcode=2
617         -U GC_API -D CPPCHECK -I include $CPPCHECK_ENABLE |
618         grep --line-buffered "$CPPCHECK_OUT_FILTER";
619   fi
620 - if [[ "$TESTS_CUSTOM_RUN" == true ]]; then
621     ASAN_OPTIONS="detect_leaks=1" UBSAN_OPTIONS="halt_on_error=1"
622         make check-without-test-driver;
623   fi
624
625 after_success:
626 - if [[ "$REPORT_COVERAGE" == true ]]; then
627     lcov --capture --base-directory . --directory . --output-file coverage.info;
628     lcov --remove coverage.info '/usr/*' 'cord/tests/*' 'libatomic_ops/*' 'tests/*' --output-file coverage.info;
629     lcov --list coverage.info;
630     coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info;
631     bash <(curl -s https://codecov.io/bash);
632   fi
633
634 deploy:
635   provider: releases
636   api_key:
637     secure: j1HkSD5hyYFo//XzPemojLk6iBT+T9+PwktxtDOwdasR0lOvPyBS2k/RbBZp+amDna/40efTg2WVI8BEfpRMV8+QoYGVoTWCKCaxFCHMfSZdsPLYsHpeqp7PBh3sFX6iuQuZkRGXHNeG8cLHTTw1TatrEBU/vTZXItYKmOJH8WnlwwkiVXKQ3BvU9EJjFB1OJX9PArBXgoHjDcgi6D1kL6ErsraU9nwnaBNRFx5Tpvz/fXZDwjzMnGcxeu02zhVC37mFDd6VbKom8Pm28u4NjYLLhjdICexc0BaVC0kr3+usJytyMtWMRm6LN4kFievOntHZOEAtuU6/E0Bg8wnB8FX8vXaytb+eUVtcfS/n/x6ykgPtKHrCnWEP8nnruW/3qRExxSBASyAwBceJK+yyzVBtQudK4YZnBXUWkFfsc9pPiauUDXkYlUgvVyb3rXvJTvjdiIle194GtRsCQsGKxCZiI6jMB/wRQAA9AgcSb3FpRTqkVPEUT3Gnn0xT+Y0QLJBBm4eAG8qWoEuMMAW8lAVvfHdZh3AnnIvqONvc2dk7kq5EZyhUPTFFDxZGnXWzIwY7Nm9QkUOdvb9t+RsnoTwBL4hSD4/T1CgW/hULQ7cuiwtK/E+8r5C1VES5/I20qkwfTGwKQchdR6lOLO7YM4VlHfNbEUe/wsE3PBh0ekc=
638   file: gc-*.tar.gz
639   file_glob: true
640   skip_cleanup: true
641   on:
642     condition: $MAKEFILE_TARGETS = distcheck
643     repo: ivmai/bdwgc
644     tags: true