[gtk-doc/wip/smcv/dist-meson-build: 3/3] CI: Check that Meson tests can pass from an Autotools dist tarball




commit 2caae31ee50017e6a8b4966f3da24705606f98fd
Author: Simon McVittie <smcv debian org>
Date:   Fri Aug 21 15:54:10 2020 +0100

    CI: Check that Meson tests can pass from an Autotools dist tarball
    
    This allows the Autotools dist tarball to continue to be used as the
    official release artifact, while still allowing distributors to try
    Meson builds.
    
    To help to debug this if it fails, the meson-build step records a
    list of all files in git (ideally we'd use 'meson dist' but the
    container image doesn't currently include git, so this is the next
    best thing), while the meson-from-tarball step records a list of all
    files in the tarball. They are in a normalized order that can be diff'ed.
    
    Tests: #109
    Signed-off-by: Simon McVittie <smcv debian org>

 .gitlab-ci.yml | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 82ff02e..22edb06 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,8 +12,12 @@ autotools-build:
   script:
     - ./autogen.sh --prefix=/usr
     - make
+    - make dist
   except:
     - tags
+  artifacts:
+    paths:
+      - gtk-doc-*.tar.*
 
 autotools-test:
   stage: test
@@ -33,6 +37,7 @@ autotools-test:
 meson-build:
   stage: build
   script:
+    - find . -name .git -prune -o -print | LC_ALL=C sort -u > git-filelist.txt
     - meson --prefix /usr _build .
     - ninja -C _build
     - meson test -C _build
@@ -42,6 +47,25 @@ meson-build:
     when: always
     paths:
       - _build/meson-logs/*
+      - git-filelist.txt
+
+meson-from-tarball:
+  stage: test
+  dependencies:
+    - autotools-build
+  variables:
+    GIT_STRATEGY: none
+  script:
+    - tar -xvf gtk-doc-*.tar.*
+    - ( cd gtk-doc-*/; find . -name .git -prune -o -print ) | LC_ALL=C sort -u > tar-filelist.txt
+    - ( cd gtk-doc-*/; meson --prefix /usr ../_build . )
+    - ninja -C _build
+    - meson test -C _build
+  artifacts:
+    when: on_failure
+    paths:
+      - _build/meson-logs/*.log
+      - tar-filelist.txt
 
 # common
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]