diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml new file mode 100644 index 00000000..4893d187 --- /dev/null +++ b/.azure-pipelines.yml @@ -0,0 +1,15 @@ +pr: ["master"] + +jobs: + - job: + pool: + vmImage: 'ubuntu-16.04' + steps: + - template: .ci/install-rust.yml + parameters: + rust_version: stable + - bash: | + export RUST_BACKTRACE=1 + cargo check --all || exit + cargo test --all || exit + displayName: Run cargo check and test diff --git a/.ci/install-rust.yml b/.ci/install-rust.yml new file mode 100644 index 00000000..d1d0fa92 --- /dev/null +++ b/.ci/install-rust.yml @@ -0,0 +1,14 @@ +steps: + - 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 + + # All platforms. + - script: | + rustc -Vv + cargo -V + displayName: Query rust and cargo versions \ No newline at end of file