steps: - script: | echo $(Build.SourceVersion) set TestVar=$(Build.SourceVersion) set $commitHash=%TestVar:~0,7% echo %$commitHash% echo ##vso[task.setvariable variable=commitHash]%$commitHash% env: { sourceVersion: $(Build.SourceVersion) } displayName: Git Hash 7-digit - powershell: | mkdir $env:AGENT_BUILDDIRECTORY\build cd $env:AGENT_BUILDDIRECTORY\build if ($env:imageName -eq "vs2017-win2016") { $env:Path += ";C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin" } else { Write-Host "Unknown image name: '$($env:imageName)'" $host.SetShouldExit(1) } if ($env:TILEDB_S3 -eq "ON" -And $env:TILEDB_TBB -eq "ON") { & "$env:BUILD_SOURCESDIRECTORY\bootstrap.ps1" -EnableS3 -EnableVerbose } elseif ($env:TILEDB_S3 -eq "ON" -And $env:TILEDB_TBB -eq "OFF") { & "$env:BUILD_SOURCESDIRECTORY\bootstrap.ps1" -EnableS3 -EnableVerbose -DisableTBB } else { & "$env:BUILD_SOURCESDIRECTORY\bootstrap.ps1" -EnableVerbose } if ($LastExitCode -ne 0) { Write-Host "Bootstrap failed." $host.SetShouldExit($LastExitCode) } cmake --build $env:AGENT_BUILDDIRECTORY\build --config Release -- /verbosity:minimal if ($LastExitCode -ne 0) { Write-Host "Build failed. CMake exit status: " $LastExitCocde $host.SetShouldExit($LastExitCode) } cmake --build $env:AGENT_BUILDDIRECTORY\build --target install-tiledb --config Release if ($LastExitCode -ne 0) { Write-Host "Installation failed." $host.SetShouldExit($LastExitCode) } displayName: "Build" # Archive files # Compress files into .7z, .tar.gz, or .zip - task: ArchiveFiles@2 inputs: rootFolderOrFile: '$(Agent.BuildDirectory)\s\dist\' includeRootFolder: false archiveType: 'zip' # Options: zip, 7z, tar, wim archiveFile: $(Build.ArtifactStagingDirectory)/tiledb-$(ARTIFACT_OS)-$(Build.SourceBranchName)-$(commitHash)-$(ARTIFACT_EXTRAS).zip replaceExistingArchive: true verbose: true # Optional condition: succeeded() - task: ArchiveFiles@2 inputs: rootFolderOrFile: '$(Agent.BuildDirectory)\s\' includeRootFolder: false archiveType: 'zip' # Options: zip, 7z, tar, wim archiveFile: $(Build.ArtifactStagingDirectory)/tiledb-$(ARTIFACT_OS)-build-dir-$(ARTIFACT_EXTRAS).zip replaceExistingArchive: true verbose: true # Optional condition: succeeded() - task: PublishBuildArtifacts@1 inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)\tiledb-$(ARTIFACT_OS)-$(Build.SourceBranchName)-$(commitHash)-$(ARTIFACT_EXTRAS).zip' artifactName: '$(ARTIFACT_EXTRAS)' condition: succeeded() - task: PublishBuildArtifacts@1 inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)/tiledb-$(ARTIFACT_OS)-build-dir-$(ARTIFACT_EXTRAS).zip' artifactName: 'build-dirs' condition: succeeded()