trigger:
branches:
include:
- "*"
tags:
include:
- "*"
strategy:
matrix:
linux:
imageName: 'ubuntu-16.04'
TARGET: x86_64-unknown-linux-gnu
PROFILE: linux
macos:
imageName: 'macos-10.13'
TARGET: x86_64-apple-darwin
PROFILE: mac
windows:
imageName: 'vs2017-win2016'
TARGET: x86_64-pc-windows-msvc
PROFILE: windows
pool:
vmImage: $(imageName)
variables:
RUSTUP_TOOLCHAIN: stable
CARGO_MAKE_CI: TRUE
steps:
- bash: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
condition: eq( variables['Agent.OS'], 'Linux' )
displayName: install rustup
- bash: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
condition: eq( variables['Agent.OS'], 'Darwin' )
displayName: install rustup
- script: |
curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: install rustup
- script: cargo install cargo-make || echo "cargo-make already installed"
displayName: install cargo-make
- script: |
rustup -V
rustc -V
cargo -V
cargo make --version
displayName: query versions
- script: |
cargo make --profile $(PROFILE) ci-flow
displayName: ci-flow
- script: |
cargo make --profile $(PROFILE) zip-release-ci-flow
displayName: zip-release-ci-flow
- script: |
cargo make -v --profile $(PROFILE) github-upload-flow
displayName: upload to gitHub release
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)