---
phases:
- phase: Windows
queue: Hosted VS2017
steps:
- powershell: |
Write-Host "##vso[build.updatebuildnumber]v0.1.2.$env:BUILD_BUILDID"
displayName: Label Build
- powershell: |
invoke-restmethod -usebasicparsing 'https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe' -outfile 'rustup-init.exe'
./rustup-init.exe -y --default-toolchain stable-x86_64-pc-windows-msvc --no-modify-path
& "$env:USERPROFILE/.cargo/bin/rustup.exe" install nightly-x86_64-pc-windows-msvc
remove-item rustup-init.exe
displayName: Install Rust
- powershell: |
& "$env:USERPROFILE/.cargo/bin/cargo.exe" +stable-x86_64-pc-windows-msvc check
displayName: Cargo Check
- powershell: |
& "$env:USERPROFILE/.cargo/bin/cargo.exe" +stable-x86_64-pc-windows-msvc test
displayName: Run Tests
- powershell: |
& "$env:USERPROFILE/.cargo/bin/cargo.exe" +stable-x86_64-pc-windows-msvc build --release
displayName: Build Release
-
task: PublishBuildArtifacts@1
displayName: "Publish Artifact: Release Build"
inputs:
PathtoPublish: ./target/release/proxyconf.exe
ArtifactName: drop
ArtifactType: Container
TargetPath: "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)"
Parallel: "false"
ParallelCount: "8"