mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2026-02-04 00:08:33 +00:00
ci: DEVOPS-3481 adding back cache (reduces build time by 1h)
This commit is contained in:
@ -1,5 +1,4 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
.script-build:
|
.script-build:
|
||||||
stage: build
|
stage: build
|
||||||
needs: ["lint"]
|
needs: ["lint"]
|
||||||
@ -22,6 +21,7 @@
|
|||||||
- bridge_*.tgz
|
- bridge_*.tgz
|
||||||
- vault-editor
|
- vault-editor
|
||||||
- bridge-rollout
|
- bridge-rollout
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
extends:
|
extends:
|
||||||
- .script-build
|
- .script-build
|
||||||
|
|||||||
13
ci/env.yml
13
ci/env.yml
@ -1,6 +1,4 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
.env-windows:
|
.env-windows:
|
||||||
extends:
|
extends:
|
||||||
- .image-windows-virt-build
|
- .image-windows-virt-build
|
||||||
@ -13,6 +11,12 @@
|
|||||||
variables:
|
variables:
|
||||||
GOARCH: amd64
|
GOARCH: amd64
|
||||||
BRIDGE_SYNC_FORCE_MINIMUM_SPEC: 1
|
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:
|
.env-darwin:
|
||||||
extends:
|
extends:
|
||||||
@ -30,7 +34,7 @@
|
|||||||
key: darwin-go-and-vcpkg
|
key: darwin-go-and-vcpkg
|
||||||
paths:
|
paths:
|
||||||
- .cache
|
- .cache
|
||||||
when: 'always'
|
when: "always"
|
||||||
|
|
||||||
.env-linux-build:
|
.env-linux-build:
|
||||||
extends:
|
extends:
|
||||||
@ -41,7 +45,7 @@
|
|||||||
key: linux-vcpkg
|
key: linux-vcpkg
|
||||||
paths:
|
paths:
|
||||||
- .cache
|
- .cache
|
||||||
when: 'always'
|
when: "always"
|
||||||
before_script:
|
before_script:
|
||||||
- export BRIDGE_SYNC_FORCE_MINIMUM_SPEC=1
|
- export BRIDGE_SYNC_FORCE_MINIMUM_SPEC=1
|
||||||
- !reference [.before-script-git-config, before_script]
|
- !reference [.before-script-git-config, before_script]
|
||||||
@ -50,4 +54,3 @@
|
|||||||
- export GOPATH="$CI_PROJECT_DIR/.cache"
|
- export GOPATH="$CI_PROJECT_DIR/.cache"
|
||||||
tags:
|
tags:
|
||||||
- shared-large
|
- shared-large
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- project: 'go/bridge-internal'
|
- project: "go/bridge-internal"
|
||||||
ref: 'master'
|
ref: "master"
|
||||||
file: 'ci/runners-setup.yml'
|
file: "ci/runners-setup.yml"
|
||||||
|
|
||||||
|
|||||||
@ -15,8 +15,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
# along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
$scriptpath = $MyInvocation.MyCommand.Path
|
$scriptpath = $MyInvocation.MyCommand.Path
|
||||||
$scriptDir = Split-Path $scriptpath
|
$scriptDir = Split-Path $scriptpath
|
||||||
$bridgeRepoRootDir = Join-Path $scriptDir "../../../.." -Resolve
|
$bridgeRepoRootDir = Join-Path $scriptDir "../../../.." -Resolve
|
||||||
@ -24,6 +22,26 @@ Write-host "Bridge-gui directory is $scriptDir"
|
|||||||
Write-host "Bridge repos root dir $bridgeRepoRootDir"
|
Write-host "Bridge repos root dir $bridgeRepoRootDir"
|
||||||
Push-Location $scriptDir
|
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"
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
$cmakeExe=$(Get-Command cmake).source
|
$cmakeExe=$(Get-Command cmake).source
|
||||||
|
|||||||
Reference in New Issue
Block a user