2019-05-03 18:08:14 +03:00
|
|
|
|
steps:
|
2021-04-05 12:14:10 +03:00
|
|
|
|
- script: |
|
|
|
|
|
refreshenv
|
|
|
|
|
LIBCLANG_PATH=C:\Program Files\LLVM\lib
|
|
|
|
|
LLVM_CONFIG_PATH=C:\Program Files\LLVM\bin\llvm-config
|
|
|
|
|
ROARING_ARCH=x86-64-v2
|
|
|
|
|
cargo test --all
|
2019-05-03 18:08:14 +03:00
|
|
|
|
displayName: Cargo Test All
|
|
|
|
|
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
|
2019-12-10 12:44:04 +03:00
|
|
|
|
- script: 'cargo clean'
|
|
|
|
|
displayName: Cargo Clean
|
|
|
|
|
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
|
2021-04-05 12:14:10 +03:00
|
|
|
|
- script: |
|
|
|
|
|
cargo clean
|
|
|
|
|
refreshenv
|
|
|
|
|
LIBCLANG_PATH=C:\Program Files\LLVM\lib
|
|
|
|
|
LLVM_CONFIG_PATH=C:\Program Files\LLVM\bin\llvm-config
|
|
|
|
|
ROARING_ARCH=x86-64-v2
|
|
|
|
|
cargo build --release
|
2019-05-03 18:08:14 +03:00
|
|
|
|
displayName: Build Release
|
|
|
|
|
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
|
|
|
|
|
- script: |
|
|
|
|
|
SET MY_TAG=$(Build.SourceBranch)
|
|
|
|
|
SET MY_TAG=%MY_TAG:~10%
|
|
|
|
|
echo %MY_TAG%
|
|
|
|
|
echo %PLATFORM%
|
|
|
|
|
echo ##vso[task.setvariable variable=build.my_tag]%MY_TAG%
|
|
|
|
|
echo ##vso[task.setvariable variable=build.platform]%PLATFORM%
|
|
|
|
|
displayName: "Create my tag variable"
|
|
|
|
|
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
|
displayName: Copy assets
|
|
|
|
|
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
|
|
|
|
|
inputs:
|
|
|
|
|
sourceFolder: '$(Build.SourcesDirectory)\target\release'
|
|
|
|
|
contents: 'grin-wallet.exe'
|
|
|
|
|
targetFolder: '$(Build.BinariesDirectory)\grin-wallet'
|
|
|
|
|
- task: ArchiveFiles@2
|
|
|
|
|
displayName: Gather assets
|
|
|
|
|
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
|
|
|
|
|
inputs:
|
|
|
|
|
rootFolderOrFile: '$(Build.BinariesDirectory)\grin-wallet'
|
|
|
|
|
archiveType: 'zip'
|
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)\grin-wallet-$(build.my_tag)-$(build.platform).zip'
|
|
|
|
|
- script: |
|
2020-10-02 19:31:13 +03:00
|
|
|
|
powershell -Command "cd $(Build.ArtifactStagingDirectory); get-filehash -algorithm sha256 grin-wallet-$(build.my_tag)-$(build.platform).zip | Format-List | Out-String | ForEach-Object { $_.Trim() } > grin-wallet-$(build.my_tag)-$(build.platform)-sha256sum.txt"
|
2019-05-03 18:08:14 +03:00
|
|
|
|
displayName: Create Checksum
|
|
|
|
|
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
|
|
|
|
|
- task: GithubRelease@0
|
|
|
|
|
displayName: Github release
|
|
|
|
|
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
|
|
|
|
|
inputs:
|
2019-05-09 20:38:14 +03:00
|
|
|
|
gitHubConnection: 'ignopeverell'
|
|
|
|
|
repositoryName: 'mimblewimble/grin-wallet'
|
2019-05-03 18:08:14 +03:00
|
|
|
|
action: 'edit'
|
|
|
|
|
target: '$(build.sourceVersion)'
|
|
|
|
|
tagSource: 'manual'
|
|
|
|
|
tag: '$(build.my_tag)'
|
|
|
|
|
assets: |
|
|
|
|
|
$(Build.ArtifactStagingDirectory)\grin-wallet-$(build.my_tag)-$(build.platform).zip
|
|
|
|
|
$(Build.ArtifactStagingDirectory)\grin-wallet-$(build.my_tag)-$(build.platform)-sha256sum.txt
|
|
|
|
|
title: '$(build.my_tag)'
|
|
|
|
|
assetUploadMode: 'replace'
|
|
|
|
|
addChangeLog: true
|