From 90676af40c17b7a69e3de4529f1eb78e6c07789a Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Wed, 18 Dec 2024 22:00:08 +0900 Subject: [PATCH] workflows: cache apt packages Signed-off-by: Ophestra Umiker --- .gitea/workflows/test.yml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 226f296..c0a5c45 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -11,19 +11,23 @@ jobs: container: image: node:16-bookworm-slim steps: - - name: Get dependencies + - name: Enable backports run: >- - echo 'deb http://deb.debian.org/debian bookworm-backports main' >> /etc/apt/sources.list.d/backports.list && - apt-get update && - apt-get install -y - acl - git - gcc - pkg-config - libwayland-dev - wayland-protocols/bookworm-backports - libxcb1-dev - libacl1-dev + echo 'deb http://deb.debian.org/debian bookworm-backports main' >> /etc/apt/sources.list.d/backports.list + if: ${{ runner.os == 'Linux' }} + + - name: Get dependencies + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: acl git gcc pkg-config libwayland-dev libxcb1-dev libacl1-dev + version: 1.0 + debug: true + execute_install_scripts: true + if: ${{ runner.os == 'Linux' }} + + - name: Install wayland-protocols + run: >- + sudo apt-get update && sudo apt-get install -y wayland-protocols/bookworm-backports if: ${{ runner.os == 'Linux' }} - name: Checkout