From a5d70785810a5a92204fb09b7bd1b340f7f28627 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 29 Jan 2021 10:23:23 +0100
Subject: [PATCH] CI: simplify artifact paths using double glob star

This was introduced in Gitlab 13.0.

By the way, this ensures that test artifacts which are deep in the directory
hierarchy (such as those for the MoM tooblox) are also taken into account.
---
 .gitlab-ci.yml | 31 +++++++++----------------------
 1 file changed, 9 insertions(+), 22 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 53320507f3..8a6b52981b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -42,10 +42,8 @@ build_binaries:
       - dynare++/src/*_tab.cc
       - dynare++/src/*_tab.hh
       - dynare++/src/*_ll.cc
-      - dynare++/*/*.o
-      - dynare++/*/*.a
-      - dynare++/*/*/*.o
-      - dynare++/*/*/*.a
+      - dynare++/**/*.o
+      - dynare++/**/*.a
       - dynare++/integ/src/quadrature-points
       - dynare++/src/dynare++
     expire_in: 3 days
@@ -59,8 +57,7 @@ build_doc:
   artifacts:
     paths:
       - doc/manual/build/
-      - doc/*.pdf
-      - doc/*/*.pdf
+      - doc/**/*.pdf
       - dynare++/doc/*.pdf
       - preprocessor/doc/*/*.pdf
     expire_in: 3 days
@@ -122,14 +119,9 @@ pkg_macOS:
   stage: test
   artifacts:
     paths:
-      - tests/*.m.log
-      - tests/*.m.trs
-      - tests/*/*.m.log
-      - tests/*/*.m.trs
-      - tests/*/*.jnl
-      - tests/*/*/*.m.log
-      - tests/*/*/*.m.trs
-      - tests/*/*/*.jnl
+      - tests/**/*.m.log
+      - tests/**/*.m.trs
+      - tests/**/*.jnl
       - tests/run_test_matlab_output.txt
     when: always
   needs: [ "build_binaries" ]
@@ -161,14 +153,9 @@ test_octave:
     - make -j $(nproc) -C tests check-octave
   artifacts:
     paths:
-      - tests/*.o.log
-      - tests/*.o.trs
-      - tests/*/*.o.log
-      - tests/*/*.o.trs
-      - tests/*/*.jnl
-      - tests/*/*/*.o.log
-      - tests/*/*/*.o.trs
-      - tests/*/*/*.jnl
+      - tests/**/*.o.log
+      - tests/**/*.o.trs
+      - tests/**/*.jnl
       - tests/run_test_octave_output.txt
     when: always
   needs: [ "build_binaries" ]
-- 
GitLab