From ef099c7994b0b125f4e55c74c3a2e5017e658587 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 2 Apr 2019 07:57:02 -0700 Subject: [PATCH] Add sample azure pipelines configuration --- azure-pipelines.yml | 33 +++++++++++++++++++++++++++++++++ ci/azure-install-rust.yml | 25 +++++++++++++++++++++++++ ci/azure-steps.yml | 10 ++++++++++ 3 files changed, 68 insertions(+) create mode 100644 azure-pipelines.yml create mode 100644 ci/azure-install-rust.yml create mode 100644 ci/azure-steps.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..f7a25ae --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,33 @@ +trigger: + - master + +jobs: + - job: Linux + pool: + vmImage: ubuntu-16.04 + steps: + - template: ci/azure-steps.yml + strategy: + matrix: + aarch64-unknown-linux-gnu: + TARGET: aarch64-unknown-linux-gnu + + - job: macOS + pool: + vmImage: macos-10.13 + steps: + - template: ci/azure-steps.yml + strategy: + matrix: + x86_64-apple-darwin: + TARGET: x86_64-apple-darwin + + - job: Windows + pool: + vmImage: 'vs2017-win2016' + steps: + - template: ci/azure-steps.yml + strategy: + matrix: + i686-pc-windows-msvc: + TARGET: i686-pc-windows-msvc diff --git a/ci/azure-install-rust.yml b/ci/azure-install-rust.yml new file mode 100644 index 0000000..25e48f9 --- /dev/null +++ b/ci/azure-install-rust.yml @@ -0,0 +1,25 @@ +parameters: + toolchain: 'nightly' + +steps: + - bash: | + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN + echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" + displayName: Install rust + condition: ne( variables['Agent.OS'], 'Windows_NT' ) + env: + TOOLCHAIN: ${{ parameters.toolchain }} + + - script: | + curl -sSf -o rustup-init.exe https://win.rustup.rs + rustup-init.exe -y --default-toolchain %TOOLCHAIN% + echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" + displayName: Install rust + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + env: + TOOLCHAIN: ${{ parameters.toolchain }} + + - script: | + rustc -Vv + cargo -V + displayName: Query rust and cargo versions diff --git a/ci/azure-steps.yml b/ci/azure-steps.yml new file mode 100644 index 0000000..a6acba4 --- /dev/null +++ b/ci/azure-steps.yml @@ -0,0 +1,10 @@ +steps: + - template: azure-install-rust.yml + + - bash: ./ci/run.sh $TARGET + condition: ne( variables['Agent.OS'], 'Linux' ) + displayName: Run test script + + - bash: ./ci/run-docker.sh $TARGET + condition: eq( variables['Agent.OS'], 'Linux' ) + displayName: Run docker test script