From ff23c43ba59ad234bb5cb292e9a74ed81c75bf85 Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 8 Dec 2021 16:49:55 +0100 Subject: [PATCH 1/7] moved PCRE and Z3 versions into global environment --- .github/workflows/CI-windows.yml | 11 ++++++----- .github/workflows/release-windows.yml | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index fef067e66cc..7c71871bfe2 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -22,6 +22,12 @@ jobs: runs-on: ${{ matrix.os }} + env: + # see https://www.pcre.org/original/changelog.txt + PCRE_VERSION: 8.44 + # see https://github.com/Z3Prover/z3/releases: + Z3_VERSION: 4.8.10 + steps: - uses: actions/checkout@v2 @@ -51,8 +57,6 @@ jobs: copy pcre.lib ..\externals\pcre64.lib || exit /b !errorlevel! ) env: - # see https://www.pcre.org/original/changelog.txt - PCRE_VERSION: 8.44 CL: /MP - name: Install Z3 library @@ -60,9 +64,6 @@ jobs: curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip -o z3-%Z3_VERSION%-win.zip || exit /b !errorlevel! 7z x z3-%Z3_VERSION%-win.zip -oexternals -r -y || exit /b !errorlevel! move externals\z3-%Z3_VERSION%-${{ matrix.arch }}-win externals\z3 || exit /b !errorlevel! - env: - # see https://github.com/Z3Prover/z3/releases: - Z3_VERSION: 4.8.10 # no 32-bit Qt available - name: Install Qt ${{ matrix.qt_ver }} diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index f63271f595b..e0a70a8b42c 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -22,6 +22,12 @@ jobs: runs-on: windows-2019 + env: + # see https://www.pcre.org/original/changelog.txt + PCRE_VERSION: 8.45 + # see https://github.com/Z3Prover/z3/releases: + Z3_VERSION: 4.8.7 + steps: - uses: actions/checkout@v2 @@ -30,9 +36,9 @@ jobs: - name: Install PCRE run: | - curl -fsSL https://github.com/pfultz2/pcre/archive/refs/tags/8.45.zip -o pcre-8.45.zip - 7z x pcre-8.45.zip - cd pcre-8.45 + curl -fsSL https://github.com/pfultz2/pcre/archive/refs/tags/%PCRE_VERSION%.zip -o pcre-%PCRE_VERSION%.zip + 7z x pcre-%PCRE_VERSION%.zip + cd pcre-%PCRE_VERSION% cmake . -G "Visual Studio 16 2019" -A x64 msbuild -m PCRE.sln /p:Configuration=Release /p:Platform=x64 dir @@ -44,9 +50,9 @@ jobs: - name: Install Z3 library run: | - curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-4.8.7/z3-4.8.7-x64-win.zip -o z3-4.8.7-win.zip - 7z x z3-4.8.7-win.zip -oexternals -r -y - move externals\z3-4.8.7-x64-win externals\z3 + curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-x64-win.zip -o z3-%Z3_VERSION%-win.zip + 7z x z3-%Z3_VERSION%-win.zip -oexternals -r -y + move externals\z3-%Z3_VERSION%-x64-win externals\z3 - name: Install Qt uses: jurplel/install-qt-action@v2 From c562b6fdd2cddf70cbb855ad0cebfff183ecb4be Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 8 Dec 2021 16:52:24 +0100 Subject: [PATCH 2/7] moved PCRE and Z3 downloads into separate steps --- .github/workflows/CI-windows.yml | 11 +++++++++-- .github/workflows/release-windows.yml | 10 ++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index 7c71871bfe2..6f1ba41d4ad 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -41,11 +41,15 @@ jobs: if: matrix.qt_ver == '' uses: microsoft/setup-msbuild@v1.0.2 + - name: Download PCRE + if: false + run: | + curl -fsSL https://ftp.pcre.org/pub/pcre/pcre-%PCRE_VERSION%.zip -o pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! + - name: Install PCRE if: false run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} || exit /b !errorlevel! - curl -fsSL https://ftp.pcre.org/pub/pcre/pcre-%PCRE_VERSION%.zip -o pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! 7z x pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! cd pcre-%PCRE_VERSION% || exit /b !errorlevel! cmake . -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DPCRE_BUILD_PCRECPP=Off -DPCRE_BUILD_TESTS=Off -DPCRE_BUILD_PCREGREP=Off || exit /b !errorlevel! @@ -59,9 +63,12 @@ jobs: env: CL: /MP - - name: Install Z3 library + - name: Download Z3 library run: | curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip -o z3-%Z3_VERSION%-win.zip || exit /b !errorlevel! + + - name: Install Z3 library + run: | 7z x z3-%Z3_VERSION%-win.zip -oexternals -r -y || exit /b !errorlevel! move externals\z3-%Z3_VERSION%-${{ matrix.arch }}-win externals\z3 || exit /b !errorlevel! diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index e0a70a8b42c..a9974b3b8fb 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -34,9 +34,12 @@ jobs: - name: Setup msbuild.exe uses: microsoft/setup-msbuild@v1.0.2 - - name: Install PCRE + - name: Download PCRE run: | curl -fsSL https://github.com/pfultz2/pcre/archive/refs/tags/%PCRE_VERSION%.zip -o pcre-%PCRE_VERSION%.zip + + - name: Install PCRE + run: | 7z x pcre-%PCRE_VERSION%.zip cd pcre-%PCRE_VERSION% cmake . -G "Visual Studio 16 2019" -A x64 @@ -48,9 +51,12 @@ jobs: copy pcre.h ..\externals copy Release\pcre.lib ..\externals\pcre64.lib - - name: Install Z3 library + - name: Download Z3 library run: | curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-x64-win.zip -o z3-%Z3_VERSION%-win.zip + + - name: Install Z3 library + run: | 7z x z3-%Z3_VERSION%-win.zip -oexternals -r -y move externals\z3-%Z3_VERSION%-x64-win externals\z3 From e5ab62cf756badff09858eabc43b575e9cc978e0 Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 8 Dec 2021 16:55:29 +0100 Subject: [PATCH 3/7] made sure architecture is in Z3 archive name --- .github/workflows/CI-windows.yml | 4 ++-- .github/workflows/release-windows.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index 6f1ba41d4ad..862a0cebee9 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -65,11 +65,11 @@ jobs: - name: Download Z3 library run: | - curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip -o z3-%Z3_VERSION%-win.zip || exit /b !errorlevel! + curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip -o z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip || exit /b !errorlevel! - name: Install Z3 library run: | - 7z x z3-%Z3_VERSION%-win.zip -oexternals -r -y || exit /b !errorlevel! + 7z x z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip -oexternals -r -y || exit /b !errorlevel! move externals\z3-%Z3_VERSION%-${{ matrix.arch }}-win externals\z3 || exit /b !errorlevel! # no 32-bit Qt available diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index a9974b3b8fb..b0ea457f66b 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -53,11 +53,11 @@ jobs: - name: Download Z3 library run: | - curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-x64-win.zip -o z3-%Z3_VERSION%-win.zip + curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-x64-win.zip -o z3-%Z3_VERSION%-x64-win.zip - name: Install Z3 library run: | - 7z x z3-%Z3_VERSION%-win.zip -oexternals -r -y + 7z x z3-%Z3_VERSION%-x64-win.zip -oexternals -r -y move externals\z3-%Z3_VERSION%-x64-win externals\z3 - name: Install Qt From c20f5dcb023d5fc80b3fdacad67d4ef15be8a5e7 Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 8 Dec 2021 16:57:16 +0100 Subject: [PATCH 4/7] CI-windows.yml: bumped version, updated mirror and re-enabled installation of PCRE --- .github/workflows/CI-windows.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index 862a0cebee9..97d1cd70983 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -24,7 +24,7 @@ jobs: env: # see https://www.pcre.org/original/changelog.txt - PCRE_VERSION: 8.44 + PCRE_VERSION: 8.45 # see https://github.com/Z3Prover/z3/releases: Z3_VERSION: 4.8.10 @@ -42,12 +42,10 @@ jobs: uses: microsoft/setup-msbuild@v1.0.2 - name: Download PCRE - if: false run: | - curl -fsSL https://ftp.pcre.org/pub/pcre/pcre-%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 - if: false run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} || exit /b !errorlevel! 7z x pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! From a0bd7d776c3e8ca6bccfd534b3c301b1ebae4f15 Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 8 Dec 2021 16:58:22 +0100 Subject: [PATCH 5/7] release-windows.yml: bumped Z3 version to 4.8.10 to match one used in development builds --- .github/workflows/release-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index b0ea457f66b..78bf364850e 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -26,7 +26,7 @@ jobs: # see https://www.pcre.org/original/changelog.txt PCRE_VERSION: 8.45 # see https://github.com/Z3Prover/z3/releases: - Z3_VERSION: 4.8.7 + Z3_VERSION: 4.8.10 steps: - uses: actions/checkout@v2 From 85ccfe28faa784d89722444f34da19065fe1c54d Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 8 Dec 2021 17:06:04 +0100 Subject: [PATCH 6/7] CI-windows.yml: avoid unnecessary steps in x86 GUI builds which do nothing --- .github/workflows/CI-windows.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index 97d1cd70983..55cbcff19e5 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -30,6 +30,7 @@ jobs: steps: - uses: actions/checkout@v2 + if: matrix.arch == 'x64' || matrix.qt_ver == '' - name: Set up Python 3.10 if: matrix.qt_ver == '' @@ -42,10 +43,12 @@ jobs: uses: microsoft/setup-msbuild@v1.0.2 - name: Download PCRE + if: matrix.arch == 'x64' || matrix.qt_ver == '' 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 == '' run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} || exit /b !errorlevel! 7z x pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! @@ -62,10 +65,12 @@ jobs: CL: /MP - name: Download Z3 library + if: matrix.arch == 'x64' || matrix.qt_ver == '' run: | curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip -o z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip || exit /b !errorlevel! - name: Install Z3 library + if: matrix.arch == 'x64' || matrix.qt_ver == '' run: | 7z x z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip -oexternals -r -y || exit /b !errorlevel! move externals\z3-%Z3_VERSION%-${{ matrix.arch }}-win externals\z3 || exit /b !errorlevel! From e30290a2d38402295d6711f7b27e2207295e2a5c Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 8 Dec 2021 17:08:48 +0100 Subject: [PATCH 7/7] avoid duplicated downloads of Z3 and PCRE archives in CI by caching them --- .github/workflows/CI-windows.yml | 20 ++++++++++++++++++-- .github/workflows/release-windows.yml | 16 ++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index 55cbcff19e5..3f781f2939d 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -42,8 +42,16 @@ jobs: if: matrix.qt_ver == '' uses: microsoft/setup-msbuild@v1.0.2 - - name: Download PCRE + - name: Cache PCRE + id: cache-pcre + uses: actions/cache@v2 if: matrix.arch == 'x64' || matrix.qt_ver == '' + with: + path: pcre-${{ env.PCRE_VERSION }}.zip + key: pcre-${{ env.PCRE_VERSION }} + + - name: Download PCRE + if: (matrix.arch == 'x64' || 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! @@ -64,8 +72,16 @@ jobs: env: CL: /MP - - name: Download Z3 library + - name: Cache Z3 Library + id: cache-z3 + uses: actions/cache@v2 if: matrix.arch == 'x64' || matrix.qt_ver == '' + with: + path: z3-${{ env.Z3_VERSION }}-${{ matrix.arch }}-win.zip + key: z3-${{ env.Z3_VERSION }}-${{ matrix.arch }}-win + + - name: Download Z3 library + if: (matrix.arch == 'x64' || matrix.qt_ver == '') && steps.cache-z3.outputs.cache-hit != 'true' run: | curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip -o z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip || exit /b !errorlevel! diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index 78bf364850e..4684c2e019a 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -34,7 +34,15 @@ jobs: - name: Setup msbuild.exe uses: microsoft/setup-msbuild@v1.0.2 + - name: Cache PCRE + id: cache-pcre + uses: actions/cache@v2 + with: + path: pcre-${{ env.PCRE_VERSION }}.zip + key: pcre-${{ env.PCRE_VERSION }} + - name: Download PCRE + if: 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 @@ -51,7 +59,15 @@ jobs: copy pcre.h ..\externals copy Release\pcre.lib ..\externals\pcre64.lib + - name: Cache Z3 Library + id: cache-z3 + uses: actions/cache@v2 + with: + path: z3-${{ env.Z3_VERSION }}-x64-win.zip + key: z3-${{ env.Z3_VERSION }}-x64-win + - name: Download Z3 library + if: steps.cache-z3.outputs.cache-hit != 'true' run: | curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-x64-win.zip -o z3-%Z3_VERSION%-x64-win.zip