From 14c9e07fca1b759617eccdded2d08437bd45c5b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?D=C3=B3ra=20Kocsis?= <dora@dynare.org>
Date: Wed, 1 Apr 2020 15:17:42 +0200
Subject: [PATCH] extend pipeline to Octave and MATLAB 2009b

---
 .gitlab-ci.yml | 16 +++++++++++++++-
 Makefile       |  8 ++++++--
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index af480e6..1e7af87 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,4 +8,18 @@ before_script:
 test_matlab:
   stage: test
   script:
-    - make check-matlab
\ No newline at end of file
+    - make check-matlab
+
+test_old_matlab:
+  stage: test
+  variables:
+    MATLAB: /usr/local/MATLAB/R2009b/bin/matlab
+  script:
+    - make check-matlab
+
+test_octave:
+  stage: test
+  variables:
+    OPENBLAS_NUM_THREADS: 1
+  script:
+    - make check-octave
\ No newline at end of file
diff --git a/Makefile b/Makefile
index 926f34e..6c1b562 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,19 @@
 OCTAVE ?= octave-cli
 MATLAB ?= $(shell which matlab)
 
-all: check-matlab
+all: check-octave check-matlab
 
 m-unit-tests/src/mtest.m:
 	git clone https://git.dynare.org/Dynare/m-unit-tests
 
+check-octave: m-unit-tests/src/mtest.m
+	@cd tests ;\
+	$(OCTAVE) --no-init-file --silent --no-history --eval "addpath([pwd() '/../m-unit-tests/src']); runalltests" && [ ! -f ./failed ] && [ -f ./pass ]
+
 check-matlab: m-unit-tests/src/mtest.m
 	@$(MATLAB)  -nosplash -nodisplay -r "addpath([pwd '/m-unit-tests/src']); cd tests; runalltests; quit" && [ ! -f ./tests/failed ] && [ -f ./tests/pass ]
 
 check-clean:
 	rm -f tests/*_test_*.m tests/*.csv tests/*.xls tests/*.xlsx tests/*.mat tests/failed tests/datafile_for_test
 	rm -f git.info git.last-commit-hash tests/pass tests/failed tests/*.spc
-	rm -rf m-unit-tests
+	rm -rf m-unit-tests
\ No newline at end of file
-- 
GitLab