Working on Azure pipelines

This commit is contained in:
Federico Terzi 2019-09-21 10:56:11 +02:00
parent fee1f5edc1
commit 6a326d6a11

View File

@ -6,14 +6,52 @@
trigger:
- master
strategy:
matrix:
linux:
imageName: 'ubuntu-latest'
# mac:
# imageName: 'macos-10.13'
# windows:
# imageName: 'vs2017-win2016'
pool:
vmImage: 'ubuntu-latest'
vmImage: $(imageName)
steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'
# Install RUST
- script: |
echo Add other tasks to build, test, and deploy your project.
echo See https://aka.ms/yaml
displayName: 'Run a multi-line script'
# Linux and macOS.
- script: |
set -e
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
env:
RUSTUP_TOOLCHAIN: ${{parameters.rust_version}}
displayName: "Install rust (*nix)"
condition: not(eq(variables['Agent.OS'], 'Windows_NT'))
# Windows.
- 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"
env:
RUSTUP_TOOLCHAIN: ${{parameters.rust_version}}
displayName: "Install rust (windows)"
condition: eq(variables['Agent.OS'], 'Windows_NT')
# All platforms.
- script: |
rustup -V
rustup component list --installed
rustc -Vv
cargo -V
displayName: Query rust and cargo versions
# Build espanso
- script: |
cargo build --release
displayName: Building espanso