From 6a326d6a110ef7176f9de34d0b26ab0b15296005 Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Sat, 21 Sep 2019 10:56:11 +0200 Subject: [PATCH] Working on Azure pipelines --- azure-pipelines.yml | 52 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index aa91291..f6ca091 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 \ No newline at end of file