[Spice-devel] [spice-gtk v2 4/5] gitlab-ci: add artifacts for logs and tests

Victor Toso victortoso at redhat.com
Thu Feb 14 10:10:15 UTC 2019


From: Victor Toso <me at victortoso.com>

Much better than playing around with shell. Logs should live for week
since the build and CI will try to always upload them.

This patch also adds the logs for tests from builds with autotools

Signed-off-by: Victor Toso <victortoso at redhat.com>
---
 .gitlab-ci.yml | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 82af077..e42b87f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,6 +18,12 @@ variables:
               mingw64-gstreamer1-plugins-base mingw64-gstreamer1-plugins-good
 
 fedora-autotools:
+  artifacts:
+    paths:
+      - tests/*.log
+    when: always
+    expire_in: 1 week
+
   before_script:
     - dnf install -y $DEPS_COMMON $DEPS_FEDORA
     - git clone ${CI_REPOSITORY_URL/spice-gtk/spice-protocol}
@@ -42,6 +48,12 @@ fedora-autotools:
     - make check
 
 fedora-meson:
+  artifacts:
+    paths:
+      - build-*/meson-logs/*.txt
+    when: always
+    expire_in: 1 week
+
   before_script:
     - dnf install -y $DEPS_COMMON $DEPS_FEDORA
     - git clone ${CI_REPOSITORY_URL/spice-gtk/spice-protocol}
@@ -49,13 +61,13 @@ fedora-meson:
     - ninja -C build-spice-protocol install
 
   script:
-    - meson build-default || (cat build-default/meson-logs/meson-log.txt && exit 1)
+    - meson build-default
     - ninja -C build-default
-    - ninja -C build-default test || (cat build-default/meson-logs/testlog.txt && exit 1)
+    - ninja -C build-default test
 
-    - meson build-feat-disabled -Dauto_features=disabled || (cat build-feat-disabled/meson-logs/meson-log.txt && exit 1)
+    - meson build-feat-disabled -Dauto_features=disabled
     - ninja -C build-feat-disabled
-    - ninja -C build-feat-disabled test || (cat build-feat-disabled/meson-logs/testlog.txt && exit 1)
+    - ninja -C build-feat-disabled test
 
 windows-autotools:
   before_script:
-- 
2.20.1



More information about the Spice-devel mailing list