wasmer/azure-pipelines.yml

100 lines
2.4 KiB
YAML
Raw Normal View History

2019-08-10 11:11:54 -07:00
name: $(Build.SourceBranch)-$(date:yyyyMMdd)$(rev:.r)
# The Different jobs (lint, test, build to run)
jobs:
- job: lint
pool:
vmImage: 'ubuntu-16.04'
steps:
- checkout: self
submodules: true
- template: .azure/install-rust.yml
2019-08-10 14:56:58 -07:00
- script: |
2019-08-10 11:11:54 -07:00
rustup component add rustfmt
rustup component add clippy || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
2019-08-10 14:56:58 -07:00
displayName: Lint dependencies
- script: cargo fmt --all -- --check
displayName: Lint
2019-08-10 11:11:54 -07:00
variables:
rust_toolchain: stable
- job: Test
strategy:
matrix:
linux:
imageName: 'ubuntu-16.04'
2019-08-10 16:31:50 -07:00
rust_toolchain: nightly-2019-06-10
2019-08-10 11:11:54 -07:00
mac:
imageName: 'macos-10.14'
2019-08-10 16:31:50 -07:00
rust_toolchain: nightly-2019-06-10
2019-08-10 11:11:54 -07:00
windows:
imageName: 'vs2017-win2016'
2019-08-10 16:31:50 -07:00
rust_toolchain: stable
2019-08-10 11:11:54 -07:00
2019-08-10 17:57:35 -07:00
variables:
SCCACHE_DIR: $(Pipeline.Workspace)/.sccache
2019-08-10 11:11:54 -07:00
pool:
vmImage: $(imageName)
steps:
- checkout: self
submodules: true
- template: .azure/install-rust.yml
2019-08-10 15:32:09 -07:00
- template: .azure/install-cmake.yml
- template: .azure/install-llvm.yml
2019-08-10 17:41:50 -07:00
- template: .azure/install-sccache.yml
2019-08-10 15:48:56 -07:00
- task: CacheBeta@0
inputs:
key: |
cargo
$(Agent.OS)
$(Build.SourcesDirectory)/Cargo.lock
path: $(Build.SourcesDirectory)/target
displayName: Cache Cargo Target
2019-08-10 14:56:58 -07:00
- bash: make test
2019-08-10 16:31:50 -07:00
displayName: Tests (*nix)
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')))
- bash: make spectests-cranelift
displayName: Tests (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
2019-08-10 16:41:58 -07:00
- bash: make check
displayName: Check with Flags
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')))
2019-08-10 16:31:50 -07:00
2019-08-10 16:18:06 -07:00
# - bash: make integration-tests
# displayName: Integration Tests
2019-08-10 11:11:54 -07:00
# - job: Build
# strategy:
# matrix:
# linux:
# imageName: 'ubuntu-16.04'
# mac:
# imageName: 'macos-10.14'
# MACOSX_DEPLOYMENT_TARGET: 10.10
# windows:
# imageName: 'vs2017-win2016'
# RUSTFLAGS: -Ctarget-feature=+crt-static
# variables:
# rust_toolchain: nightly-2019-06-10
# pool:
# vmImage: $(imageName)
# steps:
# - checkout: self
# submodules: true
# - template: .azure/install-rust.yml
2019-08-10 14:56:58 -07:00
# - bash: make test
# displayName: Tests
2019-08-10 11:11:54 -07:00
trigger:
branches:
include:
- '*'