cache PCRE build in Windows CI jobs (#3770)

This commit is contained in:
Oliver Stöneberg 2022-08-07 19:04:10 +02:00 committed by GitHub
parent 271213cbbd
commit fc6b79a5e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 7 deletions

View File

@ -37,6 +37,7 @@ jobs:
python-version: '3.10' python-version: '3.10'
- name: Set up Visual Studio environment - name: Set up Visual Studio environment
if: matrix.arch == 'x64' || matrix.qt_ver == ''
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
with: with:
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}
@ -44,18 +45,21 @@ jobs:
- name: Cache PCRE - name: Cache PCRE
id: cache-pcre id: cache-pcre
uses: actions/cache@v2 uses: actions/cache@v2
if: matrix.arch == 'x64' || matrix.qt_ver == '' if: matrix.qt_ver == ''
with: with:
path: pcre-${{ env.PCRE_VERSION }}.zip path: |
key: pcre-${{ env.PCRE_VERSION }} externals\pcre.h
externals\pcre.lib
externals\pcre64.lib
key: pcre-${{ env.PCRE_VERSION }}-${{ matrix.arch }}-bin-win
- name: Download PCRE - 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: | run: |
curl -fsSL https://github.com/pfultz2/pcre/archive/refs/tags/%PCRE_VERSION%.zip -o pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! curl -fsSL https://github.com/pfultz2/pcre/archive/refs/tags/%PCRE_VERSION%.zip -o pcre-%PCRE_VERSION%.zip || exit /b !errorlevel!
- name: Install PCRE - name: Install PCRE
if: matrix.arch == 'x64' || matrix.qt_ver == '' if: matrix.qt_ver == '' && steps.cache-pcre.outputs.cache-hit != 'true'
run: | run: |
7z x pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! 7z x pcre-%PCRE_VERSION%.zip || exit /b !errorlevel!
cd pcre-%PCRE_VERSION% || exit /b !errorlevel! cd pcre-%PCRE_VERSION% || exit /b !errorlevel!

View File

@ -37,8 +37,10 @@ jobs:
id: cache-pcre id: cache-pcre
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: pcre-${{ env.PCRE_VERSION }}.zip path: |
key: pcre-${{ env.PCRE_VERSION }} externals\pcre.h
externals\pcre64.lib
key: pcre-${{ env.PCRE_VERSION }}-bin-x64-win-release-job
- name: Download PCRE - name: Download PCRE
if: steps.cache-pcre.outputs.cache-hit != 'true' 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! curl -fsSL https://github.com/pfultz2/pcre/archive/refs/tags/%PCRE_VERSION%.zip -o pcre-%PCRE_VERSION%.zip || exit /b !errorlevel!
- name: Install PCRE - name: Install PCRE
if: steps.cache-pcre.outputs.cache-hit != 'true'
run: | run: |
7z x pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! 7z x pcre-%PCRE_VERSION%.zip || exit /b !errorlevel!
cd pcre-%PCRE_VERSION% || exit /b !errorlevel! cd pcre-%PCRE_VERSION% || exit /b !errorlevel!