diff options
author | umarcor <unai.martinezcorral@ehu.eus> | 2021-01-05 20:46:15 +0100 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2021-01-06 07:30:46 +0100 |
commit | 99853361819bff87e7cf8103c5205721ec195c32 (patch) | |
tree | 29a6dda1199534497f5a09ea1268aa3a619c41b8 /dist/windows/appveyor/build.ps1 | |
parent | 301f442a6e66a83b47ed7d40e5b61389b9c33446 (diff) | |
download | ghdl-99853361819bff87e7cf8103c5205721ec195c32.tar.gz ghdl-99853361819bff87e7cf8103c5205721ec195c32.tar.bz2 ghdl-99853361819bff87e7cf8103c5205721ec195c32.zip |
mv dist/* scripts/
Diffstat (limited to 'dist/windows/appveyor/build.ps1')
-rw-r--r-- | dist/windows/appveyor/build.ps1 | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/dist/windows/appveyor/build.ps1 b/dist/windows/appveyor/build.ps1 deleted file mode 100644 index 359fb4da7..000000000 --- a/dist/windows/appveyor/build.ps1 +++ /dev/null @@ -1,112 +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 } - } -} - -#### 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") -{ - # There is a tag. Remove the leading v. - $BUILD_VERSION = $($env:APPVEYOR_REPO_TAG_NAME) -creplace "^v", "" -} -else -{ - $BUILD_VERSION = $($env:APPVEYOR_BUILD_VERSION) -} - -$PREFIX_DIRNAME = "$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='llvm-config --link-static' LDFLAGS='-static' --enable-libghdl --enable-synth CXX=clang++" 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 |