From 344c734a600b1b12c5721e45f88d447fb668a2f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Thu, 19 Sep 2019 14:37:32 +0200
Subject: [PATCH] Add job to test against old MATLAB (R2009b)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Also shorten test names, because “testsuite_old_matlab” is too long and gets
truncated on the web interface.
---
 .gitlab-ci.yml | 14 ++++++++++++--
 Makefile       |  4 ++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1f51a5b..0bc8db5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
 before_script:
   - git clone https://git.dynare.org/Dynare/dseries.git
 
-testsuite_matlab:
+test_matlab:
   stage: test
   script:
     - make check-matlab
@@ -9,7 +9,17 @@ testsuite_matlab:
     paths:
       - test/my/report/dir/report.pdf
 
-testsuite_octave:
+test_old_matlab:
+  stage: test
+  variables:
+    MATLAB: /usr/local/MATLAB/R2009b/bin/matlab
+  script:
+    - make check-matlab
+  artifacts:
+    paths:
+      - test/my/report/dir/report.pdf
+
+test_octave:
   stage: test
   script:
     - make check-octave
diff --git a/Makefile b/Makefile
index 41ac96e..6b5a366 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-OCTAVE=octave-cli
-MATLAB=`which matlab`
+OCTAVE ?= octave-cli
+MATLAB ?= $(shell which matlab)
 
 all: check-octave check-matlab
 
-- 
GitLab