aboutsummaryrefslogtreecommitdiffstats
path: root/dist/windows/appveyor
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-08-16 08:05:39 +0200
committerTristan Gingold <tgingold@free.fr>2017-08-16 08:05:39 +0200
commit61b24c93601ecf7b9013b0926d9bda74e9eddadd (patch)
treeb1fed87aa8a8bf9327ed0957358536a9ba798f3b /dist/windows/appveyor
parent200e893607444cb3fe2a355430767215bee8fe70 (diff)
downloadghdl-61b24c93601ecf7b9013b0926d9bda74e9eddadd.tar.gz
ghdl-61b24c93601ecf7b9013b0926d9bda74e9eddadd.tar.bz2
ghdl-61b24c93601ecf7b9013b0926d9bda74e9eddadd.zip
Reimport appveyor and travis-ci scripts from v0.34
Diffstat (limited to 'dist/windows/appveyor')
-rw-r--r--dist/windows/appveyor/build.ps157
-rw-r--r--dist/windows/appveyor/configure.ps169
-rw-r--r--dist/windows/appveyor/setup.ps159
-rw-r--r--dist/windows/appveyor/test.ps12
4 files changed, 55 insertions, 132 deletions
diff --git a/dist/windows/appveyor/build.ps1 b/dist/windows/appveyor/build.ps1
index 844bfba9a..2421bd16d 100644
--- a/dist/windows/appveyor/build.ps1
+++ b/dist/windows/appveyor/build.ps1
@@ -46,12 +46,65 @@ function Restore-NativeCommandStream
}
}
-Write-Host "Building GHDL and libraries..." -Foreground Yellow
-cd $env:GHDL_BUILD_DIR
+#### Environment
+
+$BUILD_DIRNAME = "$($env:BUILD_MINGW)-$($env:BUILD_BACKEND)"
+$GHDL_BUILD_DIR = "$($env:APPVEYOR_BUILD_FOLDER)\build\$BUILD_DIRNAME"
+
+if ($env:APPVEYOR_REPO_TAG -eq "true")
+{
+ $PREFIX_DIRNAME = "$($env:APPVEYOR_REPO_TAG_NAME)-$BUILD_DIRNAME"
+}
+else
+{
+ $PREFIX_DIRNAME = "$($env:APPVEYOR_BUILD_VERSION)-$BUILD_DIRNAME"
+}
+
+$GHDL_PREFIX_DIR = "c:/Tools/GHDL/$PREFIX_DIRNAME"
+$ZipFile = "ghdl-$PREFIX_DIRNAME.zip"
+
+$env:GHDL_BUILD_DIR = $GHDL_BUILD_DIR
+$env:GHDL_PREFIX_DIR = $GHDL_PREFIX_DIR
+
+#### Build
+
+mkdir $GHDL_BUILD_DIR | cd
+
+if ($env:BUILD_BACKEND -eq "mcode")
+{ Write-Host "Configuring GHDL for $($env:BUILD_MINGW), mcode..." -Foreground Yellow
+
+ c:\msys64\usr\bin\bash.exe -c "../../configure --prefix=$GHDL_PREFIX_DIR LDFLAGS=-static" 2>&1 | Restore-NativeCommandStream | %{ "$_" }
+}
+elseif ($env:BUILD_BACKEND -eq "llvm")
+{ Write-Host "Configuring GHDL for $($env:BUILD_MINGW), LLVM..." -Foreground Yellow
+
+ c:\msys64\usr\bin\bash.exe -c "../../configure --prefix=$GHDL_PREFIX_DIR --with-llvm-config LDFLAGS=-static CXX=g++" 2>&1 | Restore-NativeCommandStream | %{ "$_" }
+}
+
+Write-Host "Building GHDL and libraries..." -Foreground Yellow
c:\msys64\usr\bin\make.exe 2>&1 | Restore-NativeCommandStream | %{ "$_" }
$Err = $LastExitCode
+if ($Err -eq 0)
+{
+ Write-Host "Installing GHDL and libraries..." -Foreground Yellow
+ c:\msys64\usr\bin\make.exe install 2>&1 | Restore-NativeCommandStream | %{ "$_" }
+ $Err = $LastExitCode
+}
+
+#### Binaries
+
+if ($Err -eq 0)
+{
+ Write-Host "Building binary archives..." -Foreground Yellow
+ cd c:\Tools
+ 7z a "$($env:APPVEYOR_BUILD_FOLDER)\$ZipFile" -r "GHDL\$PREFIX_DIRNAME\"
+
+ cd $env:APPVEYOR_BUILD_FOLDER
+ Push-AppveyorArtifact $ZipFile
+}
+
cd $env:APPVEYOR_BUILD_FOLDER
exit $Err
diff --git a/dist/windows/appveyor/configure.ps1 b/dist/windows/appveyor/configure.ps1
deleted file mode 100644
index f7f3561af..000000000
--- a/dist/windows/appveyor/configure.ps1
+++ /dev/null
@@ -1,69 +0,0 @@
-function Restore-NativeCommandStream
-{ <#
- .SYNOPSIS
- This CmdLet gathers multiple ErrorRecord objects and reconstructs outputs
- as a single line.
-
- .DESCRIPTION
- This CmdLet collects multiple ErrorRecord objects and emits one String
- object per line.
- .PARAMETER InputObject
- A object stream is required as an input.
- .PARAMETER Indent
- Indentation string.
- #>
- [CmdletBinding()]
- param(
- [Parameter(ValueFromPipeline=$true)]
- $InputObject
- )
-
- begin
- { $LineRemainer = "" }
-
- process
- { if ($InputObject -is [System.Management.Automation.ErrorRecord])
- { if ($InputObject.FullyQualifiedErrorId -eq "NativeCommandError")
- { Write-Output $InputObject.ToString() }
- elseif ($InputObject.FullyQualifiedErrorId -eq "NativeCommandErrorMessage")
- { $NewLine = $LineRemainer + $InputObject.ToString()
- while (($NewLinePos = $NewLine.IndexOf("`n")) -ne -1)
- { Write-Output $NewLine.Substring(0, $NewLinePos)
- $NewLine = $NewLine.Substring($NewLinePos + 1)
- }
- $LineRemainer = $NewLine
- }
- }
- elseif ($InputObject -is [String])
- { Write-Output $InputObject }
- else
- { Write-Host "Unsupported object in pipeline stream" }
- }
-
- end
- { if ($LineRemainer -ne "")
- { Write-Output $LineRemainer }
- }
-}
-
-$GHDL_BUILD_DIR = "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:BUILD_MINGW)-$($env:BUILD_BACKEND)"
-$GHDL_PREFIX_DIR = "c:/Tools/GHDL/0.34-dev-$($env:BUILD_MINGW)-$($env:BUILD_BACKEND)"
-
-$env:GHDL_BUILD_DIR = $GHDL_BUILD_DIR
-$env:GHDL_PREFIX_DIR = $GHDL_PREFIX_DIR
-
-mkdir $GHDL_BUILD_DIR | cd
-
-if ($env:BUILD_BACKEND -eq "mcode")
-{ Write-Host "Configuring GHDL for $($env:BUILD_MINGW), mcode..." -Foreground Yellow
-
- c:\msys64\usr\bin\bash.exe -c "../../configure --prefix=$GHDL_PREFIX_DIR LDFLAGS=-static" 2>&1 | Restore-NativeCommandStream | %{ "$_" }
-}
-elseif ($env:BUILD_BACKEND -eq "llvm")
-{ Write-Host "Configuring GHDL for $($env:BUILD_MINGW), LLVM-3.5..." -Foreground Yellow
-
- c:\msys64\usr\bin\bash.exe -c "../../configure --prefix=$GHDL_PREFIX_DIR --with-llvm-config LDFLAGS=-static CXX=g++" 2>&1 | Restore-NativeCommandStream | %{ "$_" }
-}
-
-cd $env:APPVEYOR_BUILD_FOLDER
-exit 0
diff --git a/dist/windows/appveyor/setup.ps1 b/dist/windows/appveyor/setup.ps1
deleted file mode 100644
index 6f9b7459a..000000000
--- a/dist/windows/appveyor/setup.ps1
+++ /dev/null
@@ -1,59 +0,0 @@
-function Restore-NativeCommandStream
-{ <#
- .SYNOPSIS
- This CmdLet gathers multiple ErrorRecord objects and reconstructs outputs
- as a single line.
-
- .DESCRIPTION
- This CmdLet collects multiple ErrorRecord objects and emits one String
- object per line.
- .PARAMETER InputObject
- A object stream is required as an input.
- .PARAMETER Indent
- Indentation string.
- #>
- [CmdletBinding()]
- param(
- [Parameter(ValueFromPipeline=$true)]
- $InputObject
- )
-
- begin
- { $LineRemainer = "" }
-
- process
- { if ($InputObject -is [System.Management.Automation.ErrorRecord])
- { if ($InputObject.FullyQualifiedErrorId -eq "NativeCommandError")
- { Write-Output $InputObject.ToString() }
- elseif ($InputObject.FullyQualifiedErrorId -eq "NativeCommandErrorMessage")
- { $NewLine = $LineRemainer + $InputObject.ToString()
- while (($NewLinePos = $NewLine.IndexOf("`n")) -ne -1)
- { Write-Output $NewLine.Substring(0, $NewLinePos)
- $NewLine = $NewLine.Substring($NewLinePos + 1)
- }
- $LineRemainer = $NewLine
- }
- }
- elseif ($InputObject -is [String])
- { Write-Output $InputObject }
- else
- { Write-Host "Unsupported object in pipeline stream" }
- }
-
- end
- { if ($LineRemainer -ne "")
- { Write-Output $LineRemainer }
- }
-}
-
-Write-Host "Installing GHDL and libraries..." -Foreground Yellow
-cd $env:GHDL_BUILD_DIR
-c:\msys64\usr\bin\make.exe install 2>&1 | Restore-NativeCommandStream | %{ "$_" }
-
-cd c:\Tools
-7z a "$($env:APPVEYOR_BUILD_FOLDER)\ghdl-0.34-dev-$($env:BUILD_MINGW)-$($env:BUILD_BACKEND).zip" -r "GHDL\0.34-dev-$($env:BUILD_MINGW)-$($env:BUILD_BACKEND)\"
-
-cd $env:APPVEYOR_BUILD_FOLDER
-Push-AppveyorArtifact "ghdl-0.34-dev-$($env:BUILD_MINGW)-$($env:BUILD_BACKEND).zip"
-
-exit 0
diff --git a/dist/windows/appveyor/test.ps1 b/dist/windows/appveyor/test.ps1
index 7d427460a..65045f889 100644
--- a/dist/windows/appveyor/test.ps1
+++ b/dist/windows/appveyor/test.ps1
@@ -87,8 +87,6 @@ cd ..\..
$TestFramework = "VESTS"
Write-Host "Running VESTS tests..." -Foreground Yellow
-c:\msys64\mingw64\bin\gnatmake.exe get_entities 2>&1 | Restore-NativeCommandStream | %{ "$_" }
-
cd vests
$TestName = "VESTS test:" # {0}" -f $Directory