From 011f6029eba5c241f411262eb4035f082a1095a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Thu, 25 Apr 2024 09:33:46 +0100 Subject: [PATCH] ci: Cache APT package archives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Edwin Török --- .../workflows/setup-xapi-environment/action.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/setup-xapi-environment/action.yml b/.github/workflows/setup-xapi-environment/action.yml index c3785924e76..22afc9a72a1 100644 --- a/.github/workflows/setup-xapi-environment/action.yml +++ b/.github/workflows/setup-xapi-environment/action.yml @@ -27,6 +27,20 @@ runs: id: dotenv uses: falti/dotenv-action@v1 + # Avoid upstream network blips affecting CI + # Our dependencies are expressed in opam files, + # so reuse cache from jobs with similar opam files + # Dependencies can also change in upstream opam, but more rarely + - name: Cache Ubuntu package downloads + uses: actions/cache@v4 + with: + path: + - /var/cache/apt + - /var/lib/apt/lists + key: ${{ runner.os }}-apt-${{hashFiles('*.opam')}} + restore-keys: | + ${{ runner.os }}-apt- + - name: Update Ubuntu repositories shell: bash run: sudo apt-get update