From df80ff1cc74dc7b225673d32e6a0d1eea4dbeddd Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Date: Tue, 6 May 2025 10:19:04 -0300 Subject: [PATCH] AppVeyor - Don't rebuild SIP each time --- appveyor.yml | 21 ++++++++++++--------- appveyor/linux/install.sh | 12 ++++++++---- appveyor/macos/install.sh | 12 ++++++++---- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 44dda5a22..0b4b52923 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -84,7 +84,7 @@ init: cache: - gc-ci-libs.zip -> appveyor.yml - jom_1_1_3.zip -- sip-4.19.8.zip +- sip-4.19.8 -> appveyor.yml - C:\R - C:\Python -> src\Python\requirements.txt - c:\tools\vcpkg\installed\ @@ -136,14 +136,17 @@ install: } # Get SIP and and install on Python -- cmd: c:\python37-x64\python --version -- cmd: if not exist sip-4.19.8.zip appveyor DownloadFile "https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.zip" -- cmd: 7z x sip-4.19.8.zip -- cmd: cd sip-4.19.8 -- cmd: c:\python37-x64\python configure.py -- cmd: jom -j4 -- cmd: nmake install -- cmd: cd .. +- ps: >- + if ($isWindows -And -not (Test-Path 'sip-4.19.8')) { + Start-FileDownload "https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.zip" + 7z x sip-4.19.8.zip + cd sip-4.19.8 + c:\python37-x64\python --version + c:\python37-x64\python configure.py + jom -j2 + cd .. + } +- cmd: cd sip-4.19.8 & nmake install & cd .. # Add Python (avoiding collision between GC Context.h and Python context.h) - cmd: echo DEFINES+=GC_WANT_PYTHON >> src\gcconfig.pri diff --git a/appveyor/linux/install.sh b/appveyor/linux/install.sh index 314ed8fa3..621dd3545 100644 --- a/appveyor/linux/install.sh +++ b/appveyor/linux/install.sh @@ -46,11 +46,15 @@ sudo add-apt-repository -y ppa:deadsnakes/ppa sudo apt-get update -qq sudo apt-get install -qq python3.7-dev python3.7-distutils python3.7 --version -wget --no-verbose https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.tar.gz -tar xf sip-4.19.8.tar.gz +if [ -z "$(ls -A sip-4.19.8)" ]; then + wget --no-verbose https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.tar.gz + tar xf sip-4.19.8.tar.gz + cd sip-4.19.8 + python3.7 configure.py --incdir=/usr/include/python3.7 + make -j2 + cd .. +fi cd sip-4.19.8 -python3.7 configure.py --incdir=/usr/include/python3.7 -make sudo make install cd .. diff --git a/appveyor/macos/install.sh b/appveyor/macos/install.sh index 96065d5c5..df6c4ce56 100755 --- a/appveyor/macos/install.sh +++ b/appveyor/macos/install.sh @@ -58,11 +58,15 @@ if [ -z "$(ls -A site-packages)" ]; then fi # Python SIP -curl -k -L -O https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.tar.gz -tar xf sip-4.19.8.tar.gz +if [ -z "$(ls -A sip-4.19.8)" ]; then + curl -k -L -O https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.tar.gz + tar xf sip-4.19.8.tar.gz + cd sip-4.19.8 + python3.7 configure.py + make -j2 + cd .. +fi cd sip-4.19.8 -python3.7 configure.py -make -j4 sudo make install cd ..