[gnome-builder] CI: Workaround cache misses.



commit d1a4e037a77cca22af04f53ea4347790ceaf4726
Author: Jordan Petridis <jordanpetridis protonmail com>
Date:   Sat Jul 28 01:01:03 2018 +0000

    CI: Workaround cache misses.
    
    Gitlab CI by default zips it's cache target which causes the files
    to lose their xattributes that ostree relies upon.
    
    This workaround makes a tarball of the cache target first, which is then
    zipped by the Gitlab CI. Then on before_sciprt it extracts it in place.
    
    Hopefully tarballs will be the default behavior in the Futureā„¢ and this
    commit will get reverted.
    
    Relevant issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/37444

 .gitlab-ci.yml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dadb72f21..dd7306449 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,6 +21,8 @@ flatpak:
         MESON_ARGS: "--buildtype=debugoptimized -Dctags_path=/app/bin/ctags -Dfusermount_wrapper=true 
-Dwith_tcmalloc=true -Denable_tracing=true -Dwith_help=true -Dwith_channel=flatpak-nightly 
-Dwith_deviced=true"
         DBUS_ID: "org.gnome.Builder"
 
+    before_script:
+        - tar -xzf cache.tar.gz .flatpak-builder/cache/ || true
     script:
         - flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
         # Make sure to keep this in sync with the Flatpak manifest, all arguments
@@ -33,6 +35,8 @@ flatpak:
         # - xvfb-run -a -s "-screen 0 1024x768x24" flatpak build app ninja -C _build test
         # Generate a Flatpak bundle
         - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${DBUS_ID}
+    after_script:
+        - tar -czf cache.tar.gz .flatpak-builder/cache/
 
     artifacts:
         paths:
@@ -42,7 +46,7 @@ flatpak:
         expire_in: 30 days
     cache:
         paths:
-             - .flatpak-builder/cache
+             - cache.tar.gz
 
 review:
     stage: review


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