strategy:
  matrix:
    linux:
      imageName: 'ubuntu-latest'
    windows:
      imageName: 'windows-latest'

trigger:
- master

pool:
  vmImage: $(imageName)

variables:
  buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
  displayName: 'Install .NET Core SDK (based on global.json)'
  inputs:
    packageType: 'sdk'
    useGlobalJson: true
    installationPath: $(Agent.ToolsDirectory)/dotnet
- bash: ./build.sh
  condition: or( eq( variables['Agent.OS'], 'Darwin' ), eq( variables['Agent.OS'], 'Linux' ))
  displayName: 'build.sh'
- powershell: .\build.cmd
  condition: eq( variables['Agent.OS'], 'Windows_NT' )
  displayName: 'build.cmd'

### SAMPLE - for if/when we do automated tests
##
# - task: PublishTestResults@2
#   inputs:
#     testResultsFormat: 'NUnit'
#     testResultsFiles: 'bin/TestResults-*.xml' 
#     #searchFolder: '$(System.DefaultWorkingDirectory)' # Optional
#     mergeTestResults: true


strategy:
  matrix:
    linux:
      imageName: 'ubuntu-latest'
    windows:
      imageName: 'windows-latest'

trigger:
- master

pool:
  vmImage: $(imageName)

variables:
  buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
  displayName: 'Install .NET Core SDK (based on global.json)'
  inputs:
    packageType: 'sdk'
    useGlobalJson: true
    installationPath: $(Agent.ToolsDirectory)/dotnet
- bash: ./build.sh target BuildPackages
  condition: or( eq( variables['Agent.OS'], 'Darwin' ), eq( variables['Agent.OS'], 'Linux' ))
  displayName: 'build.sh'
- powershell: .\build.cmd target BuildPackages
  condition: eq( variables['Agent.OS'], 'Windows_NT' )
  displayName: 'build.cmd'

### SAMPLE - for if/when we do automated tests
##
# - task: PublishTestResults@2
#   inputs:
#     testResultsFormat: 'NUnit'
#     testResultsFiles: 'bin/TestResults-*.xml' 
#     #searchFolder: '$(System.DefaultWorkingDirectory)' # Optional
#     mergeTestResults: true


Build packages in CI though
Build packages in CI though
