CI linux agent changes (#509)

* ci: always use the linux-pool

reduce the difference of environment between external and internal
contributions

* infra: tweak the linux cache warmup script

Don't share the same bazel cache directory with the disk cache, which is
something else. Be more specific about the target. Clean after yourself.

* infra: bump the linux agent disk to 200GB

avoid running out of disk space
This commit is contained in:
Jonas Chevalier 2019-04-16 11:35:46 +02:00 committed by GitHub
parent a061db34d3
commit 16aba583ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 10 deletions

View File

@ -20,10 +20,8 @@ jobs:
- job: linux
timeoutInMinutes: 360
pool:
${{ if eq(variables['System.PullRequest.IsFork'], 'true') }}:
vmImage: 'ubuntu-16.04'
${{ if eq(variables['System.PullRequest.IsFork'], 'false') }}:
name: 'linux-pool'
# vmImage: 'ubuntu-16.04'
name: 'linux-pool'
steps:
- template: ci/build-unix.yml
parameters:

View File

@ -39,7 +39,7 @@ resource "google_compute_instance_template" "vsts-agent-linux" {
labels = "${local.labels}"
disk {
disk_size_gb = 100
disk_size_gb = 200
disk_type = "pd-ssd"
source_image = "ubuntu-os-cloud/ubuntu-1604-lts"
}

View File

@ -106,11 +106,18 @@ systemctl restart nix-daemon
# around, even when their caches are only warmed up halfway
su --login vsts <<'CACHE_WARMUP'
# user-wide bazel disk cache override
echo "build --disk_cache=~/.cache/bazel" > ~/.bazelrc && \
git clone https://github.com/digital-asset/daml && \
cd daml && \
./ci/dev-env-install.sh && \
./build.sh "_$(uname)" || true
echo "build:linux --disk_cache=~/.bazel-cache" > ~/.bazelrc
# clone and build
(
git clone https://github.com/digital-asset/daml
cd daml
./ci/dev-env-install.sh
./build.sh "_$(uname)"
) || true
# free some disk space
rm -rf ~/daml
CACHE_WARMUP
# Purge old agents