diff --git a/ci/build.yml b/ci/build.yml index 54e90b9a..e47d5c6c 100644 --- a/ci/build.yml +++ b/ci/build.yml @@ -1,5 +1,4 @@ --- - .script-build: stage: build needs: ["lint"] @@ -22,6 +21,7 @@ - bridge_*.tgz - vault-editor - bridge-rollout + build-linux: extends: - .script-build diff --git a/ci/env.yml b/ci/env.yml index 3daa81a1..1d4c1b91 100644 --- a/ci/env.yml +++ b/ci/env.yml @@ -1,6 +1,4 @@ - --- - .env-windows: extends: - .image-windows-virt-build @@ -13,6 +11,12 @@ variables: GOARCH: amd64 BRIDGE_SYNC_FORCE_MINIMUM_SPEC: 1 + VCPKG_DEFAULT_BINARY_CACHE: ${CI_PROJECT_DIR}/.cache + cache: + key: windows-vcpkg-go-1 + paths: + - .cache + when: "always" .env-darwin: extends: @@ -30,7 +34,7 @@ key: darwin-go-and-vcpkg paths: - .cache - when: 'always' + when: "always" .env-linux-build: extends: @@ -41,7 +45,7 @@ key: linux-vcpkg paths: - .cache - when: 'always' + when: "always" before_script: - export BRIDGE_SYNC_FORCE_MINIMUM_SPEC=1 - !reference [.before-script-git-config, before_script] @@ -50,4 +54,3 @@ - export GOPATH="$CI_PROJECT_DIR/.cache" tags: - shared-large - diff --git a/ci/setup.yml b/ci/setup.yml index 087e7a76..3fee9618 100644 --- a/ci/setup.yml +++ b/ci/setup.yml @@ -1,7 +1,5 @@ --- - include: - - project: 'go/bridge-internal' - ref: 'master' - file: 'ci/runners-setup.yml' - + - project: "go/bridge-internal" + ref: "master" + file: "ci/runners-setup.yml" diff --git a/internal/frontend/bridge-gui/bridge-gui/build.ps1 b/internal/frontend/bridge-gui/bridge-gui/build.ps1 index f4b98afb..4a06bafb 100644 --- a/internal/frontend/bridge-gui/bridge-gui/build.ps1 +++ b/internal/frontend/bridge-gui/bridge-gui/build.ps1 @@ -15,8 +15,6 @@ # You should have received a copy of the GNU General Public License # along with Proton Mail Bridge. If not, see . -#!/bin/bash - $scriptpath = $MyInvocation.MyCommand.Path $scriptDir = Split-Path $scriptpath $bridgeRepoRootDir = Join-Path $scriptDir "../../../.." -Resolve @@ -24,6 +22,26 @@ Write-host "Bridge-gui directory is $scriptDir" Write-host "Bridge repos root dir $bridgeRepoRootDir" Push-Location $scriptDir +# There is bug in CI caused by defining the lower case and upper case +# vars for proxy. For pure bash (case sensitive - creating +# two env items) or pure powershell (case insensitive - by default writes any +# changes into first defined env instance) it is transparent. But during bridge gui +# build we are populating case sensitive env vars from bash to powershell which +# then cause error when trying to list env vars. This is causing an error +# during CMake lookup for CXX and build fails. Therefore we need unset the +# lower case version if present. +Write-Host "Checking for duplicate proxy variables..." +@("HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY") | ForEach-Object { + $upper = $_ + $lower = $_.ToLower() + + if ((Test-Path "Env:$upper") -and (Test-Path "Env:$lower")) { + Write-Host "Removing duplicate lowercase variable: $lower" + Remove-Item "Env:$lower" -ErrorAction SilentlyContinue + } +} + + $ErrorActionPreference = "Stop" $cmakeExe=$(Get-Command cmake).source