diff --git a/.github/workflows/cpp-build.yml b/.github/workflows/cpp-build.yml index d8abbe1..4cad7c9 100644 --- a/.github/workflows/cpp-build.yml +++ b/.github/workflows/cpp-build.yml @@ -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 \