From fc6b79a5e69a745d8565e8c0febdbc9091aca2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Sun, 7 Aug 2022 19:04:10 +0200 Subject: [PATCH] cache PCRE build in Windows CI jobs (#3770) --- .github/workflows/CI-windows.yml | 14 +++++++++----- .github/workflows/release-windows.yml | 7 +++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index 7d6780987..cc88c4767 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -37,6 +37,7 @@ jobs: python-version: '3.10' - name: Set up Visual Studio environment + if: matrix.arch == 'x64' || matrix.qt_ver == '' uses: ilammy/msvc-dev-cmd@v1 with: arch: ${{ matrix.arch }} @@ -44,18 +45,21 @@ jobs: - name: Cache PCRE id: cache-pcre uses: actions/cache@v2 - if: matrix.arch == 'x64' || matrix.qt_ver == '' + if: matrix.qt_ver == '' with: - path: pcre-${{ env.PCRE_VERSION }}.zip - key: pcre-${{ env.PCRE_VERSION }} + path: | + externals\pcre.h + externals\pcre.lib + externals\pcre64.lib + key: pcre-${{ env.PCRE_VERSION }}-${{ matrix.arch }}-bin-win - name: Download PCRE - if: (matrix.arch == 'x64' || matrix.qt_ver == '') && steps.cache-pcre.outputs.cache-hit != 'true' + if: matrix.qt_ver == '' && steps.cache-pcre.outputs.cache-hit != 'true' run: | curl -fsSL https://github.com/pfultz2/pcre/archive/refs/tags/%PCRE_VERSION%.zip -o pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! - name: Install PCRE - if: matrix.arch == 'x64' || matrix.qt_ver == '' + if: matrix.qt_ver == '' && steps.cache-pcre.outputs.cache-hit != 'true' run: | 7z x pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! cd pcre-%PCRE_VERSION% || exit /b !errorlevel! diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index b250fc9a4..bb7f28a04 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -37,8 +37,10 @@ jobs: id: cache-pcre uses: actions/cache@v2 with: - path: pcre-${{ env.PCRE_VERSION }}.zip - key: pcre-${{ env.PCRE_VERSION }} + path: | + externals\pcre.h + externals\pcre64.lib + key: pcre-${{ env.PCRE_VERSION }}-bin-x64-win-release-job - name: Download PCRE if: steps.cache-pcre.outputs.cache-hit != 'true' @@ -46,6 +48,7 @@ jobs: curl -fsSL https://github.com/pfultz2/pcre/archive/refs/tags/%PCRE_VERSION%.zip -o pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! - name: Install PCRE + if: steps.cache-pcre.outputs.cache-hit != 'true' run: | 7z x pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! cd pcre-%PCRE_VERSION% || exit /b !errorlevel!