Skip to content

Commit

Permalink
ci: Cache alpine packages
Browse files Browse the repository at this point in the history
  • Loading branch information
taminob committed Nov 26, 2024
1 parent 7c8b051 commit 9ac8adf
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/cpp-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,27 @@ jobs:
- cpp_compiler: "clang++"
alpine_version: "v3.20"
cpp17_compatibility: "ON"
env:
apk_package_cache: "/var/cache/apk"
steps:
- uses: actions/checkout@v3
- uses: jirutka/setup-alpine@v1
with:
branch: ${{ matrix.alpine_version }}
- name: Install dependencies
- name: Cache alpine packages
id: cache-dependencies
uses: actions/cache@v3
env:
cache-name: cache-alpine-packages
with:
path: ${{ env.apk_package_cache }}
key: ${{ runner.os }}-${{ env.cache-name }}
- if: ${{ steps.cache-dependencies.outputs.cache-hit != 'true' }}
name: Install dependencies
run: |
apk update
apk add alpine-conf # install setup-apkcache
setup-apkcache ${{ env.apk_package_cache }}
apk add \
cmake \
ninja-build \
Expand Down

0 comments on commit 9ac8adf

Please sign in to comment.