2019-04-02 22:57:02 +08:00
|
|
|
steps:
|
2019-04-02 22:58:12 +08:00
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
2019-04-02 23:27:38 +08:00
|
|
|
|
2019-04-02 22:57:02 +08:00
|
|
|
- template: azure-install-rust.yml
|
|
|
|
|
2019-04-03 02:44:28 +08:00
|
|
|
- script: rustup component add rust-src
|
|
|
|
displayName: Install Rust sources
|
|
|
|
condition: eq( variables['XARGO'], '1' )
|
|
|
|
|
2019-04-02 23:27:38 +08:00
|
|
|
- bash: rustup target add $TARGET
|
2019-04-03 02:44:28 +08:00
|
|
|
displayName: Install Rust target
|
|
|
|
condition: ne( variables['XARGO'], '1' )
|
2019-04-02 23:27:38 +08:00
|
|
|
|
2019-04-02 22:57:02 +08:00
|
|
|
- bash: ./ci/run.sh $TARGET
|
|
|
|
condition: ne( variables['Agent.OS'], 'Linux' )
|
|
|
|
displayName: Run test script
|
|
|
|
|
2019-04-03 02:44:28 +08:00
|
|
|
- bash: |
|
|
|
|
if [ "$ONLY_BUILD" = "1" ]; then
|
|
|
|
cargo build --target $TARGET
|
|
|
|
else
|
|
|
|
cargo generate-lockfile && ./ci/run-docker.sh $TARGET
|
|
|
|
fi
|
2019-04-02 22:57:02 +08:00
|
|
|
condition: eq( variables['Agent.OS'], 'Linux' )
|
|
|
|
displayName: Run docker test script
|