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 Jul 2, 2024
1 parent 7c8b051 commit e518032
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/cpp-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,28 @@ 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 }}
shell: alpine.sh --root {0}
- 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 e518032

Please sign in to comment.