mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-30 22:41:03 +00:00
Initial version of Azure pipelines
This commit is contained in:
parent
d23e5eb18c
commit
462b0b5149
79
.azure-pipelines.yml
Normal file
79
.azure-pipelines.yml
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
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
|
||||||
|
- displayName: Lint dependencies
|
||||||
|
script: |
|
||||||
|
rustup component add rustfmt
|
||||||
|
rustup component add clippy || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
|
||||||
|
- displayName: Lint
|
||||||
|
script: cargo fmt --all -- --check
|
||||||
|
|
||||||
|
variables:
|
||||||
|
rust_toolchain: stable
|
||||||
|
|
||||||
|
- job: Test
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
linux:
|
||||||
|
imageName: 'ubuntu-16.04'
|
||||||
|
mac:
|
||||||
|
imageName: 'macos-10.14'
|
||||||
|
windows:
|
||||||
|
imageName: 'vs2017-win2016'
|
||||||
|
|
||||||
|
variables:
|
||||||
|
rust_toolchain: nightly-2019-06-10
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: $(imageName)
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- checkout: self
|
||||||
|
submodules: true
|
||||||
|
- template: .azure/install-rust.yml
|
||||||
|
- displayName: Check with Flags
|
||||||
|
bash: make check
|
||||||
|
- displayName: Tests
|
||||||
|
bash: make test
|
||||||
|
- displayName: Integration Tests
|
||||||
|
bash: make integration-tests
|
||||||
|
|
||||||
|
# - 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
|
||||||
|
# - displayName: Tests
|
||||||
|
# bash: make test
|
||||||
|
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- '*'
|
||||||
|
|
40
.azure/install-rust.yml
Normal file
40
.azure/install-rust.yml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# This template installs Rust (if doesn't exist in the systems)
|
||||||
|
# Also installs the desired Rust toolchain
|
||||||
|
|
||||||
|
# Template inspired by Tokio and wasm-bindgen templates
|
||||||
|
# Tokio template: https://github.com/tokio-rs/tokio/blob/master/ci/azure-install-rust.yml
|
||||||
|
# Wasm-bindgen template: https://github.com/rustwasm/wasm-bindgen/blob/master/ci/azure-install-rust.yml
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Install Rust in Linux, Macos
|
||||||
|
- displayName: "Install Rust (Linux, macOS)"
|
||||||
|
script: |
|
||||||
|
set -ex
|
||||||
|
if [ -x "`command -v rustup`" ]; then
|
||||||
|
echo `command -v rustup` `rustup -V` installed
|
||||||
|
else
|
||||||
|
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUST_TOOLCHAIN
|
||||||
|
echo "##vso[task.prependpath]$HOME/.cargo/bin"
|
||||||
|
fi
|
||||||
|
condition: not(eq(variables['Agent.OS'], 'Windows_NT'))
|
||||||
|
|
||||||
|
- displayName: "Install Rust (Windows)"
|
||||||
|
script: |
|
||||||
|
set -ex
|
||||||
|
if [ -x "`command -v rustup`" ]; then
|
||||||
|
echo `command -v rustup` `rustup -V` installed
|
||||||
|
else
|
||||||
|
curl -sSf -o rustup-init.exe https://win.rustup.rs
|
||||||
|
./rustup-init.exe -y --default-toolchain $RUST_TOOLCHAIN
|
||||||
|
echo "##vso[task.prependpath]$USERPROFILE/.cargo/bin"
|
||||||
|
fi
|
||||||
|
condition: eq(variables['Agent.OS'], 'Windows_NT')
|
||||||
|
|
||||||
|
- displayName: Install Rust
|
||||||
|
bash: |
|
||||||
|
set -ex
|
||||||
|
rustup update $RUST_TOOLCHAIN
|
||||||
|
rustup default $RUST_TOOLCHAIN
|
||||||
|
|
||||||
|
rustc -Vv
|
||||||
|
cargo -V
|
@ -112,9 +112,6 @@ jobs:
|
|||||||
name: Check
|
name: Check
|
||||||
command: |
|
command: |
|
||||||
make check
|
make check
|
||||||
make compile-bench-singlepass
|
|
||||||
make compile-bench-llvm
|
|
||||||
# TODO: add compile-bench-clif when it works
|
|
||||||
- run:
|
- run:
|
||||||
name: Integration Tests
|
name: Integration Tests
|
||||||
command: make integration-tests
|
command: make integration-tests
|
||||||
|
24
Makefile
24
Makefile
@ -127,9 +127,20 @@ debug:
|
|||||||
install:
|
install:
|
||||||
cargo install --path .
|
cargo install --path .
|
||||||
|
|
||||||
check:
|
# Checks
|
||||||
cargo check --release --features backend-singlepass,backend-llvm,loader-kernel
|
check-bench-singlepass:
|
||||||
|
cargo bench --all --no-run --no-default-features --features "backend-singlepass"
|
||||||
|
check-bench-clif:
|
||||||
|
cargo bench --all --no-run --no-default-features --features "backend-cranelift"
|
||||||
|
check-bench-llvm:
|
||||||
|
cargo bench --all --no-run --no-default-features --features "backend-llvm"
|
||||||
|
|
||||||
|
check-bench: check-bench-singlepass check-bench-llvm
|
||||||
|
|
||||||
|
check: check-bench
|
||||||
|
cargo check --release --features backend-singlepass,backend-llvm,loader-kernel,debug
|
||||||
|
|
||||||
|
# Release
|
||||||
release:
|
release:
|
||||||
cargo build --release --features backend-singlepass,backend-llvm,loader-kernel
|
cargo build --release --features backend-singlepass,backend-llvm,loader-kernel
|
||||||
|
|
||||||
@ -152,15 +163,6 @@ bench-clif:
|
|||||||
bench-llvm:
|
bench-llvm:
|
||||||
cargo bench --all --no-default-features --features "backend-llvm"
|
cargo bench --all --no-default-features --features "backend-llvm"
|
||||||
|
|
||||||
# compile but don't run the benchmarks
|
|
||||||
compile-bench-singlepass:
|
|
||||||
cargo bench --all --no-run --no-default-features --features "backend-singlepass"
|
|
||||||
compile-bench-clif:
|
|
||||||
cargo bench --all --no-run --no-default-features --features "backend-cranelift"
|
|
||||||
compile-bench-llvm:
|
|
||||||
cargo bench --all --no-run --no-default-features --features "backend-llvm"
|
|
||||||
|
|
||||||
|
|
||||||
# Build utils
|
# Build utils
|
||||||
build-install:
|
build-install:
|
||||||
mkdir -p ./install/bin
|
mkdir -p ./install/bin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user