mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 09:04:59 +08:00
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
---
|
|
trigger:
|
|
branches:
|
|
include: [ master ]
|
|
|
|
pr: [ master ]
|
|
|
|
jobs:
|
|
- job: test
|
|
pool:
|
|
vmImage: 'Ubuntu 16.04'
|
|
container: tpayet/chiquitita:latest
|
|
steps:
|
|
- script: |
|
|
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
|
|
$HOME/.cargo/bin/rustup component add rustfmt
|
|
displayName: 'Install rustc and components'
|
|
- script: |
|
|
$HOME/.cargo/bin/cargo check
|
|
displayName: 'Check MeiliDB'
|
|
- script: |
|
|
$HOME/.cargo/bin/cargo test
|
|
displayName: 'Test MeiliDB'
|
|
- script: |
|
|
$HOME/.cargo/bin/cargo fmt --all -- --check
|
|
displayName: 'Fmt MeiliDB'
|
|
|
|
- job: build
|
|
dependsOn:
|
|
- test
|
|
condition: succeeded()
|
|
pool:
|
|
vmImage: 'Ubuntu 16.04'
|
|
container: tpayet/chiquitita:latest
|
|
steps:
|
|
- script: |
|
|
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
|
|
$HOME/.cargo/bin/rustup component add rustfmt
|
|
displayName: 'Install rustc and components'
|
|
- script: |
|
|
$HOME/.cargo/bin/cargo build --release
|
|
displayName: 'Build MeiliDB'
|
|
- task: CopyFiles@2
|
|
inputs:
|
|
contents: '$(System.DefaultWorkingDirectory)/target/release/meilidb-http'
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
displayName: 'Copy build'
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
artifactName: meilidb
|
|
displayName: 'Upload artifacts'
|
|
|