ci: Add debug logs to for the setup process

pull/6901/head
Daniel Mensinger 5 years ago committed by Jussi Pakkanen
parent 69a03fa94b
commit 217c92b48a
  1. 7
      ci/azure-steps.yml
  2. 12
      ci/install-dmd.ps1

@ -1,19 +1,23 @@
steps:
- powershell: |
echo "=== Check skip CI ==="
python ./skip_ci.py --base-branch-env=SYSTEM_PULLREQUEST_TARGETBRANCH --is-pull-env=SYSTEM_PULLREQUEST_PULLREQUESTID --base-branch-origin
if ($LastExitCode -ne 0) {
exit 0
}
echo "=== BEGIN CI setup ==="
# remove Chocolately, MinGW, Strawberry Perl from path, so we don't find gcc/gfortran and try to use it
$env:Path = ($env:Path.Split(';') | Where-Object { $_ -notmatch 'mingw|Strawberry|Chocolatey' }) -join ';'
# download and install prerequisites
function DownloadFile([String] $Source, [String] $Destination) {
$retries = 10
echo ('Downloading {0} ...' -f $Source)
for ($i = 1; $i -le $retries; $i++) {
try {
(New-Object net.webclient).DownloadFile($Source, $Destination)
echo '... DONE'
break # succeeded
} catch [net.WebException] {
if ($i -eq $retries) {
@ -84,6 +88,7 @@ steps:
$origPath = $env:Path
# import visual studio variables
echo "source vcvarsall.bat"
if ($env:compiler -eq 'msvc2019') {
$vcvars = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
} else {
@ -130,6 +135,8 @@ steps:
$env:Path = "$env:WindowsSDK_ExecutablePath_x86;$env:Path"
}
echo "=== END CI setup ==="
if ($env:backend -eq 'ninja') {
ninja --version
} else {

@ -5,6 +5,8 @@ Set-StrictMode -Version latest
$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
echo "=== Installing DMD ==="
# default installation directory
$dmd_install = "C:\D"
$dmd_version_file = "C:\cache\DMD_LATEST"
@ -13,10 +15,12 @@ if (!$Version) {
#echo "Fetching latest DMD version..."
$dmd_latest_url = "http://downloads.dlang.org/releases/LATEST"
$retries = 10
echo ('Downloading {0} ...' -f $dmd_latest_url)
for ($i = 1; $i -le $retries; $i++) {
try {
[system.io.directory]::CreateDirectory((Split-Path -parent $dmd_version_file)) > $null
Invoke-WebRequest -URI $dmd_latest_url -OutFile $dmd_version_file
echo '... DONE'
break
} catch [net.WebException] {
if ($i -eq $retries) {
@ -42,7 +46,7 @@ $dmd_url = "http://downloads.dlang.org/releases/2.x/$dmd_version/dmd.$dmd_versio
$dmd_filename = [System.IO.Path]::GetFileName($dmd_url)
$dmd_archive = Join-Path ($env:temp) $dmd_filename
#echo "Downloading $dmd_filename..."
echo "Downloading $dmd_filename..."
$retries = 10
for ($i = 1; $i -le $retries; $i++) {
try {
@ -59,13 +63,13 @@ for ($i = 1; $i -le $retries; $i++) {
}
}
#echo "Extracting $dmd_filename..."
echo "Extracting $dmd_filename..."
Expand-Archive $dmd_archive -Force -DestinationPath $dmd_install
# add to environment path
#echo "Installing DMD..."
echo "Installing DMD..."
$dmd_bin = Join-Path $dmd_install "dmd2\windows\bin"
$Env:Path = $Env:Path + ";" + $dmd_bin
#echo "Testing DMD..."
echo "Testing DMD..."
& dmd.exe --version

Loading…
Cancel
Save