From 7cb95cb3f62d7b28a51c283dc3a7fe7dc7c4edb6 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Sat, 18 Feb 2023 14:49:21 +0100 Subject: [PATCH] CI: Cache dependency builds for macOS and Windows --- .github/workflows/main.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88879ceb..16f6e75a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -113,7 +113,11 @@ jobs: id: ccache-cache uses: actions/cache@v3 with: - path: ${{ github.workspace }}/.ccache + path: | + ${{ github.workspace }}/.ccache + ${{ github.workspace }}/plugin/deps/opencv/build_* + ${{ github.workspace }}/plugin/deps/leptonica/build_* + ${{ github.workspace }}/plugin/deps/tesseract/build* key: macos-${{ matrix.arch }}-ccache-plugin-${{ steps.setup.outputs.ccacheDate }} restore-keys: | macos-${{ matrix.arch }}-ccache-plugin- @@ -221,7 +225,8 @@ jobs: id: ccache-cache uses: actions/cache@v3 with: - path: ${{ github.workspace }}/.ccache + path: | + ${{ github.workspace }}/.ccache key: linux-${{ matrix.arch }}-ccache-plugin-${{ steps.setup.outputs.ccacheDate }} restore-keys: | linux-${{ matrix.arch }}-ccache-plugin- @@ -301,9 +306,24 @@ jobs: id: setup run: | ## SETUP ENVIRONMENT SCRIPT + $CcacheDate = (Get-Date -Format "yyyy-M-d") + "ccacheDate=${CcacheDate}" >> $env:GITHUB_OUTPUT $CommitHash = (git rev-parse HEAD)[0..8] -join '' "commitHash=${CommitHash}" >> $env:GITHUB_OUTPUT + - name: Restore Compilation Cache + id: ccache-cache + uses: actions/cache@v3 + with: + path: | + ${{ github.workspace }}/.ccache + ${{ github.workspace }}/plugin/deps/opencv/build_* + ${{ github.workspace }}/plugin/deps/leptonica/build_* + ${{ github.workspace }}/plugin/deps/tesseract/build* + key: windows-${{ matrix.arch }}-ccache-plugin-${{ steps.setup.outputs.ccacheDate }} + restore-keys: | + windows-${{ matrix.arch }}-ccache-plugin- + - name: Check for GitHub Labels id: seekingTesters working-directory: ${{ github.workspace }}/plugin