Skip to content

Commit

Permalink
ci: define Azure Pipelines configuration
Browse files Browse the repository at this point in the history
Inspired by mozilla/lmdb-rs#16.

I'm not sure if this will work. But it looks right.
  • Loading branch information
indygreg committed Jun 29, 2019
1 parent 07ebadb commit 0a5cf9d
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
15 changes: 15 additions & 0 deletions azure-pipelines.yaml
@@ -0,0 +1,15 @@
jobs:
- template: ci/azure-pipelines-template.yml
parameters:
name: Linux
vmImage: ubuntu-16.04

- template: ci/azure-pipelines-template.yml
parameters:
name: macOS
vmImage: macOS-10.14

- template: ci/azure-pipelines-template.yml
parameters:
name: Windows
vmImage: vs2017-win2016
46 changes: 46 additions & 0 deletions ci/azure-pipelines-template.yml
@@ -0,0 +1,46 @@
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
stable:
rustup_toolchain: stable
beta:
rustup_toolchain: beta
nightly:
rustup_toolchain: nightly

steps:
- ${{ 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
- ${{ 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)
- script: |
rustc -Vv
cargo -V
displayName: Query rust and cargo versions
- script: cargo build -p pyoxidizer
displayName: Build

- ${{ if ne(parameters.name, 'Windows') }}:
- script: |
if [ "$RUSTUP_TOOLCHAIN" = 'nightly' ]
then cargo test -p pyoxidizer
fi
displayName: Test
- ${{ if eq(parameters.name, 'Windows') }}:
- script: if "%RUSTUP_TOOLCHAIN%" == "nightly" cargo -p pyoxidizer test
displayName: Test

0 comments on commit 0a5cf9d

Please sign in to comment.