From 044ceec7fb2ca7cba27b008721d204d8ac833717 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Mon, 21 Oct 2024 16:23:41 -0400 Subject: [PATCH 1/3] Fix apparent CI failure due to "All Workflows filtered" (#3123) Signed-off-by: Jared Van Bortel --- .circleci/config.yml | 2 +- .circleci/continue_config.yml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3e7af5886567..c6bba23d3346 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 setup: true orbs: - path-filtering: circleci/path-filtering@0.0.1 + path-filtering: circleci/path-filtering@1.1.0 workflows: version: 2.1 diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index 0de0641ef289..0d840ba08a2c 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -19,6 +19,13 @@ parameters: default: false jobs: + # work around CircleCI-Public/path-filtering-orb#20 + noop: + docker: + - image: cimg/base:current + steps: + - run: "true" + build-offline-chat-installer-macos: macos: xcode: 15.4.0 @@ -1451,6 +1458,16 @@ jobs: workflows: version: 2 + noop: + when: + not: + or: + - << pipeline.parameters.run-all-workflows >> + - << pipeline.parameters.run-python-workflow >> + - << pipeline.parameters.run-ts-workflow >> + - << pipeline.parameters.run-chat-workflow >> + jobs: + - noop build-chat-offline-installers: when: or: From 1764fca1928314d11d30c931eea9d06192ad6441 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Mon, 21 Oct 2024 16:24:29 -0400 Subject: [PATCH 2/3] ci: attempt to fix flaky downloads (#3124) Signed-off-by: Jared Van Bortel --- .circleci/continue_config.yml | 122 ++++++++++++++++++---------------- 1 file changed, 64 insertions(+), 58 deletions(-) diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index 0d840ba08a2c..1ca880307d72 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -44,11 +44,11 @@ jobs: command: softwareupdate --install-rosetta --agree-to-license # needed for QtIFW - run: name: Install dependencies - command: brew install ccache + command: brew install ccache wget - run: name: Installing Qt command: | - curl -o qt-unified-macOS-x64-4.6.0-online.dmg https://gpt4all.io/ci/qt-unified-macOS-x64-4.6.0-online.dmg + wget "https://gpt4all.io/ci/qt-unified-macOS-x64-4.6.0-online.dmg" hdiutil attach qt-unified-macOS-x64-4.6.0-online.dmg /Volumes/qt-unified-macOS-x64-4.6.0-online/qt-unified-macOS-x64-4.6.0-online.app/Contents/MacOS/qt-unified-macOS-x64-4.6.0-online --no-force-installations --no-default-installations --no-size-checking --default-answer --accept-licenses --confirm-command --accept-obligations --email $QT_EMAIL --password $QT_PASSWORD install qt.tools.cmake qt.tools.ifw.48 qt.tools.ninja qt.qt6.651.clang_64 qt.qt6.651.qt5compat qt.qt6.651.debug_info qt.qt6.651.addons.qtpdf qt.qt6.651.addons.qthttpserver hdiutil detach /Volumes/qt-unified-macOS-x64-4.6.0-online @@ -182,11 +182,11 @@ jobs: command: softwareupdate --install-rosetta --agree-to-license # needed for QtIFW - run: name: Install dependencies - command: brew install ccache + command: brew install ccache wget - run: name: Installing Qt command: | - curl -o qt-unified-macOS-x64-4.6.0-online.dmg https://gpt4all.io/ci/qt-unified-macOS-x64-4.6.0-online.dmg + wget "https://gpt4all.io/ci/qt-unified-macOS-x64-4.6.0-online.dmg" hdiutil attach qt-unified-macOS-x64-4.6.0-online.dmg /Volumes/qt-unified-macOS-x64-4.6.0-online/qt-unified-macOS-x64-4.6.0-online.app/Contents/MacOS/qt-unified-macOS-x64-4.6.0-online --no-force-installations --no-default-installations --no-size-checking --default-answer --accept-licenses --confirm-command --accept-obligations --email $QT_EMAIL --password $QT_PASSWORD install qt.tools.cmake qt.tools.ifw.48 qt.tools.ninja qt.qt6.651.clang_64 qt.qt6.651.qt5compat qt.qt6.651.debug_info qt.qt6.651.addons.qtpdf qt.qt6.651.addons.qthttpserver hdiutil detach /Volumes/qt-unified-macOS-x64-4.6.0-online @@ -319,9 +319,9 @@ jobs: - run: name: Setup Linux and Dependencies command: | - wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc - sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.290-jammy.list https://packages.lunarg.com/vulkan/1.3.290/lunarg-vulkan-1.3.290-jammy.list - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb + wget -qO- "https://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc + wget -qO- "https://packages.lunarg.com/vulkan/1.3.290/lunarg-vulkan-1.3.290-jammy.list" | sudo tee /etc/apt/sources.list.d/lunarg-vulkan-1.3.290-jammy.list + wget "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb" sudo dpkg -i cuda-keyring_1.1-1_all.deb packages=( bison build-essential ccache cuda-compiler-11-8 flex g++-12 gperf libcublas-dev-11-8 libfontconfig1 @@ -336,7 +336,7 @@ jobs: - run: name: Installing Qt command: | - wget https://gpt4all.io/ci/qt-unified-linux-x64-4.6.0-online.run + wget "https://gpt4all.io/ci/qt-unified-linux-x64-4.6.0-online.run" chmod +x qt-unified-linux-x64-4.6.0-online.run ./qt-unified-linux-x64-4.6.0-online.run --no-force-installations --no-default-installations --no-size-checking --default-answer --accept-licenses --confirm-command --accept-obligations --email $QT_EMAIL --password $QT_PASSWORD install qt.tools.cmake qt.tools.ifw.48 qt.tools.ninja qt.qt6.651.gcc_64 qt.qt6.651.qt5compat qt.qt6.651.debug_info qt.qt6.651.addons.qtpdf qt.qt6.651.addons.qthttpserver - run: @@ -395,9 +395,9 @@ jobs: - run: name: Setup Linux and Dependencies command: | - wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc - sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.290-jammy.list https://packages.lunarg.com/vulkan/1.3.290/lunarg-vulkan-1.3.290-jammy.list - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb + wget -qO- "https://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc + wget -qO- "https://packages.lunarg.com/vulkan/1.3.290/lunarg-vulkan-1.3.290-jammy.list" | sudo tee /etc/apt/sources.list.d/lunarg-vulkan-1.3.290-jammy.list + wget "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb" sudo dpkg -i cuda-keyring_1.1-1_all.deb packages=( bison build-essential ccache cuda-compiler-11-8 flex g++-12 gperf libcublas-dev-11-8 libfontconfig1 @@ -412,7 +412,7 @@ jobs: - run: name: Installing Qt command: | - wget https://gpt4all.io/ci/qt-unified-linux-x64-4.6.0-online.run + wget "https://gpt4all.io/ci/qt-unified-linux-x64-4.6.0-online.run" chmod +x qt-unified-linux-x64-4.6.0-online.run ./qt-unified-linux-x64-4.6.0-online.run --no-force-installations --no-default-installations --no-size-checking --default-answer --accept-licenses --confirm-command --accept-obligations --email $QT_EMAIL --password $QT_PASSWORD install qt.tools.cmake qt.tools.ifw.48 qt.tools.ninja qt.qt6.651.gcc_64 qt.qt6.651.qt5compat qt.qt6.651.debug_info qt.qt6.651.addons.qtpdf qt.qt6.651.addons.qthttpserver - run: @@ -473,21 +473,21 @@ jobs: - ccache-gpt4all-win-amd64- - run: name: Install dependencies - command: choco install -y ccache + command: choco install -y ccache wget - run: name: Installing Qt command: | - Invoke-WebRequest -Uri https://gpt4all.io/ci/qt-unified-windows-x64-4.6.0-online.exe -OutFile qt-unified-windows-x64-4.6.0-online.exe + wget.exe "https://gpt4all.io/ci/qt-unified-windows-x64-4.6.0-online.exe" & .\qt-unified-windows-x64-4.6.0-online.exe --no-force-installations --no-default-installations --no-size-checking --default-answer --accept-licenses --confirm-command --accept-obligations --email ${Env:QT_EMAIL} --password ${Env:QT_PASSWORD} install qt.tools.cmake qt.tools.ifw.48 qt.tools.ninja qt.qt6.651.win64_msvc2019_64 qt.qt6.651.qt5compat qt.qt6.651.debug_info qt.qt6.651.addons.qtpdf qt.qt6.651.addons.qthttpserver - run: name: Install VulkanSDK command: | - Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.3.261.1/windows/VulkanSDK-1.3.261.1-Installer.exe -OutFile VulkanSDK-1.3.261.1-Installer.exe + wget.exe "https://sdk.lunarg.com/sdk/download/1.3.261.1/windows/VulkanSDK-1.3.261.1-Installer.exe" .\VulkanSDK-1.3.261.1-Installer.exe --accept-licenses --default-answer --confirm-command install - run: name: Install CUDA Toolkit command: | - Invoke-WebRequest -Uri https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe -OutFile cuda_11.8.0_windows_network.exe + wget.exe "https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe" .\cuda_11.8.0_windows_network.exe -s cudart_11.8 nvcc_11.8 cublas_11.8 cublas_dev_11.8 - run: name: "Install Dotnet 8" @@ -495,7 +495,7 @@ jobs: mkdir dotnet cd dotnet $dotnet_url="https://download.visualstudio.microsoft.com/download/pr/5af098e1-e433-4fda-84af-3f54fd27c108/6bd1c6e48e64e64871957289023ca590/dotnet-sdk-8.0.302-win-x64.zip" - Invoke-WebRequest -Uri $dotnet_url -Outfile dotnet-sdk-8.0.302-win-x64.zip + wget "$dotnet_url" Expand-Archive -LiteralPath .\dotnet-sdk-8.0.302-win-x64.zip $Env:DOTNET_ROOT="$($(Get-Location).Path)\dotnet-sdk-8.0.302-win-x64" $Env:PATH="$Env:DOTNET_ROOT;$Env:PATH" @@ -556,13 +556,16 @@ jobs: - checkout - attach_workspace: at: build + - run: + name: Install dependencies + command: choco install -y wget - run: name: "Install Dotnet 8 && Azure Sign Tool" command: | mkdir dotnet cd dotnet $dotnet_url="https://download.visualstudio.microsoft.com/download/pr/5af098e1-e433-4fda-84af-3f54fd27c108/6bd1c6e48e64e64871957289023ca590/dotnet-sdk-8.0.302-win-x64.zip" - Invoke-WebRequest -Uri $dotnet_url -Outfile dotnet-sdk-8.0.302-win-x64.zip + wget.exe "$dotnet_url" Expand-Archive -LiteralPath .\dotnet-sdk-8.0.302-win-x64.zip $Env:DOTNET_ROOT="$($(Get-Location).Path)\dotnet-sdk-8.0.302-win-x64" $Env:PATH="$Env:DOTNET_ROOT;$Env:PATH" @@ -594,21 +597,21 @@ jobs: - ccache-gpt4all-win-amd64- - run: name: Install dependencies - command: choco install -y ccache + command: choco install -y ccache wget - run: name: Installing Qt command: | - Invoke-WebRequest -Uri https://gpt4all.io/ci/qt-unified-windows-x64-4.6.0-online.exe -OutFile qt-unified-windows-x64-4.6.0-online.exe + wget.exe "https://gpt4all.io/ci/qt-unified-windows-x64-4.6.0-online.exe" & .\qt-unified-windows-x64-4.6.0-online.exe --no-force-installations --no-default-installations --no-size-checking --default-answer --accept-licenses --confirm-command --accept-obligations --email ${Env:QT_EMAIL} --password ${Env:QT_PASSWORD} install qt.tools.cmake qt.tools.ifw.48 qt.tools.ninja qt.qt6.651.win64_msvc2019_64 qt.qt6.651.qt5compat qt.qt6.651.debug_info qt.qt6.651.addons.qtpdf qt.qt6.651.addons.qthttpserver - run: name: Install VulkanSDK command: | - Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.3.261.1/windows/VulkanSDK-1.3.261.1-Installer.exe -OutFile VulkanSDK-1.3.261.1-Installer.exe + wget.exe "https://sdk.lunarg.com/sdk/download/1.3.261.1/windows/VulkanSDK-1.3.261.1-Installer.exe" .\VulkanSDK-1.3.261.1-Installer.exe --accept-licenses --default-answer --confirm-command install - run: name: Install CUDA Toolkit command: | - Invoke-WebRequest -Uri https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe -OutFile cuda_11.8.0_windows_network.exe + wget.exe "https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe" .\cuda_11.8.0_windows_network.exe -s cudart_11.8 nvcc_11.8 cublas_11.8 cublas_dev_11.8 - run: name: "Install Dotnet 8" @@ -616,7 +619,7 @@ jobs: mkdir dotnet cd dotnet $dotnet_url="https://download.visualstudio.microsoft.com/download/pr/5af098e1-e433-4fda-84af-3f54fd27c108/6bd1c6e48e64e64871957289023ca590/dotnet-sdk-8.0.302-win-x64.zip" - Invoke-WebRequest -Uri $dotnet_url -Outfile dotnet-sdk-8.0.302-win-x64.zip + wget.exe "$dotnet_url" Expand-Archive -LiteralPath .\dotnet-sdk-8.0.302-win-x64.zip $Env:DOTNET_ROOT="$($(Get-Location).Path)\dotnet-sdk-8.0.302-win-x64" $Env:PATH="$Env:DOTNET_ROOT;$Env:PATH" @@ -684,13 +687,16 @@ jobs: - checkout - attach_workspace: at: build + - run: + name: Install dependencies + command: choco install -y wget - run: name: "Install Dotnet 8" command: | mkdir dotnet cd dotnet $dotnet_url="https://download.visualstudio.microsoft.com/download/pr/5af098e1-e433-4fda-84af-3f54fd27c108/6bd1c6e48e64e64871957289023ca590/dotnet-sdk-8.0.302-win-x64.zip" - Invoke-WebRequest -Uri $dotnet_url -Outfile dotnet-sdk-8.0.302-win-x64.zip + wget.exe "$dotnet_url" Expand-Archive -LiteralPath .\dotnet-sdk-8.0.302-win-x64.zip $Env:DOTNET_ROOT="$($(Get-Location).Path)\dotnet-sdk-8.0.302-win-x64" $Env:PATH="$Env:DOTNET_ROOT;$Env:PATH" @@ -726,9 +732,9 @@ jobs: - run: name: Setup Linux and Dependencies command: | - wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc - sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.290-jammy.list https://packages.lunarg.com/vulkan/1.3.290/lunarg-vulkan-1.3.290-jammy.list - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb + wget -qO- "https://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc + wget -qO- "https://packages.lunarg.com/vulkan/1.3.290/lunarg-vulkan-1.3.290-jammy.list" | sudo tee /etc/apt/sources.list.d/lunarg-vulkan-1.3.290-jammy.list + wget "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb" sudo dpkg -i cuda-keyring_1.1-1_all.deb packages=( bison build-essential ccache cuda-compiler-11-8 flex g++-12 gperf libcublas-dev-11-8 libfontconfig1 @@ -743,7 +749,7 @@ jobs: - run: name: Installing Qt command: | - wget https://gpt4all.io/ci/qt-unified-linux-x64-4.6.0-online.run + wget "https://gpt4all.io/ci/qt-unified-linux-x64-4.6.0-online.run" chmod +x qt-unified-linux-x64-4.6.0-online.run ./qt-unified-linux-x64-4.6.0-online.run --no-force-installations --no-default-installations --no-size-checking --default-answer --accept-licenses --confirm-command --accept-obligations --email $QT_EMAIL --password $QT_PASSWORD install qt.tools.cmake qt.tools.ifw.48 qt.tools.ninja qt.qt6.651.gcc_64 qt.qt6.651.qt5compat qt.qt6.651.debug_info qt.qt6.651.addons.qtpdf qt.qt6.651.addons.qthttpserver - run: @@ -787,21 +793,21 @@ jobs: - ccache-gpt4all-win-amd64- - run: name: Install dependencies - command: choco install -y ccache + command: choco install -y ccache wget - run: name: Installing Qt command: | - Invoke-WebRequest -Uri https://gpt4all.io/ci/qt-unified-windows-x64-4.6.0-online.exe -OutFile qt-unified-windows-x64-4.6.0-online.exe + wget.exe "https://gpt4all.io/ci/qt-unified-windows-x64-4.6.0-online.exe" & .\qt-unified-windows-x64-4.6.0-online.exe --no-force-installations --no-default-installations --no-size-checking --default-answer --accept-licenses --confirm-command --accept-obligations --email ${Env:QT_EMAIL} --password ${Env:QT_PASSWORD} install qt.tools.cmake qt.tools.ifw.48 qt.tools.ninja qt.qt6.651.win64_msvc2019_64 qt.qt6.651.qt5compat qt.qt6.651.debug_info qt.qt6.651.addons.qtpdf qt.qt6.651.addons.qthttpserver - run: name: Install VulkanSDK command: | - Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.3.261.1/windows/VulkanSDK-1.3.261.1-Installer.exe -OutFile VulkanSDK-1.3.261.1-Installer.exe + wget.exe "https://sdk.lunarg.com/sdk/download/1.3.261.1/windows/VulkanSDK-1.3.261.1-Installer.exe" .\VulkanSDK-1.3.261.1-Installer.exe --accept-licenses --default-answer --confirm-command install - run: name: Install CUDA Toolkit command: | - Invoke-WebRequest -Uri https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe -OutFile cuda_11.8.0_windows_network.exe + wget.exe "https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe" .\cuda_11.8.0_windows_network.exe -s cudart_11.8 nvcc_11.8 cublas_11.8 cublas_dev_11.8 - run: name: Build @@ -849,11 +855,11 @@ jobs: command: softwareupdate --install-rosetta --agree-to-license # needed for QtIFW - run: name: Install dependencies - command: brew install ccache + command: brew install ccache wget - run: name: Installing Qt command: | - curl -o qt-unified-macOS-x64-4.6.0-online.dmg https://gpt4all.io/ci/qt-unified-macOS-x64-4.6.0-online.dmg + wget "https://gpt4all.io/ci/qt-unified-macOS-x64-4.6.0-online.dmg" hdiutil attach qt-unified-macOS-x64-4.6.0-online.dmg /Volumes/qt-unified-macOS-x64-4.6.0-online/qt-unified-macOS-x64-4.6.0-online.app/Contents/MacOS/qt-unified-macOS-x64-4.6.0-online --no-force-installations --no-default-installations --no-size-checking --default-answer --accept-licenses --confirm-command --accept-obligations --email $QT_EMAIL --password $QT_PASSWORD install qt.tools.cmake qt.tools.ifw.48 qt.tools.ninja qt.qt6.651.clang_64 qt.qt6.651.qt5compat qt.qt6.651.debug_info qt.qt6.651.addons.qtpdf qt.qt6.651.addons.qthttpserver hdiutil detach /Volumes/qt-unified-macOS-x64-4.6.0-online @@ -939,9 +945,9 @@ jobs: - run: name: Install dependencies command: | - wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc - sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.290-jammy.list https://packages.lunarg.com/vulkan/1.3.290/lunarg-vulkan-1.3.290-jammy.list - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb + wget -qO- "https://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc + wget -qO- "https://packages.lunarg.com/vulkan/1.3.290/lunarg-vulkan-1.3.290-jammy.list" | sudo tee /etc/apt/sources.list.d/lunarg-vulkan-1.3.290-jammy.list + wget "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb" sudo dpkg -i cuda-keyring_1.1-1_all.deb packages=( build-essential ccache cmake cuda-compiler-11-8 g++-12 libcublas-dev-11-8 libnvidia-compute-550-server @@ -1048,20 +1054,20 @@ jobs: - restore_cache: keys: - ccache-gpt4all-win-amd64- + - run: + name: Install dependencies + command: + choco install -y ccache cmake ninja wget --installargs 'ADD_CMAKE_TO_PATH=System' - run: name: Install VulkanSDK command: | - Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.3.261.1/windows/VulkanSDK-1.3.261.1-Installer.exe -OutFile VulkanSDK-1.3.261.1-Installer.exe + wget.exe "https://sdk.lunarg.com/sdk/download/1.3.261.1/windows/VulkanSDK-1.3.261.1-Installer.exe" .\VulkanSDK-1.3.261.1-Installer.exe --accept-licenses --default-answer --confirm-command install - run: name: Install CUDA Toolkit command: | - Invoke-WebRequest -Uri https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe -OutFile cuda_11.8.0_windows_network.exe + wget.exe "https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe" .\cuda_11.8.0_windows_network.exe -s cudart_11.8 nvcc_11.8 cublas_11.8 cublas_dev_11.8 - - run: - name: Install dependencies - command: - choco install -y ccache cmake ninja --installargs 'ADD_CMAKE_TO_PATH=System' - run: name: Install Python dependencies command: pip install setuptools wheel cmake @@ -1139,9 +1145,9 @@ jobs: - run: name: Install dependencies command: | - wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc - sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.290-jammy.list https://packages.lunarg.com/vulkan/1.3.290/lunarg-vulkan-1.3.290-jammy.list - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb + wget -qO- "https://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc + wget -qO- "https://packages.lunarg.com/vulkan/1.3.290/lunarg-vulkan-1.3.290-jammy.list" | sudo tee /etc/apt/sources.list.d/lunarg-vulkan-1.3.290-jammy.list + wget "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb" sudo dpkg -i cuda-keyring_1.1-1_all.deb packages=( build-essential ccache cmake cuda-compiler-11-8 g++-12 libcublas-dev-11-8 libnvidia-compute-550-server @@ -1245,20 +1251,20 @@ jobs: - restore_cache: keys: - ccache-gpt4all-win-amd64- + - run: + name: Install dependencies + command: | + choco install -y ccache cmake ninja wget --installargs 'ADD_CMAKE_TO_PATH=System' - run: name: Install VulkanSDK command: | - Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.3.261.1/windows/VulkanSDK-1.3.261.1-Installer.exe -OutFile VulkanSDK-1.3.261.1-Installer.exe + wget.exe "https://sdk.lunarg.com/sdk/download/1.3.261.1/windows/VulkanSDK-1.3.261.1-Installer.exe" .\VulkanSDK-1.3.261.1-Installer.exe --accept-licenses --default-answer --confirm-command install - run: name: Install CUDA Toolkit command: | - Invoke-WebRequest -Uri https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe -OutFile cuda_11.8.0_windows_network.exe + wget.exe "https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe" .\cuda_11.8.0_windows_network.exe -s cudart_11.8 nvcc_11.8 cublas_11.8 cublas_dev_11.8 - - run: - name: Install dependencies - command: | - choco install -y ccache cmake ninja --installargs 'ADD_CMAKE_TO_PATH=System' - run: name: Build Libraries no_output_timeout: 30m @@ -1368,14 +1374,14 @@ jobs: at: /tmp/gpt4all-backend - run: choco install wget -y - run: - command: wget https://nodejs.org/dist/v18.16.0/node-v18.16.0-x86.msi -P C:\Users\circleci\Downloads\ - shell: cmd.exe - - run: MsiExec.exe /i C:\Users\circleci\Downloads\node-v18.16.0-x86.msi /qn + command: | + wget.exe "https://nodejs.org/dist/v18.16.0/node-v18.16.0-x86.msi" -P C:\Users\circleci\Downloads\ + MsiExec.exe /i C:\Users\circleci\Downloads\node-v18.16.0-x86.msi /qn - run: command: | - Start-Process powershell -verb runAs -Args "-start GeneralProfile" - nvm install 18.16.0 - nvm use 18.16.0 + Start-Process powershell -verb runAs -Args "-start GeneralProfile" + nvm install 18.16.0 + nvm use 18.16.0 - run: node --version - run: corepack enable - run: From d224a9d3a5d6ced8033ff3337fade31b1d092f65 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Mon, 21 Oct 2024 16:25:28 -0400 Subject: [PATCH 3/3] Fix compatibility with Qt 6.8 (#3121) Signed-off-by: Jared Van Bortel --- gpt4all-chat/CHANGELOG.md | 6 +++++ gpt4all-chat/CMakeLists.txt | 4 ++++ gpt4all-chat/qml/MySettingsStack.qml | 1 + gpt4all-chat/src/server.cpp | 33 ++++++++++++++++++++++++---- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/gpt4all-chat/CHANGELOG.md b/gpt4all-chat/CHANGELOG.md index def1c479db30..a6e722d38ac6 100644 --- a/gpt4all-chat/CHANGELOG.md +++ b/gpt4all-chat/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [Unreleased] + +### Changed +- Implement Qt 6.8 compatibility ([#3121](https://github.com/nomic-ai/gpt4all/pull/3121)) + ## [3.4.2] - 2024-10-16 ### Fixed @@ -164,6 +169,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Fix several Vulkan resource management issues ([#2694](https://github.com/nomic-ai/gpt4all/pull/2694)) - Fix crash/hang when some models stop generating, by showing special tokens ([#2701](https://github.com/nomic-ai/gpt4all/pull/2701)) +[Unreleased]: https://github.com/nomic-ai/gpt4all/compare/v3.4.2...HEAD [3.4.2]: https://github.com/nomic-ai/gpt4all/compare/v3.4.1...v3.4.2 [3.4.1]: https://github.com/nomic-ai/gpt4all/compare/v3.4.0...v3.4.1 [3.4.0]: https://github.com/nomic-ai/gpt4all/compare/v3.3.0...v3.4.0 diff --git a/gpt4all-chat/CMakeLists.txt b/gpt4all-chat/CMakeLists.txt index 0950774a0fa2..57d05031e21f 100644 --- a/gpt4all-chat/CMakeLists.txt +++ b/gpt4all-chat/CMakeLists.txt @@ -77,6 +77,10 @@ configure_file( find_package(Qt6 6.4 COMPONENTS Core HttpServer LinguistTools Pdf Quick QuickDialogs2 Sql Svg REQUIRED) +if (QT_KNOWN_POLICY_QTP0004) + qt_policy(SET QTP0004 NEW) # generate extra qmldir files on Qt 6.8+ +endif() + # Get the Qt6Core target properties get_target_property(Qt6Core_INCLUDE_DIRS Qt6::Core INTERFACE_INCLUDE_DIRECTORIES) get_target_property(Qt6Core_LIBRARY_RELEASE Qt6::Core LOCATION_RELEASE) diff --git a/gpt4all-chat/qml/MySettingsStack.qml b/gpt4all-chat/qml/MySettingsStack.qml index 9f0273ef689a..17901325aba6 100644 --- a/gpt4all-chat/qml/MySettingsStack.qml +++ b/gpt4all-chat/qml/MySettingsStack.qml @@ -2,6 +2,7 @@ import QtCore import QtQuick import QtQuick.Controls import QtQuick.Controls.Basic +import QtQuick.Controls.impl import QtQuick.Layouts import QtQuick.Dialogs import Qt.labs.folderlistmodel diff --git a/gpt4all-chat/src/server.cpp b/gpt4all-chat/src/server.cpp index b02d59d47ddc..577859a3266b 100644 --- a/gpt4all-chat/src/server.cpp +++ b/gpt4all-chat/src/server.cpp @@ -37,6 +37,10 @@ #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0) +# include +#endif + using namespace std::string_literals; using namespace Qt::Literals::StringLiterals; @@ -435,7 +439,6 @@ T &parseRequest(T &request, QJsonObject &&obj) Server::Server(Chat *chat) : ChatLLM(chat, true /*isServer*/) , m_chat(chat) - , m_server(nullptr) { connect(this, &Server::threadStarted, this, &Server::start); connect(this, &Server::databaseResultsChanged, this, &Server::handleDatabaseResultsChanged); @@ -457,10 +460,23 @@ static QJsonObject requestFromJson(const QByteArray &request) void Server::start() { m_server = std::make_unique(this); - if (!m_server->listen(QHostAddress::LocalHost, MySettings::globalInstance()->networkPort())) { - qWarning() << "ERROR: Unable to start the server"; +#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0) + auto *tcpServer = new QTcpServer(m_server.get()); +#else + auto *tcpServer = m_server.get(); +#endif + + auto port = MySettings::globalInstance()->networkPort(); + if (!tcpServer->listen(QHostAddress::LocalHost, port)) { + qWarning() << "Server ERROR: Failed to listen on port" << port; return; } +#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0) + if (!m_server->bind(tcpServer)) { + qWarning() << "Server ERROR: Failed to HTTP server to socket" << port; + return; + } +#endif m_server->route("/v1/models", QHttpServerRequest::Method::Get, [](const QHttpServerRequest &) { @@ -600,10 +616,19 @@ void Server::start() } ); - m_server->afterRequest([] (QHttpServerResponse &&resp) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0) + m_server->addAfterRequestHandler(this, [](const QHttpServerRequest &req, QHttpServerResponse &resp) { + Q_UNUSED(req); + auto headers = resp.headers(); + headers.append("Access-Control-Allow-Origin"_L1, "*"_L1); + resp.setHeaders(std::move(headers)); + }); +#else + m_server->afterRequest([](QHttpServerResponse &&resp) { resp.addHeader("Access-Control-Allow-Origin", "*"); return std::move(resp); }); +#endif connect(this, &Server::requestServerNewPromptResponsePair, m_chat, &Chat::serverNewPromptResponsePair, Qt::BlockingQueuedConnection);