This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from jaspervdm/master
Set up Azure pipelines CI
- Loading branch information
Showing
5 changed files
with
197 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
steps: | ||
- script: | | ||
choco install -y llvm | ||
displayName: Windows Install LLVM | ||
condition: eq( variables['Agent.OS'], 'Windows_NT' ) | ||
- script: | | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" | ||
displayName: macOS Install Rust | ||
condition: eq( variables['Agent.OS'], 'Darwin' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
steps: | ||
- script: 'cargo build --release' | ||
displayName: Build Release | ||
condition: succeeded() | ||
- script: | | ||
MY_TAG="$(Build.SourceBranch)" | ||
MY_TAG=${MY_TAG#refs/tags/} | ||
echo $MY_TAG | ||
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: 'wallet713' | ||
targetFolder: '$(Build.BinariesDirectory)' | ||
- task: ArchiveFiles@2 | ||
displayName: Gather assets | ||
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' )) | ||
inputs: | ||
rootFolderOrFile: '$(Build.BinariesDirectory)/wallet713' | ||
archiveType: 'tar' | ||
tarCompression: 'gz' | ||
archiveFile: '$(Build.ArtifactStagingDirectory)/wallet713-$(build.my_tag)-$(build.platform).tar.gz' | ||
- script: | | ||
openssl sha256 $(Build.ArtifactStagingDirectory)/wallet713-$(build.my_tag)-$(build.platform).tar.gz > $(Build.ArtifactStagingDirectory)/wallet713-$(build.my_tag)-$(build.platform)-sha256sum.txt | ||
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: | ||
gitHubConnection: 'jaspervdm' | ||
repositoryName: 'vault713/wallet713' | ||
action: 'edit' | ||
target: '$(build.sourceVersion)' | ||
tagSource: 'manual' | ||
tag: '$(build.my_tag)' | ||
assets: | | ||
$(Build.ArtifactStagingDirectory)/wallet713-$(build.my_tag)-$(build.platform).tar.gz | ||
$(Build.ArtifactStagingDirectory)/wallet713-$(build.my_tag)-$(build.platform)-sha256sum.txt | ||
title: '$(build.my_tag)' | ||
assetUploadMode: 'replace' | ||
addChangeLog: true | ||
compareWith: 'lastFullRelease' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
steps: | ||
- script: 'cargo build --release' | ||
displayName: Build Release | ||
condition: succeeded() | ||
- script: | | ||
MY_TAG="$(Build.SourceBranch)" | ||
MY_TAG=${MY_TAG#refs/tags/} | ||
echo $MY_TAG | ||
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: 'wallet713' | ||
targetFolder: '$(Build.BinariesDirectory)' | ||
- task: ArchiveFiles@2 | ||
displayName: Gather assets | ||
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' )) | ||
inputs: | ||
rootFolderOrFile: '$(Build.BinariesDirectory)/wallet713' | ||
archiveType: 'tar' | ||
tarCompression: 'gz' | ||
archiveFile: '$(Build.ArtifactStagingDirectory)/wallet713-$(build.my_tag)-$(build.platform).tar.gz' | ||
- script: | | ||
openssl sha256 $(Build.ArtifactStagingDirectory)/wallet713-$(build.my_tag)-$(build.platform).tar.gz > $(Build.ArtifactStagingDirectory)/wallet713-$(build.my_tag)-$(build.platform)-sha256sum.txt | ||
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: | ||
gitHubConnection: 'jaspervdm' | ||
repositoryName: 'vault713/wallet713' | ||
action: 'edit' | ||
target: '$(build.sourceVersion)' | ||
tagSource: 'manual' | ||
tag: '$(build.my_tag)' | ||
assets: | | ||
$(Build.ArtifactStagingDirectory)/wallet713-$(build.my_tag)-$(build.platform).tar.gz | ||
$(Build.ArtifactStagingDirectory)/wallet713-$(build.my_tag)-$(build.platform)-sha256sum.txt | ||
title: '$(build.my_tag)' | ||
assetUploadMode: 'replace' | ||
addChangeLog: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
steps: | ||
- script: 'cargo build --release' | ||
displayName: Build Release | ||
condition: succeeded() | ||
- 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: 'wallet713.exe' | ||
targetFolder: '$(Build.BinariesDirectory)' | ||
- task: ArchiveFiles@2 | ||
displayName: Gather assets | ||
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' )) | ||
inputs: | ||
rootFolderOrFile: '$(Build.BinariesDirectory)\wallet713.exe' | ||
archiveType: 'zip' | ||
archiveFile: '$(Build.ArtifactStagingDirectory)\wallet713-$(build.my_tag)-$(build.platform).zip' | ||
- script: | | ||
powershell -Command "get-filehash -algorithm sha256 $(Build.ArtifactStagingDirectory)\wallet713-$(build.my_tag)-$(build.platform).zip | Format-List | Out-String | ForEach-Object { $_.Trim() } > $(Build.ArtifactStagingDirectory)\wallet713-$(build.my_tag)-$(build.platform)-sha256sum.txt" | ||
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: | ||
gitHubConnection: 'jaspervdm' | ||
repositoryName: 'vault713/wallet713' | ||
action: 'edit' | ||
target: '$(build.sourceVersion)' | ||
tagSource: 'manual' | ||
tag: '$(build.my_tag)' | ||
assets: | | ||
$(Build.ArtifactStagingDirectory)\wallet713-$(build.my_tag)-$(build.platform).zip | ||
$(Build.ArtifactStagingDirectory)\wallet713-$(build.my_tag)-$(build.platform)-sha256sum.txt | ||
title: '$(build.my_tag)' | ||
assetUploadMode: 'replace' | ||
addChangeLog: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
trigger: | ||
tags: | ||
include: ['*'] | ||
|
||
pr: | ||
branches: | ||
include: ['*'] | ||
|
||
variables: | ||
RUST_BACKTRACE: '1' | ||
RUSTFLAGS: '-C debug-assertions' | ||
|
||
jobs: | ||
- job: linux | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
strategy: | ||
matrix: | ||
release: | ||
CI_JOB: release | ||
PLATFORM: linux-amd64 | ||
steps: | ||
- template: '.ci/linux-release.yml' | ||
- job: macos | ||
pool: | ||
vmImage: macos-10.14 | ||
strategy: | ||
matrix: | ||
release: | ||
CI_JOB: release | ||
PLATFORM: macos | ||
steps: | ||
- template: '.ci/install.yml' | ||
- template: '.ci/macos-release.yml' | ||
- job: windows | ||
pool: | ||
vmImage: windows-2019 | ||
strategy: | ||
matrix: | ||
release: | ||
CI_JOB: release | ||
PLATFORM: win-x64 | ||
steps: | ||
- template: '.ci/install.yml' | ||
- template: '.ci/windows-release.yml' |