Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/mft.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmer Ben-Amram <omerbenamram@gmail.com>2019-05-23 18:43:39 +0300
committerOmer Ben-Amram <omerbenamram@gmail.com>2019-05-23 18:43:39 +0300
commitb03dff67c4560407f546eab443b7b9dc1de8167c (patch)
tree224509012cb4d8480d6d4314f2d00b4eefcb80c8
parent963dcdaee596a3ab69a3eeec9c3403b4f6b0047b (diff)
added CI
-rw-r--r--azure-pipelines.yml88
1 files changed, 88 insertions, 0 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
new file mode 100644
index 0000000..d3feff9
--- /dev/null
+++ b/azure-pipelines.yml
@@ -0,0 +1,88 @@
+trigger:
+ branches:
+ include: ['*']
+ tags:
+ include: ['*']
+
+strategy:
+ matrix:
+ windows-stable:
+ imageName: 'vs2017-win2016'
+ target: 'x86_64-pc-windows-msvc'
+ rustup_toolchain: stable
+ mac-stable:
+ imageName: 'macos-10.13'
+ target: 'x86_64-apple-darwin'
+ rustup_toolchain: stable
+ linux-stable:
+ imageName: 'ubuntu-16.04'
+ target: 'x86_64-unknown-linux-gnu'
+ rustup_toolchain: stable
+
+pool:
+ vmImage: $(imageName)
+
+steps:
+ - script: |
+ curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
+ echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
+ displayName: Install rust
+ condition: ne( variables['Agent.OS'], 'Windows_NT' )
+ - script: |
+ curl -sSf -o rustup-init.exe https://win.rustup.rs
+ rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
+ echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
+ displayName: Windows install rust
+ condition: eq( variables['Agent.OS'], 'Windows_NT' )
+ - script: cargo build --release
+ displayName: Cargo build
+ - script: cargo test
+ displayName: Cargo test
+ - bash: |
+ MY_TAG="$(Build.SourceBranch)"
+ MY_TAG=${MY_TAG#refs/tags/}
+ echo $MY_TAG
+ echo "##vso[task.setvariable variable=build.my_tag]$MY_TAG"
+ displayName: "Create tag variable"
+ - bash: |
+ DATE="$(date +%Y-%m-%d)"
+ echo "##vso[task.setvariable variable=build.date]$DATE"
+ displayName: "Create date variable"
+
+ - bash: |
+ echo "##vso[task.setvariable variable=build.binary_name]mft_dump.exe"
+ displayName: "Create date variable"
+ condition: eq( variables['Agent.OS'], 'Windows_NT' )
+
+ - bash: |
+ echo "##vso[task.setvariable variable=build.binary_name]mft_dump"
+ displayName: "Create date variable"
+ condition: ne( variables['Agent.OS'], 'Windows_NT' )
+
+ - task: CopyFiles@2
+ displayName: Copy assets
+ inputs:
+ sourceFolder: '$(Build.SourcesDirectory)/target/release'
+ contents: |
+ $(build.binary_name)
+ targetFolder: '$(Build.BinariesDirectory)/$(build.binary_name)'
+ - task: ArchiveFiles@2
+ displayName: Gather assets
+ inputs:
+ rootFolderOrFile: '$(Build.BinariesDirectory)/$(build.binary_name)'
+ archiveType: 'tar'
+ tarCompression: 'gz'
+ archiveFile: '$(Build.ArtifactStagingDirectory)/mft_dump-$(build.my_tag)-$(TARGET).tar.gz'
+ - task: GithubRelease@0
+ condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
+ inputs:
+ gitHubConnection: 'Github'
+ repositoryName: 'omerbenamram/mft'
+ action: 'edit'
+ target: '$(build.sourceVersion)'
+ tagSource: 'manual'
+ tag: '$(build.my_tag)'
+ assets: '$(Build.ArtifactStagingDirectory)/mft_dump-$(build.my_tag)-$(TARGET).tar.gz'
+ title: '$(build.my_tag) - $(build.date)'
+ assetUploadMode: 'replace'
+ addChangeLog: false \ No newline at end of file