Add mechanisms to reformant and check code style (#128)
[openjpeg.git] / tools / travis-ci / run.sh
index 35d2473efaff0952944f2a321c2c9e8e55b937a3..950a0ee9146876d1a812618dcf30ef3f0cab00bb 100755 (executable)
@@ -30,6 +30,16 @@ if [ "${OPJ_CI_ABI_CHECK:-}" == "1" ]; then
        exit 0
 fi
 
+if [ "${OPJ_CI_CC:-}" != "" ]; then
+    export CC=${OPJ_CI_CC}
+    echo "Using ${CC}"
+fi
+
+if [ "${OPJ_CI_CXX:-}" != "" ]; then
+    export CXX=${OPJ_CI_CXX}
+    echo "Using ${CXX}"
+fi
+
 # Set-up some variables
 if [ "${OPJ_CI_BUILD_CONFIGURATION:-}" == "" ]; then
        export OPJ_CI_BUILD_CONFIGURATION=Release #default
@@ -191,6 +201,15 @@ fi
 # ignore ctest exit code & parse this ourselves
 set +x
 
+
+
+if [ "${OPJ_CI_CHECK_STYLE:-}" == "1" ]; then
+    export OPJSTYLE=${PWD}/scripts/opjstyle
+    export PATH=${HOME}/.local/bin:${PATH}
+    scripts/verify-indentation.sh
+fi
+
+
 # Deployment if needed
 #---------------------
 if [ "${TRAVIS_TAG:-}" != "" ]; then