Add sample azure pipelines configuration

master
Alex Crichton 2019-04-02 07:57:02 -07:00
parent a4420e66ad
commit ef099c7994
3 changed files with 68 additions and 0 deletions

33
azure-pipelines.yml Normal file
View File

@ -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

25
ci/azure-install-rust.yml Normal file
View File

@ -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

10
ci/azure-steps.yml Normal file
View File

@ -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