Skip to content

Commit d9deacb

Browse files
committed
Add APT package cache to reduce installation time
This commit implements APT package caching for Linux jobs to avoid re-downloading packages on every workflow run, reducing network usage and improving CI performance.
1 parent 0b744b0 commit d9deacb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ jobs:
4141
key: ${{ runner.os }}-submodules-${{ hashFiles('.gitmodules', 'mini-gdbstub/**', 'minislirp/**') }}
4242
restore-keys: |
4343
${{ runner.os }}-submodules-
44+
- name: cache apt packages
45+
uses: actions/cache@v4
46+
with:
47+
path: /var/cache/apt/archives
48+
key: ${{ runner.os }}-apt-${{ hashFiles('.github/actions/setup-semu/action.yml') }}
49+
restore-keys: |
50+
${{ runner.os }}-apt-
4451
- name: install-dependencies
4552
uses: ./.github/actions/setup-semu
4653
- name: install sound multiplexer ${{ matrix.dependency }}
@@ -104,6 +111,13 @@ jobs:
104111
pull-requests: write
105112
steps:
106113
- uses: actions/checkout@v4
114+
- name: cache apt packages
115+
uses: actions/cache@v4
116+
with:
117+
path: /var/cache/apt/archives
118+
key: ${{ runner.os }}-apt-clang-format-18
119+
restore-keys: |
120+
${{ runner.os }}-apt-
107121
- name: Install clang-format
108122
run: |
109123
sudo apt-get update

0 commit comments

Comments
 (0)