alt64/azure-pipelines.yml

69 lines
2.1 KiB
YAML
Executable File

jobs:
- job: Windows
pool:
vmImage: 'vs2017-win2016'
variables:
outputStorageUri: ''
outputStorageContainerSasToken: ''
binaryVersion: '$(Year:yy)$(DayOfYear)$(Rev:r)'
steps:
- task: PowerShell@2
inputs:
targetType: 'filePath' # Optional. Options: filePath, inline
filePath: 'update-libs.ps1' # Required when targetType == FilePath
#arguments: # Optional
#errorActionPreference: 'stop' # Optional. Options: stop, continue, silentlyContinue
failOnStderr: false # Optional
#workingDirectory: # Optional
displayName: Install tool-chain and libs
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$path = "$($Env:BUILD_SOURCESDIRECTORY)\inc\version.h"
# should possibly be setting this through the make file!
$versionStr = '#define OS_BUILD_VERSION "' + $Env:Build_BuildNumber + '"'
(Get-Content $path).Replace('#define OS_BUILD_VERSION "0"',$versionStr) | Set-Content $path
errorActionPreference: 'stop'
failOnStderr: 'false'
displayName: Update build version
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
# needs converting to proper powershell or bash!
cmd.exe /c "set PATH=%PATH%;%BUILD_SOURCESDIRECTORY%\gcc-toolchain-mips64\bin"
cmd.exe /c "md bin"
cmd.exe /c "md obj"
If ($Env.Build_SourceBranchName -eq "master") {
cmd.exe /c "make"
}
Else {
cmd.exe /c "make debug"
}
errorActionPreference: 'stop'
failOnStderr: 'false'
displayName: 'Build ROM'
continueOnError: false
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)
contents: 'bin\*.v64'
targetFolder: $(Build.ArtifactStagingDirectory)
flattenFolders: true
displayName: 'Copy ROM'
continueOnError: false
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'binaries'
publishLocation: 'Container'
displayName: Publish Build Artifacts
continueOnError: false