* Put misc_testsuite behind a feature gate This PR puts building and generating of misc_testsuite behind a feature gate "misc_testsuite". This is mainly to allow projects which pull `wasi-common` as a dependency not to have to have `wasm32-wasi` target installed in order to build it as it currently is. * Update the CI * Rename feature to wasm_tests * Explain integration testing in the README
66 lines
2.1 KiB
YAML
66 lines
2.1 KiB
YAML
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
|