From 4fd63d2bf0ca7030e501f5772eb4bc6adcc7b737 Mon Sep 17 00:00:00 2001 From: sasha0552 Date: Wed, 22 May 2024 02:49:26 +0000 Subject: [PATCH] [misc] Cache packages --- .ci/template/gh-build-iso.yml.jinja2 | 10 ++++++++-- .ci/template/sh-build-iso.yml.jinja2 | 10 ++++++++-- .github/workflows/gh-build-iso-cuda-empty.yml | 10 ++++++++-- .github/workflows/gh-build-iso-cuda-gui.yml | 10 ++++++++-- .github/workflows/gh-build-iso-cuda.yml | 10 ++++++++-- .github/workflows/gh-build-iso-rocm-empty.yml | 10 ++++++++-- .github/workflows/sh-build-iso-rocm-gui.yml | 10 ++++++++-- .github/workflows/sh-build-iso-rocm.yml | 10 ++++++++-- 8 files changed, 64 insertions(+), 16 deletions(-) diff --git a/.ci/template/gh-build-iso.yml.jinja2 b/.ci/template/gh-build-iso.yml.jinja2 index 8cbe130..ddb0ee6 100644 --- a/.ci/template/gh-build-iso.yml.jinja2 +++ b/.ci/template/gh-build-iso.yml.jinja2 @@ -26,12 +26,18 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Cache packages + uses: actions/cache@v4 + with: + key: packages + path: /var/cache/pacman/pkg + - name: Build image uses: addnab/docker-run-action@v3 with: image: archlinux:latest {% raw %} - options: --privileged --volume ${{ github.workspace }}:/workspace + options: --privileged --rm --volume /var/cache/pacman/pkg:/var/cache/pacman/pkg --volume ${{ github.workspace }}:/workspace {% endraw %} run: | # Exit on error @@ -55,7 +61,7 @@ jobs: popd # Build image - mkarchiso -v -m iso -w /_work -o /workspace/out /workspace + mkarchiso -v -m iso -w /var/tmp/work -o /workspace/out /workspace - name: Create summary run: | diff --git a/.ci/template/sh-build-iso.yml.jinja2 b/.ci/template/sh-build-iso.yml.jinja2 index cb0fe62..9fc9e01 100644 --- a/.ci/template/sh-build-iso.yml.jinja2 +++ b/.ci/template/sh-build-iso.yml.jinja2 @@ -44,12 +44,18 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Cache packages + uses: actions/cache@v4 + with: + key: packages + path: /var/cache/pacman/pkg + - name: Build image uses: addnab/docker-run-action@v3 with: image: archlinux:latest {% raw %} - options: --privileged --rm --volume ${{ github.workspace }}:/workspace + options: --privileged --rm --volume /var/cache/pacman/pkg:/var/cache/pacman/pkg --volume ${{ github.workspace }}:/workspace {% endraw %} run: | # Exit on error @@ -73,7 +79,7 @@ jobs: popd # Build image - mkarchiso -v -m iso -w /_work -o /workspace/out /workspace + mkarchiso -v -m iso -w /var/tmp/work -o /workspace/out /workspace - name: Create summary run: | diff --git a/.github/workflows/gh-build-iso-cuda-empty.yml b/.github/workflows/gh-build-iso-cuda-empty.yml index 8a284a5..0768f44 100644 --- a/.github/workflows/gh-build-iso-cuda-empty.yml +++ b/.github/workflows/gh-build-iso-cuda-empty.yml @@ -20,12 +20,18 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Cache packages + uses: actions/cache@v4 + with: + key: packages + path: /var/cache/pacman/pkg + - name: Build image uses: addnab/docker-run-action@v3 with: image: archlinux:latest - options: --privileged --volume ${{ github.workspace }}:/workspace + options: --privileged --rm --volume /var/cache/pacman/pkg:/var/cache/pacman/pkg --volume ${{ github.workspace }}:/workspace run: | # Exit on error set -eu @@ -46,7 +52,7 @@ jobs: popd # Build image - mkarchiso -v -m iso -w /_work -o /workspace/out /workspace + mkarchiso -v -m iso -w /var/tmp/work -o /workspace/out /workspace - name: Create summary run: | diff --git a/.github/workflows/gh-build-iso-cuda-gui.yml b/.github/workflows/gh-build-iso-cuda-gui.yml index f277478..08dd658 100644 --- a/.github/workflows/gh-build-iso-cuda-gui.yml +++ b/.github/workflows/gh-build-iso-cuda-gui.yml @@ -24,12 +24,18 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Cache packages + uses: actions/cache@v4 + with: + key: packages + path: /var/cache/pacman/pkg + - name: Build image uses: addnab/docker-run-action@v3 with: image: archlinux:latest - options: --privileged --volume ${{ github.workspace }}:/workspace + options: --privileged --rm --volume /var/cache/pacman/pkg:/var/cache/pacman/pkg --volume ${{ github.workspace }}:/workspace run: | # Exit on error set -eu @@ -48,7 +54,7 @@ jobs: popd # Build image - mkarchiso -v -m iso -w /_work -o /workspace/out /workspace + mkarchiso -v -m iso -w /var/tmp/work -o /workspace/out /workspace - name: Create summary run: | diff --git a/.github/workflows/gh-build-iso-cuda.yml b/.github/workflows/gh-build-iso-cuda.yml index 69600f7..16eb930 100644 --- a/.github/workflows/gh-build-iso-cuda.yml +++ b/.github/workflows/gh-build-iso-cuda.yml @@ -24,12 +24,18 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Cache packages + uses: actions/cache@v4 + with: + key: packages + path: /var/cache/pacman/pkg + - name: Build image uses: addnab/docker-run-action@v3 with: image: archlinux:latest - options: --privileged --volume ${{ github.workspace }}:/workspace + options: --privileged --rm --volume /var/cache/pacman/pkg:/var/cache/pacman/pkg --volume ${{ github.workspace }}:/workspace run: | # Exit on error set -eu @@ -48,7 +54,7 @@ jobs: popd # Build image - mkarchiso -v -m iso -w /_work -o /workspace/out /workspace + mkarchiso -v -m iso -w /var/tmp/work -o /workspace/out /workspace - name: Create summary run: | diff --git a/.github/workflows/gh-build-iso-rocm-empty.yml b/.github/workflows/gh-build-iso-rocm-empty.yml index 462268e..c723dab 100644 --- a/.github/workflows/gh-build-iso-rocm-empty.yml +++ b/.github/workflows/gh-build-iso-rocm-empty.yml @@ -24,12 +24,18 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Cache packages + uses: actions/cache@v4 + with: + key: packages + path: /var/cache/pacman/pkg + - name: Build image uses: addnab/docker-run-action@v3 with: image: archlinux:latest - options: --privileged --volume ${{ github.workspace }}:/workspace + options: --privileged --rm --volume /var/cache/pacman/pkg:/var/cache/pacman/pkg --volume ${{ github.workspace }}:/workspace run: | # Exit on error set -eu @@ -50,7 +56,7 @@ jobs: popd # Build image - mkarchiso -v -m iso -w /_work -o /workspace/out /workspace + mkarchiso -v -m iso -w /var/tmp/work -o /workspace/out /workspace - name: Create summary run: | diff --git a/.github/workflows/sh-build-iso-rocm-gui.yml b/.github/workflows/sh-build-iso-rocm-gui.yml index a2e9704..e5c4378 100644 --- a/.github/workflows/sh-build-iso-rocm-gui.yml +++ b/.github/workflows/sh-build-iso-rocm-gui.yml @@ -43,12 +43,18 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Cache packages + uses: actions/cache@v4 + with: + key: packages + path: /var/cache/pacman/pkg + - name: Build image uses: addnab/docker-run-action@v3 with: image: archlinux:latest - options: --privileged --rm --volume ${{ github.workspace }}:/workspace + options: --privileged --rm --volume /var/cache/pacman/pkg:/var/cache/pacman/pkg --volume ${{ github.workspace }}:/workspace run: | # Exit on error set -eu @@ -67,7 +73,7 @@ jobs: popd # Build image - mkarchiso -v -m iso -w /_work -o /workspace/out /workspace + mkarchiso -v -m iso -w /var/tmp/work -o /workspace/out /workspace - name: Create summary run: | diff --git a/.github/workflows/sh-build-iso-rocm.yml b/.github/workflows/sh-build-iso-rocm.yml index a570628..986b400 100644 --- a/.github/workflows/sh-build-iso-rocm.yml +++ b/.github/workflows/sh-build-iso-rocm.yml @@ -43,12 +43,18 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Cache packages + uses: actions/cache@v4 + with: + key: packages + path: /var/cache/pacman/pkg + - name: Build image uses: addnab/docker-run-action@v3 with: image: archlinux:latest - options: --privileged --rm --volume ${{ github.workspace }}:/workspace + options: --privileged --rm --volume /var/cache/pacman/pkg:/var/cache/pacman/pkg --volume ${{ github.workspace }}:/workspace run: | # Exit on error set -eu @@ -67,7 +73,7 @@ jobs: popd # Build image - mkarchiso -v -m iso -w /_work -o /workspace/out /workspace + mkarchiso -v -m iso -w /var/tmp/work -o /workspace/out /workspace - name: Create summary run: |