Skip to content

Commit

Permalink
[misc] Cache packages
Browse files Browse the repository at this point in the history
  • Loading branch information
sasha0552 authored May 22, 2024
1 parent 285b86f commit 4fd63d2
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 16 deletions.
10 changes: 8 additions & 2 deletions .ci/template/gh-build-iso.yml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
10 changes: 8 additions & 2 deletions .ci/template/sh-build-iso.yml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/gh-build-iso-cuda-empty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/gh-build-iso-cuda-gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/gh-build-iso-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/gh-build-iso-rocm-empty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/sh-build-iso-rocm-gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/sh-build-iso-rocm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down

0 comments on commit 4fd63d2

Please sign in to comment.