-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrust-win.yml
74 lines (66 loc) · 2.23 KB
/
rust-win.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
trigger:
branches:
include: ['develop']
tags:
include: ['*']
strategy:
matrix:
windows-nightly:
imageName: 'vs2017-win2016'
rustup_toolchain: nightly-2020-06-10
pool:
vmImage: $(imageName)
steps:
- script: |
curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -y --profile minimal --default-toolchain %RUSTUP_TOOLCHAIN% --default-host x86_64-pc-windows-msvc
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
displayName: Windows install rust
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- bash: |
rustup default $RUSTUP_TOOLCHAIN
rustup update $RUSTUP_TOOLCHAIN
displayName: "Set toolchain version"
#build
- script: cargo build --release --features embed_ui
displayName: Cargo build (WIN)
condition: eq( variables['Agent.OS'], 'Windows_NT' )
# This step help publish targets folder
- task: CopyFiles@2
displayName: Copy application
inputs:
sourceFolder: '$(Build.SourcesDirectory)/target/release/'
contents: |
mud-saver.exe
targetFolder: '$(Build.BinariesDirectory)/mud-saver'
- task: CopyFiles@2
displayName: Copy images
inputs:
SourceFolder: '$(Build.SourcesDirectory)/images'
Contents: '**'
TargetFolder: '$(Build.BinariesDirectory)/mud-saver/images'
- task: CopyFiles@2
displayName: Copy templates
inputs:
SourceFolder: '$(Build.SourcesDirectory)/templates'
Contents: '**'
TargetFolder: '$(Build.BinariesDirectory)/mud-saver/templates'
- task: CopyFiles@2
displayName: Copy static
inputs:
SourceFolder: '$(Build.SourcesDirectory)/static'
Contents: '**'
TargetFolder: '$(Build.BinariesDirectory)/mud-saver/static'
- task: ArchiveFiles@2
displayName: Create Archive
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)/mud-saver'
archiveType: zip
archiveFile: '$(Build.ArtifactStagingDirectory)/mud-saver-$(Build.BuildNumber)-win64.zip'
- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'