2019-03-06 16:03:52 +01:00
|
|
|
---
|
|
|
|
trigger:
|
|
|
|
branches:
|
|
|
|
include: [ master ]
|
|
|
|
|
|
|
|
pr: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: test
|
|
|
|
pool:
|
|
|
|
vmImage: 'Ubuntu 16.04'
|
|
|
|
container: tpayet/chiquitita:latest
|
|
|
|
steps:
|
|
|
|
- script: |
|
2019-11-22 11:43:02 +01:00
|
|
|
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
|
2019-10-18 13:29:11 +02:00
|
|
|
$HOME/.cargo/bin/rustup component add rustfmt
|
|
|
|
displayName: 'Install rustc and components'
|
2019-03-06 16:03:52 +01:00
|
|
|
- script: |
|
|
|
|
$HOME/.cargo/bin/cargo check
|
|
|
|
displayName: 'Check MeiliDB'
|
|
|
|
- script: |
|
|
|
|
$HOME/.cargo/bin/cargo test
|
|
|
|
displayName: 'Test MeiliDB'
|
2019-10-18 13:29:11 +02:00
|
|
|
- script: |
|
|
|
|
$HOME/.cargo/bin/cargo fmt --all -- --check
|
|
|
|
displayName: 'Fmt MeiliDB'
|
2019-03-06 16:03:52 +01:00
|
|
|
|
|
|
|
- job: build
|
|
|
|
dependsOn:
|
|
|
|
- test
|
|
|
|
condition: succeeded()
|
|
|
|
pool:
|
|
|
|
vmImage: 'Ubuntu 16.04'
|
|
|
|
container: tpayet/chiquitita:latest
|
|
|
|
steps:
|
|
|
|
- script: |
|
2019-11-22 11:43:02 +01:00
|
|
|
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
|
2019-10-18 13:29:11 +02:00
|
|
|
$HOME/.cargo/bin/rustup component add rustfmt
|
|
|
|
displayName: 'Install rustc and components'
|
2019-03-06 16:03:52 +01:00
|
|
|
- script: |
|
|
|
|
$HOME/.cargo/bin/cargo build --release
|
|
|
|
displayName: 'Build MeiliDB'
|
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
2019-11-13 11:15:39 +01:00
|
|
|
contents: '$(System.DefaultWorkingDirectory)/target/release/meilidb-http'
|
2019-03-06 16:03:52 +01:00
|
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
displayName: 'Copy build'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
2019-11-13 11:15:39 +01:00
|
|
|
artifactName: meilidb
|
2019-03-06 16:03:52 +01:00
|
|
|
displayName: 'Upload artifacts'
|
|
|
|
|