forked from CraneStation/wasi-common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.azure-pipelines.yml
65 lines (62 loc) · 2.15 KB
/
.azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: $(Build.SourceBranch)-$(date:yyyyMMdd)$(rev:.r)
trigger:
branches:
include:
- '*'
jobs:
- job: Build
strategy:
matrix:
windows-stable:
imageName: 'vs2017-win2016'
rustup_toolchain: stable
linux-stable:
imageName: 'ubuntu-16.04'
rustup_toolchain: stable
mac-stable:
imageName: 'macos-10.14'
rustup_toolchain: stable
pool:
vmImage: $(imageName)
steps:
- checkout: self
submodules: true
- script: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
export PATH=$PATH:$HOME/.cargo/bin
rustup update $RUSTUP_TOOLCHAIN
rustup default $RUSTUP_TOOLCHAIN
rustc --version
displayName: Install rust (*nix)
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: |
rustup update %RUSTUP_TOOLCHAIN%
rustup default %RUSTUP_TOOLCHAIN%
rustc --version
displayName: Install rust (Win)
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: rustup target add wasm32-wasi
displayName: Install wasm32-wasi target
- script: |
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf %TEMP%\LLVM-8.0.0-win64.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/LLVM-8.0.0-win64.exe"
%TEMP%\LLVM-8.0.0-win64.exe /S /NCRC
condition: eq(variables['Agent.OS'], 'Windows_NT')
displayName: Install clang (Win)
- script: cargo fetch
displayName: Fetch cargo dependencies
- script: |
rustup component add rustfmt
rustup component list
cargo fmt --all -- --check
condition: eq( variables['rustup_toolchain'], 'stable' )
displayName: Check formatting
- script: cargo build --release
displayName: Cargo build release
- script: cargo build
displayName: Cargo build
- bash: RUST_BACKTRACE=1 cargo test --features wasm_tests --all
displayName: Cargo test
- script: cargo doc
condition: eq(variables['Agent.OS'], 'Darwin')
displayName: Cargo doc