summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml11
-rwxr-xr-xtools/ci/jobs/imagemagiccheck.sh20
-rwxr-xr-xtools/ci/scripts/icccheckfile.sh7
3 files changed, 38 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d2c16f3ef..788f5e08f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -147,6 +147,17 @@ pngcheck:
when: on_failure
expire_in: 3 week
+icccheck:
+ stage: prebuild
+ script:
+ - ./tools/ci/jobs/imagemagiccheck.sh
+ image: debian:unstable
+ artifacts:
+ paths:
+ - logs
+ when: on_failure
+ expire_in: 3 week
+
# tests
gcc-5_sanitize_tests:
diff --git a/tools/ci/jobs/imagemagiccheck.sh b/tools/ci/jobs/imagemagiccheck.sh
new file mode 100755
index 000000000..3d7476868
--- /dev/null
+++ b/tools/ci/jobs/imagemagiccheck.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+source ./tools/ci/scripts/init.sh
+
+aptget_install imagemagick
+
+export LOG="logs/icccheck.log"
+
+mkdir logs
+rm ${LOG}
+
+find $DIR -type f -name "*.png" -exec ./tools/ci/scripts/icccheckfile.sh {} \; >${LOG}
+check_error $?
+
+export RES=$(cat ${LOG})
+if [[ -n "${RES}" ]]; then
+ echo "Detected icc profiles"
+ cat ${LOG}
+ exit 1
+fi
diff --git a/tools/ci/scripts/icccheckfile.sh b/tools/ci/scripts/icccheckfile.sh
new file mode 100755
index 000000000..5dfd2f80f
--- /dev/null
+++ b/tools/ci/scripts/icccheckfile.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+identify -verbose $1 | grep profile >/dev/null
+
+if [ "$?" == 0 ]; then
+ echo "ICC profile found for image $1"
+fi