From 7dc94e470b794dccb1b145c558285b75579d3678 Mon Sep 17 00:00:00 2001 From: "azure-pipelines[bot]" Date: Wed, 21 Nov 2018 18:35:43 +0000 Subject: [PATCH 1/2] Set up CI with Azure Pipelines --- .azure-pipelines-template.yml | 49 +++++++++++++++++++++++++++++++++++ .azure-pipelines.yml | 15 +++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .azure-pipelines-template.yml create mode 100644 .azure-pipelines.yml diff --git a/.azure-pipelines-template.yml b/.azure-pipelines-template.yml new file mode 100644 index 00000000..a125d8dd --- /dev/null +++ b/.azure-pipelines-template.yml @@ -0,0 +1,49 @@ +jobs: +- job: ${{ parameters.name }} + pool: + vmImage: ${{ parameters.vmImage }} + strategy: + matrix: + stable: + rustup_toolchain: stable + beta: + rustup_toolchain: beta + nightly: + rustup_toolchain: nightly + steps: + # Linux and macOS. + - ${{ if ne(parameters.name, 'Windows') }}: + - script: | + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN + echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" + displayName: Install rust + # Windows. + - ${{ if eq(parameters.name, '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" + displayName: Install rust (windows) + # All platforms. + - script: | + rustc -Vv + cargo -V + displayName: Query rust and cargo versions + - script: cargo build + displayName: Build + # Linux and macOS w/nightly toolchain. + # Ideally we'd only run the script for the nightly toolchain, but I can't + # figure out how to determine that within the Azure Pipelines conditional. + - ${{ if ne(parameters.name, 'Windows') }}: + - script: | + if [ "$RUSTUP_TOOLCHAIN" = 'nightly' ] + then cargo test + fi + displayName: Test + # Windows w/nightly toolchain. + # Ideally we'd only run the script for the nightly toolchain, but I can't + # figure out how to determine that within the Azure Pipelines conditional. + - ${{ if eq(parameters.name, 'Windows') }}: + - script: if "%RUSTUP_TOOLCHAIN%" == "nightly" cargo test + displayName: Test diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml new file mode 100644 index 00000000..e317b319 --- /dev/null +++ b/.azure-pipelines.yml @@ -0,0 +1,15 @@ +jobs: +- template: .azure-pipelines-template.yml + parameters: + name: macOS + vmImage: macOS-10.13 + +- template: .azure-pipelines-template.yml + parameters: + name: Linux + vmImage: ubuntu-16.04 + +- template: .azure-pipelines-template.yml + parameters: + name: Windows + vmImage: vs2017-win2016 From 1b6cef9c3b7af1a86d1fa90eddacc909d0ede44c Mon Sep 17 00:00:00 2001 From: Myk Melez Date: Fri, 30 Nov 2018 15:38:39 -0800 Subject: [PATCH 2/2] move back to default azure-pipelines.yml config file --- ...e-pipelines-template.yml => azure-pipelines-template.yml | 0 .azure-pipelines.yml => azure-pipelines.yml | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename .azure-pipelines-template.yml => azure-pipelines-template.yml (100%) rename .azure-pipelines.yml => azure-pipelines.yml (58%) diff --git a/.azure-pipelines-template.yml b/azure-pipelines-template.yml similarity index 100% rename from .azure-pipelines-template.yml rename to azure-pipelines-template.yml diff --git a/.azure-pipelines.yml b/azure-pipelines.yml similarity index 58% rename from .azure-pipelines.yml rename to azure-pipelines.yml index e317b319..5666af58 100644 --- a/.azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,15 +1,15 @@ jobs: -- template: .azure-pipelines-template.yml +- template: azure-pipelines-template.yml parameters: name: macOS vmImage: macOS-10.13 -- template: .azure-pipelines-template.yml +- template: azure-pipelines-template.yml parameters: name: Linux vmImage: ubuntu-16.04 -- template: .azure-pipelines-template.yml +- template: azure-pipelines-template.yml parameters: name: Windows vmImage: vs2017-win2016