diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9c5597de7c74fd46eda23fb7b247cff57c985644..c99d71fd6a73fc237413456536436d7a6bb9873f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,9 +24,24 @@ setup: script: - autoreconf -vi + after_script: + - ./gitlab-ci/save_timestamps.sh + aclocal.m4 + build-aux/ + build-macro/ + configure + Makefile.in + src/Makefile.in + src/config.h.in + src/lib/Makefile.in + tests/Makefile.in + > ./restore_timestamps.sh + - chmod +x ./restore_timestamps.sh + artifacts: expire_in: 1 hour paths: + - aclocal.m4 - build-aux/ - build-macro/ - configure @@ -35,9 +50,7 @@ setup: - src/config.h.in - src/lib/Makefile.in - tests/Makefile.in - - tests/no_test.sh.in - - gitlab-ci/upload.sh.in - - gitlab-ci/release.sh.in + - restore_timestamps.sh config: stage: config @@ -47,15 +60,32 @@ config: before_script: - apt update && apt install -y check + - ./restore_timestamps.sh script: - mkdir build - cd build - - ../configure --disable-maintainer-mode + - ../configure + + after_script: + - ./gitlab-ci/save_timestamps.sh + aclocal.m4 + build/ + build-aux/ + build-macro/ + configure + Makefile.in + src/Makefile.in + src/config.h.in + src/lib/Makefile.in + tests/Makefile.in + > ./restore_timestamps.sh + - chmod +x ./restore_timestamps.sh artifacts: expire_in: 1 hour paths: + - aclocal.m4 - build/ - build-aux/ - build-macro/ @@ -65,9 +95,7 @@ config: - src/config.h.in - src/lib/Makefile.in - tests/Makefile.in - - tests/no_test.sh.in - - gitlab-ci/upload.sh.in - - gitlab-ci/release.sh.in + - restore_timestamps.sh compile: stage: build @@ -77,25 +105,47 @@ compile: before_script: - apt update && apt install -y make + - for file in `find . -type f -not -path "./.git/*"`; + do git rev-list -n 1 HEAD $file + | xargs git show -s --format=%ai + | awk -v file=$file + '{system("touch -d \"" $1 " " $2 " " $3 "\" " file)}'; + done + - ./restore_timestamps.sh script: - cd build/ - make + after_script: + - bash ./gitlab-ci/save_timestamps.sh + aclocal.m4 + build/ + build-aux/ + build-macro/ + configure + Makefile.in + src/Makefile.in + src/config.h.in + src/lib/Makefile.in + tests/Makefile.in + > ./restore_timestamps.sh + - chmod +x ./restore_timestamps.sh + artifacts: expire_in: 1 hour paths: + - aclocal.m4 - build/ - build-aux/ + - build-macro/ - configure - Makefile.in - src/Makefile.in - src/config.h.in - src/lib/Makefile.in - tests/Makefile.in - - tests/no_test.sh.in - - gitlab-ci/upload.sh.in - - gitlab-ci/release.sh.in + - restore_timestamps.sh test: stage: build @@ -111,6 +161,7 @@ test: | awk -v file=$file '{system("touch -d \"" $1 " " $2 " " $3 "\" " file)}'; done + - ./restore_timestamps.sh script: - cd build/ @@ -130,6 +181,7 @@ dist: | awk -v file=$file '{system("touch -d \"" $1 " " $2 " " $3 "\" " file)}'; done + - ./restore_timestamps.sh script: - cd build/ diff --git a/Makefile.am b/Makefile.am index bdbc29a9154807ad549decba767ef7c4a9f73a1a..0a287f272a21c45492a785be3414315743c25f47 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,4 +5,6 @@ SUBDIRS += docs SUBDIRS += src SUBDIRS += tests +EXTRA_DIST = gitlab-ci/save_timestamps.sh + ACLOCAL_AMFLAGS = --install -I build-macro diff --git a/configure.ac b/configure.ac index 73666e3c2363e930f2bb36b209e2e03ccc87e9bf..2a534f6de2be32e20373deee2cbba7b5c9583cd1 100644 --- a/configure.ac +++ b/configure.ac @@ -31,14 +31,24 @@ AC_ARG_ENABLE([tests], case ${enable_tests} in yes) PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) + AC_MSG_CHECKING([whether to run tests]) + AC_MSG_RESULT([yes]) ;; no) + AC_MSG_CHECKING([whether to run tests]) + AC_MSG_RESULT([no]) ;; auto) PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], - [enable_tests=yes], [ + AC_MSG_CHECKING([whether to run tests]) + enable_tests=yes + AC_MSG_RESULT([yes]) + ], + [ + AC_MSG_CHECKING([whether to run tests]) enable_tests=no + AC_MSG_RESULT([yes]) AC_MSG_WARN([tests are disabled, due to missing check]) ]) ;; diff --git a/gitlab-ci/save_timestamps.sh b/gitlab-ci/save_timestamps.sh new file mode 100755 index 0000000000000000000000000000000000000000..a927b334430dcab51f9366f8ee9b0cef2f78cdf3 --- /dev/null +++ b/gitlab-ci/save_timestamps.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +echo "#!/bin/sh" +echo + +handle_file () +{ + if [ -f $1 ] + then + stat -c "touch --no-create --date=@%Y %n" $1 + fi + + if [ -d $1 ] + then + for file in `ls $1` + do + handle_file $1/$file + done + fi +} + +for file in $@ +do + handle_file $file +done diff --git a/sefht.geany b/sefht.geany index 184718514c94cf0ad49ff1f01a09cca765d8c67b..1a80e17c8214f347869fcf1cbaf7383d08097d13 100644 --- a/sefht.geany +++ b/sefht.geany @@ -28,10 +28,10 @@ long_line_behaviour=1 long_line_column=72 [files] -current_page=7 +current_page=60 FILE_NAME_0=139;None;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2FREADME;0;8 FILE_NAME_1=161;None;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2F.gitignore;0;8 -FILE_NAME_2=1800;Sh;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fconfigure.ac;0;8 +FILE_NAME_2=1185;Sh;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fconfigure.ac;0;8 FILE_NAME_3=84;Make;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2FMakefile.am;0;8 FILE_NAME_4=73;Make;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2FMakefile.am;0;8 FILE_NAME_5=19;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Fmain.c;0;8 @@ -89,9 +89,10 @@ FILE_NAME_56=926;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fpr FILE_NAME_57=20787;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Ftests%2Ftest_validator_tag.c;0;8 FILE_NAME_58=58751;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Ftests%2Ftest_validator_attr.c;0;8 FILE_NAME_59=626;None;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Ftodo.txt;0;8 -FILE_NAME_60=2938;YAML;0;EUTF-8;0;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2F.gitlab-ci.yml;0;4 +FILE_NAME_60=4391;YAML;0;EUTF-8;0;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2F.gitlab-ci.yml;0;4 FILE_NAME_61=71;Sh;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fgitlab-ci%2Fupload.sh.in;0;8 FILE_NAME_62=683;Sh;0;EUTF-8;0;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fgitlab-ci%2Frelease.sh.in;0;4 +FILE_NAME_63=244;Sh;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fgitlab-ci%2Fsave_timestamps.sh;0;8 [VTE] last_dir=/home/jonathan/Documents/projects/prgm/internet/web/SeFHT/tests