aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-13 14:09:13 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-13 14:12:56 +0000
commit080d9176fa3fc281cf7974b8431a6c5f3be62dab (patch)
treee91234df95ad0136524eda8324b72b9fc6e9c0fd /reproduce
parent50139310e1ec4594da15651ecb8475ab33248cb5 (diff)
Version of programs checked on each run of pipeline
The version of all programs is now checked in `reproduce/make/src/initialize.mk' and the pipeline won't complete if any of the program versions change from those listed in `reproduce/config/pipeline/dependency-versions.mk'. Since the pipeline is systematically checking all program versions, we don't need Gnuastro's `--onlyversion' option any more. So it (and all references to it) have been removed.
Diffstat (limited to 'reproduce')
-rw-r--r--reproduce/config/gnuastro/gnuastro.conf5
-rw-r--r--reproduce/config/pipeline/dependency-versions.mk12
-rw-r--r--reproduce/src/make/initialize.mk41
3 files changed, 41 insertions, 17 deletions
diff --git a/reproduce/config/gnuastro/gnuastro.conf b/reproduce/config/gnuastro/gnuastro.conf
index ce8d990..561df9f 100644
--- a/reproduce/config/gnuastro/gnuastro.conf
+++ b/reproduce/config/gnuastro/gnuastro.conf
@@ -4,9 +4,7 @@
# IMPORTANT NOTE FOR THE REPRODUCTION PIPELINE: The `lastconfig'
# option is very important here, because we don't want any of
# Gnuastro's programs to go into an un-controlled environment (user or
-# system wide configuration files). Uncomment the `onlyversion' option
-# when the paper/pipeline is ready to be published and set the value
-# of X.X accordingly.
+# system wide configuration files).
#
# The rest of this configuration file in this template reproduction
# pipeline is taken from the default Gnuastro configuration from its
@@ -14,7 +12,6 @@
# Reproduction pipeline (`config' has to be before `lastconfig').
config .gnuastro/gnuastro-local.conf
-#onlyversion X.X
lastconfig 1
# Input:
diff --git a/reproduce/config/pipeline/dependency-versions.mk b/reproduce/config/pipeline/dependency-versions.mk
index dac56b1..bf19dc1 100644
--- a/reproduce/config/pipeline/dependency-versions.mk
+++ b/reproduce/config/pipeline/dependency-versions.mk
@@ -1,20 +1,24 @@
# Versions of the various dependnecies
+
+# Programs
bash-version = 4.4.18
-cfitsio-version = 3450
cmake-version = 3.12.4
coreutils-version = 8.30
-curl-version = 7.62.0
gawk-version = 4.2.1
ghostscript-version = 9.25
git-version = 2.19.1
gnuastro-version = 0.7.60-4c9eb
grep-version = 3.1
+make-version = 4.2.90
+sed-version = 4.5
+
+# Libraries
+cfitsio-version = 3450
+curl-version = 7.62.0
gsl-version = 2.5
libjpeg-version = v9b
libgit2-version = 0.26.0
libtiff-version = 4.0.10
libtool-version = 2.4.6
-make-version = 4.2.90
-sed-version = 4.5
wcslib-version = 6.2
zlib-version = 1.2.11
diff --git a/reproduce/src/make/initialize.mk b/reproduce/src/make/initialize.mk
index c5f8620..b8d71c6 100644
--- a/reproduce/src/make/initialize.mk
+++ b/reproduce/src/make/initialize.mk
@@ -145,6 +145,22 @@ distclean: clean
+# Check the version of programs which write their version
+# -------------------------------------------------------
+vercheck = prog="$(strip $(1))"; \
+ ver="$(strip $(2))"; \
+ name="$(strip $(3))"; \
+ macro="$(strip $(4))"; \
+ v=$$($$prog --version | awk '/'$$ver'/{print "y"}'); \
+ if [ x$$v != xy ]; then \
+ echo; echo "PIPELINE ERROR: Not running $$name $$ver"; echo; \
+ exit 1; \
+ fi; \
+ echo "\newcommand{\\$$macro}{$$ver}" >> $@
+
+
+
+
# Pipeline initialization results
# -------------------------------
#
@@ -154,15 +170,22 @@ distclean: clean
# actually exists, it is also aded as a `.PHONY' target above.
$(mtexdir)/initialize.tex: | $(mtexdir)
- # Version of the pipeline.
+ # Version of the pipeline and build directory (for LaTeX inputs).
@v=$$(git describe --dirty --always);
echo "\newcommand{\pipelineversion}{$$v}" > $@
-
-# --------- Delete for no Gnuastro ---------
- # Version of Gnuastro.
- @v=$$(astnoisechisel --version | awk 'NR==1{print $$NF}');
- echo "\newcommand{\gnuastroversion}{$$v}" >> $@
-# ------------------------------------------
-
- # Location of the build directory (for LaTeX inputs).
@echo "\newcommand{\bdir}{$(BDIR)}" >> $@
+
+ # Versions of programs (same order as `dependency-versions.mk').
+ $(call vercheck, bash, $(bash-version), GNU Bash, bashversion)
+ $(call vercheck, cmake, $(cmake-version), CMake, cmakeversion)
+ $(call vercheck, ls, $(coreutils-version), GNU Coreutils, \
+ coreutilsversion)
+ $(call vercheck, awk, $(gawk-version), GNU AWK, gawkversion)
+ $(call vercheck, gs, $(ghostscript-version), GPL Ghostscript, \
+ ghostscriptversion)
+ $(call vercheck, git, $(git-version), Git, gitversion)
+ $(call vercheck, astnoisechisel, $(gnuastro-version), Gnuastro, \
+ gnuastroversion)
+ $(call vercheck, grep, $(grep-version), GNU Grep, grepversion)
+ $(call vercheck, make, $(make-version), GNU Make, makeversion)
+ $(call vercheck, sed, $(sed-version), GNU SED, sedversion)