ICU-21248 Adds internal header check to Travis Continued Integration.
See #1325
This commit is contained in:
parent
24a06cc33b
commit
7bdc26e2a1
@ -186,3 +186,12 @@ matrix:
|
|||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.m2
|
- $HOME/.m2
|
||||||
|
|
||||||
|
# Check compilation of internal headers.
|
||||||
|
- name: "internal header compilation check"
|
||||||
|
language: cpp
|
||||||
|
os: linux
|
||||||
|
before_script:
|
||||||
|
- cd icu4c/source
|
||||||
|
script:
|
||||||
|
- test/hdrtst/testinternalheaders.sh
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
CC=clang
|
CC=clang
|
||||||
CXX=clang++
|
CXX=clang++
|
||||||
|
|
||||||
|
ERROR_EXIT=0
|
||||||
|
|
||||||
# Runtime libraries
|
# Runtime libraries
|
||||||
|
|
||||||
for file in `ls common/*.h`; do
|
for file in `ls common/*.h`; do
|
||||||
@ -16,6 +18,9 @@ for file in `ls common/*.h`; do
|
|||||||
echo '#include "'$file'"' > ht_temp.cpp ;
|
echo '#include "'$file'"' > ht_temp.cpp ;
|
||||||
echo 'void noop() {}' >> ht_temp.cpp ;
|
echo 'void noop() {}' >> ht_temp.cpp ;
|
||||||
$CXX -c -std=c++11 -I common -DU_COMMON_IMPLEMENTATION -O0 ht_temp.cpp ;
|
$CXX -c -std=c++11 -I common -DU_COMMON_IMPLEMENTATION -O0 ht_temp.cpp ;
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
ERROR_EXIT=1
|
||||||
|
fi
|
||||||
done ;
|
done ;
|
||||||
|
|
||||||
for file in `ls i18n/*.h`; do
|
for file in `ls i18n/*.h`; do
|
||||||
@ -23,6 +28,9 @@ for file in `ls i18n/*.h`; do
|
|||||||
echo '#include "'$file'"' > ht_temp.cpp ;
|
echo '#include "'$file'"' > ht_temp.cpp ;
|
||||||
echo 'void noop() {}' >> ht_temp.cpp ;
|
echo 'void noop() {}' >> ht_temp.cpp ;
|
||||||
$CXX -c -std=c++11 -I common -I i18n -DU_I18N_IMPLEMENTATION -O0 ht_temp.cpp ;
|
$CXX -c -std=c++11 -I common -I i18n -DU_I18N_IMPLEMENTATION -O0 ht_temp.cpp ;
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
ERROR_EXIT=1
|
||||||
|
fi
|
||||||
done ;
|
done ;
|
||||||
|
|
||||||
for file in `ls io/*.h`; do
|
for file in `ls io/*.h`; do
|
||||||
@ -30,6 +38,9 @@ for file in `ls io/*.h`; do
|
|||||||
echo '#include "'$file'"' > ht_temp.cpp ;
|
echo '#include "'$file'"' > ht_temp.cpp ;
|
||||||
echo 'void noop() {}' >> ht_temp.cpp ;
|
echo 'void noop() {}' >> ht_temp.cpp ;
|
||||||
$CXX -c -std=c++11 -I common -I i18n -I io -DU_IO_IMPLEMENTATION -O0 ht_temp.cpp ;
|
$CXX -c -std=c++11 -I common -I i18n -I io -DU_IO_IMPLEMENTATION -O0 ht_temp.cpp ;
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
ERROR_EXIT=1
|
||||||
|
fi
|
||||||
done ;
|
done ;
|
||||||
|
|
||||||
# layout is removed.
|
# layout is removed.
|
||||||
@ -51,6 +62,9 @@ for file in `ls tools/toolutil/*.h`; do
|
|||||||
echo '#include "'$file'"' > ht_temp.cpp ;
|
echo '#include "'$file'"' > ht_temp.cpp ;
|
||||||
echo 'void noop() {}' >> ht_temp.cpp ;
|
echo 'void noop() {}' >> ht_temp.cpp ;
|
||||||
$CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -O0 ht_temp.cpp ;
|
$CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -O0 ht_temp.cpp ;
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
ERROR_EXIT=1
|
||||||
|
fi
|
||||||
done ;
|
done ;
|
||||||
|
|
||||||
# Exclude tzcode: tools/tzcode/private.h uses an argument "new" in a function declaration.
|
# Exclude tzcode: tools/tzcode/private.h uses an argument "new" in a function declaration.
|
||||||
@ -65,6 +79,9 @@ for tool in escapesrc genccode gencmn gencolusb gennorm2 genren gentest icupkg i
|
|||||||
echo '#include "'$file'"' > ht_temp.cpp ;
|
echo '#include "'$file'"' > ht_temp.cpp ;
|
||||||
echo 'void noop() {}' >> ht_temp.cpp ;
|
echo 'void noop() {}' >> ht_temp.cpp ;
|
||||||
$CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/$tool -O0 ht_temp.cpp ;
|
$CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/$tool -O0 ht_temp.cpp ;
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
ERROR_EXIT=1
|
||||||
|
fi
|
||||||
done ;
|
done ;
|
||||||
done ;
|
done ;
|
||||||
|
|
||||||
@ -75,6 +92,9 @@ for file in `ls tools/ctestfw/unicode/*.h`; do
|
|||||||
echo '#include "'$file'"' > ht_temp.cpp ;
|
echo '#include "'$file'"' > ht_temp.cpp ;
|
||||||
echo 'void noop() {}' >> ht_temp.cpp ;
|
echo 'void noop() {}' >> ht_temp.cpp ;
|
||||||
$CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -O0 ht_temp.cpp ;
|
$CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -O0 ht_temp.cpp ;
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
ERROR_EXIT=1
|
||||||
|
fi
|
||||||
done ;
|
done ;
|
||||||
|
|
||||||
# C not C++ for cintltst
|
# C not C++ for cintltst
|
||||||
@ -83,6 +103,9 @@ for file in `ls test/cintltst/*.h`; do
|
|||||||
echo '#include "'$file'"' > ht_temp.c ;
|
echo '#include "'$file'"' > ht_temp.c ;
|
||||||
echo 'void noop() {}' >> ht_temp.c ;
|
echo 'void noop() {}' >> ht_temp.c ;
|
||||||
$CC -c -std=c11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -I test/cintltst -O0 ht_temp.c ;
|
$CC -c -std=c11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -I test/cintltst -O0 ht_temp.c ;
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
ERROR_EXIT=1
|
||||||
|
fi
|
||||||
done ;
|
done ;
|
||||||
|
|
||||||
for test in intltest iotest testmap thaitest fuzzer; do
|
for test in intltest iotest testmap thaitest fuzzer; do
|
||||||
@ -91,6 +114,9 @@ for test in intltest iotest testmap thaitest fuzzer; do
|
|||||||
echo '#include "'$file'"' > ht_temp.cpp ;
|
echo '#include "'$file'"' > ht_temp.cpp ;
|
||||||
echo 'void noop() {}' >> ht_temp.cpp ;
|
echo 'void noop() {}' >> ht_temp.cpp ;
|
||||||
$CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -I test/$test -O0 ht_temp.cpp ;
|
$CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -I test/$test -O0 ht_temp.cpp ;
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
ERROR_EXIT=1
|
||||||
|
fi
|
||||||
done ;
|
done ;
|
||||||
done ;
|
done ;
|
||||||
|
|
||||||
@ -106,3 +132,6 @@ done ;
|
|||||||
# TODO: perf/*/*.h
|
# TODO: perf/*/*.h
|
||||||
|
|
||||||
rm ht_temp.cpp ht_temp.c ht_temp.o
|
rm ht_temp.cpp ht_temp.c ht_temp.o
|
||||||
|
|
||||||
|
echo $ERROR_EXIT
|
||||||
|
exit $ERROR_EXIT
|
||||||
|
Loading…
Reference in New Issue
Block a user