use apt cache

This commit is contained in:
tequ
2025-11-28 13:59:27 +09:00
parent 1b86cdc256
commit d4f4c2bc6c

View File

@@ -174,6 +174,21 @@ jobs:
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
f.write(f"matrix={output}\n")
apt-cache:
runs-on: [self-hosted, generic, 20.04]
container:
image: ubuntu:24.04
volumes:
- /home/runner/.apt-cache:/var/cache/apt
steps:
- name: Install build dependencies to save apt cache
run: |
apt-get update
apt-get install -y software-properties-common
add-apt-repository ppa:ubuntu-toolchain-r/test -y
apt-get update
apt-get install -y python3 python-is-python3 pipx cmake ninja-build ccache perl libsqlite3-dev
build:
needs: matrix-setup
runs-on: [self-hosted, generic, 20.04]
@@ -183,6 +198,8 @@ jobs:
- /home/runner/.conan-cache:/.conan-cache
- /home/runner/.ccache-main:/github/home/.ccache-main
- /home/runner/.ccache-current:/github/home/.ccache-current
# apt cache as readonly
- /home/runner/.apt-cache:/var/cache/apt:ro
defaults:
run:
shell: bash
@@ -202,6 +219,7 @@ jobs:
- name: Install build dependencies
run: |
# install dependencies from apt cache
apt-get update
apt-get install -y software-properties-common
add-apt-repository ppa:ubuntu-toolchain-r/test -y