CI: get rid of snap and speed up CI (#13938)

Commit: 
https://github.com/vim/vim/commit/0a3d36968737ad70bf234b6cc438230911b14f9c
Author: Philip H <[email protected]>
Date:   Wed Jan 31 20:04:22 2024 +0100

    CI: get rid of snap and speed up CI 
(https://github.com/vim/vim/issues/13938)
    
    Signed-off-by: Philip H <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 726de4e51..ebac88216 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -90,6 +90,10 @@ jobs:
       - run: sudo dpkg --add-architecture i386
         if: matrix.architecture == 'i386'
 
+      - name: Uninstall snap
+        run: |
+          sudo bash ci/remove_snap.sh
+
       - name: Install packages
         run: |
           PKGS=( \
diff --git a/Filelist b/Filelist
index d4fbca342..a3b66f11d 100644
--- a/Filelist
+++ b/Filelist
@@ -20,6 +20,7 @@ SRC_ALL =     \
                ci/config.mk*.sed \
                ci/if_ver*.vim \
                ci/setup-xvfb.sh \
+               ci/remove_snap.sh \
                src/Make_all.mak \
                src/README.md \
                src/alloc.c \
diff --git a/ci/remove_snap.sh b/ci/remove_snap.sh
new file mode 100644
index 000000000..a812307d3
--- /dev/null
+++ b/ci/remove_snap.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env sh
+pushd /etc/apt/preferences.d/
+cat > nosnap.pref <<EOF
+# To prevent repository packages from triggering the installation of snap,
+# this file forbids snapd from being installed by APT.
+
+Package: snapd
+Pin: release a=*
+Pin-Priority: -10
+EOF
+popd
+snap remove --purge $(snap list | awk '!/^Name|^core/ {print $1}')
+apt-get purge -y snapd

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1rVG39-005wBk-FY%40256bit.org.

Raspunde prin e-mail lui