2019-08-10 18:11:54 +00:00
|
|
|
name: $(Build.SourceBranch)-$(date:yyyyMMdd)$(rev:.r)
|
|
|
|
|
|
|
|
# The Different jobs (lint, test, build to run)
|
|
|
|
jobs:
|
2019-09-01 06:15:48 +00:00
|
|
|
- job: changelog
|
|
|
|
steps:
|
|
|
|
- bash: |
|
|
|
|
git --no-pager diff --name-only HEAD $(git merge-base HEAD master) --exit-code CHANGELOG.md
|
|
|
|
displayName: Changelog Updated
|
|
|
|
|
2019-09-01 04:19:50 +00:00
|
|
|
- job: lint
|
|
|
|
pool:
|
|
|
|
vmImage: "macos-10.14"
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
- template: .azure/install-rust.yml
|
|
|
|
- script: |
|
|
|
|
rustup component add rustfmt
|
|
|
|
rustup component add clippy || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
|
|
|
|
displayName: Lint dependencies
|
|
|
|
- script: cargo fmt --all -- --check
|
|
|
|
displayName: Lint
|
|
|
|
variables:
|
2019-11-18 17:59:07 +00:00
|
|
|
rust_toolchain: '1.38.0'
|
2019-08-10 18:11:54 +00:00
|
|
|
|
2019-09-01 04:19:50 +00:00
|
|
|
- job: Test
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
linux:
|
|
|
|
imageName: "ubuntu-16.04"
|
2019-09-01 18:15:35 +00:00
|
|
|
rust_toolchain: nightly-2019-08-15
|
2019-09-01 04:19:50 +00:00
|
|
|
mac:
|
|
|
|
imageName: "macos-10.14"
|
2019-09-01 18:15:35 +00:00
|
|
|
rust_toolchain: nightly-2019-08-15
|
2019-09-01 17:20:37 +00:00
|
|
|
# By default schannel checks revocation of certificates unlike some other SSL
|
|
|
|
# backends, but we've historically had problems on CI where a revocation
|
|
|
|
# server goes down presumably. See #43333 for more info
|
|
|
|
CARGO_HTTP_CHECK_REVOKE: false
|
2019-09-01 04:19:50 +00:00
|
|
|
windows:
|
|
|
|
imageName: "vs2017-win2016"
|
2019-11-18 17:59:07 +00:00
|
|
|
rust_toolchain: '1.38.0'
|
2019-09-01 04:19:50 +00:00
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
2019-09-01 06:49:30 +00:00
|
|
|
condition: in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/staging', 'refs/heads/trying')
|
2019-09-01 04:19:50 +00:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
- template: .azure/install-rust.yml
|
2019-09-01 17:20:37 +00:00
|
|
|
- template: .azure/install-llvm.yml
|
2019-09-01 04:19:50 +00:00
|
|
|
- template: .azure/install-sccache.yml
|
|
|
|
- template: .azure/install-cmake.yml
|
2019-09-16 19:14:09 +00:00
|
|
|
- bash: |
|
|
|
|
hostname
|
|
|
|
uname -a
|
|
|
|
displayName: System info (*nix)
|
|
|
|
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')))
|
|
|
|
- bash: |
|
|
|
|
cat /proc/cpuinfo
|
|
|
|
cat /proc/meminfo
|
|
|
|
displayName: System info - Extended (Linux)
|
|
|
|
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
|
2019-10-15 18:03:55 +00:00
|
|
|
- bash: |
|
2019-10-15 18:08:10 +00:00
|
|
|
sysctl -a | grep machdep.cpu
|
2019-10-15 18:03:55 +00:00
|
|
|
displayName: System info - Extended (Mac)
|
|
|
|
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
|
2019-09-01 04:19:50 +00:00
|
|
|
- bash: make test
|
|
|
|
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 18:11:54 +00:00
|
|
|
|
2019-09-01 04:19:50 +00:00
|
|
|
- job: Check
|
|
|
|
pool:
|
2019-09-01 09:46:58 +00:00
|
|
|
vmImage: "ubuntu-16.04"
|
2019-09-01 04:19:50 +00:00
|
|
|
variables:
|
2019-09-01 18:15:35 +00:00
|
|
|
rust_toolchain: nightly-2019-08-15
|
2019-09-03 21:56:29 +00:00
|
|
|
condition: in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/staging', 'refs/heads/trying')
|
2019-09-01 04:19:50 +00:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
- template: .azure/install-rust.yml
|
2019-09-01 17:20:37 +00:00
|
|
|
- template: .azure/install-llvm.yml
|
2019-09-01 04:19:50 +00:00
|
|
|
- template: .azure/install-sccache.yml
|
|
|
|
- template: .azure/install-cmake.yml
|
|
|
|
- bash: make check
|
|
|
|
displayName: Check with Flags
|
|
|
|
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')))
|
2019-08-10 18:11:54 +00:00
|
|
|
|
2019-09-01 04:30:20 +00:00
|
|
|
- job: Build_CLI
|
2019-09-01 04:19:50 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
linux:
|
|
|
|
imageName: "ubuntu-16.04"
|
2019-09-01 18:15:35 +00:00
|
|
|
rust_toolchain: nightly-2019-08-15
|
2019-09-01 04:19:50 +00:00
|
|
|
mac:
|
|
|
|
imageName: "macos-10.14"
|
2019-09-01 18:15:35 +00:00
|
|
|
rust_toolchain: nightly-2019-08-15
|
2019-09-01 04:19:50 +00:00
|
|
|
MACOSX_DEPLOYMENT_TARGET: 10.10
|
|
|
|
windows:
|
|
|
|
imageName: "vs2017-win2016"
|
2019-11-18 17:59:07 +00:00
|
|
|
rust_toolchain: '1.38.0'
|
2019-09-01 04:19:50 +00:00
|
|
|
# RUSTFLAGS: -Ctarget-feature=+crt-static
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
2019-11-23 02:59:40 +00:00
|
|
|
condition: |
|
|
|
|
or(
|
|
|
|
in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/staging', 'refs/heads/trying'),
|
|
|
|
startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
|
|
|
)
|
2019-09-01 04:19:50 +00:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
- template: .azure/install-rust.yml
|
2019-09-01 17:20:37 +00:00
|
|
|
- template: .azure/install-llvm.yml
|
2019-09-01 04:19:50 +00:00
|
|
|
- template: .azure/install-sccache.yml
|
|
|
|
- template: .azure/install-cmake.yml
|
|
|
|
- template: .azure/install-innosetup.yml
|
|
|
|
- bash: |
|
|
|
|
mkdir -p artifacts
|
|
|
|
displayName: Create Artifacts Dir
|
|
|
|
- bash: make release
|
|
|
|
displayName: Build (*nix)
|
|
|
|
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')))
|
|
|
|
- bash: make release-llvm
|
|
|
|
displayName: Build (Windows)
|
|
|
|
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
|
|
|
|
- bash: |
|
2019-11-21 03:13:59 +00:00
|
|
|
make wapm
|
2019-09-01 04:19:50 +00:00
|
|
|
displayName: Build WAPM
|
2019-09-01 07:53:41 +00:00
|
|
|
condition: |
|
2019-11-23 02:59:40 +00:00
|
|
|
startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
2019-09-01 04:19:50 +00:00
|
|
|
- bash: |
|
|
|
|
make build-install
|
|
|
|
cp ./wasmer.tar.gz ./artifacts/$(./scripts/binary-name.sh)
|
|
|
|
displayName: Build Distribution (*nix)
|
2019-09-01 07:53:41 +00:00
|
|
|
condition: |
|
|
|
|
and(
|
|
|
|
succeeded(),
|
2019-11-23 02:59:40 +00:00
|
|
|
startsWith(variables['Build.SourceBranch'], 'refs/tags'),
|
2019-09-01 07:53:41 +00:00
|
|
|
not(eq(variables['Agent.OS'], 'Windows_NT'))
|
|
|
|
)
|
2019-09-01 04:19:50 +00:00
|
|
|
- bash: |
|
|
|
|
cd ./src/installer
|
|
|
|
iscc wasmer.iss
|
|
|
|
cp WasmerInstaller.exe ../../artifacts/wasmer-windows.exe
|
|
|
|
displayName: Build Distribution (Windows)
|
2019-09-01 07:53:41 +00:00
|
|
|
condition: |
|
|
|
|
and(
|
|
|
|
succeeded(),
|
2019-11-23 02:59:40 +00:00
|
|
|
startsWith(variables['Build.SourceBranch'], 'refs/tags'),
|
2019-09-01 07:53:41 +00:00
|
|
|
eq(variables['Agent.OS'], 'Windows_NT')
|
|
|
|
)
|
2019-09-01 04:19:50 +00:00
|
|
|
- publish: $(System.DefaultWorkingDirectory)/artifacts
|
2019-09-01 04:49:57 +00:00
|
|
|
artifact: cli-$(Agent.OS)
|
2019-08-10 18:11:54 +00:00
|
|
|
|
2019-09-01 04:30:20 +00:00
|
|
|
- job: Build_Library
|
2019-09-01 04:19:50 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
linux:
|
|
|
|
imageName: "ubuntu-16.04"
|
2019-09-01 18:15:35 +00:00
|
|
|
rust_toolchain: nightly-2019-08-15
|
2019-09-01 04:19:50 +00:00
|
|
|
mac:
|
|
|
|
imageName: "macos-10.14"
|
2019-09-01 18:15:35 +00:00
|
|
|
rust_toolchain: nightly-2019-08-15
|
2019-09-01 04:19:50 +00:00
|
|
|
MACOSX_DEPLOYMENT_TARGET: 10.10
|
|
|
|
windows:
|
|
|
|
imageName: "vs2017-win2016"
|
2019-11-18 17:59:07 +00:00
|
|
|
rust_toolchain: '1.38.0'
|
2019-09-01 04:19:50 +00:00
|
|
|
# RUSTFLAGS: -Ctarget-feature=+crt-static
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
2019-11-23 02:59:40 +00:00
|
|
|
condition: |
|
|
|
|
or(
|
|
|
|
in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/staging', 'refs/heads/trying'),
|
|
|
|
startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
|
|
|
)
|
2019-09-01 04:19:50 +00:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
- template: .azure/install-rust.yml
|
2019-09-01 17:20:37 +00:00
|
|
|
# - template: .azure/install-llvm.yml
|
2019-09-01 04:19:50 +00:00
|
|
|
- template: .azure/install-sccache.yml
|
|
|
|
- template: .azure/install-cmake.yml
|
|
|
|
- bash: |
|
|
|
|
mkdir -p artifacts
|
|
|
|
displayName: Create Artifacts Dir
|
|
|
|
- bash: |
|
2019-09-01 16:42:07 +00:00
|
|
|
make test-capi
|
2019-12-13 00:38:58 +00:00
|
|
|
displayName: Test c-api
|
|
|
|
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')))
|
|
|
|
- bash: |
|
|
|
|
make capi
|
2019-09-01 04:19:50 +00:00
|
|
|
cp target/release/libwasmer_runtime_c_api.so ./artifacts
|
2019-12-09 12:39:21 +00:00
|
|
|
find target/release/build -name 'wasmer.h*' -exec cp {} ./artifacts ';'
|
2019-09-01 04:19:50 +00:00
|
|
|
displayName: Build c-api (Linux)
|
|
|
|
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
|
|
|
|
- bash: |
|
|
|
|
make capi
|
|
|
|
install_name_tool -id "@rpath/libwasmer_runtime_c_api.dylib" target/release/libwasmer_runtime_c_api.dylib
|
|
|
|
cp target/release/libwasmer_runtime_c_api.dylib ./artifacts
|
|
|
|
displayName: Build c-api (Darwin)
|
|
|
|
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
|
|
|
|
- bash: |
|
2019-09-01 16:42:07 +00:00
|
|
|
make capi
|
2019-09-01 04:19:50 +00:00
|
|
|
cp target/release/wasmer_runtime_c_api.dll ./artifacts
|
|
|
|
displayName: Build c-api (Windows)
|
|
|
|
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
|
|
|
|
- publish: $(System.DefaultWorkingDirectory)/artifacts
|
2019-09-01 04:49:57 +00:00
|
|
|
artifact: library-$(Agent.OS)
|
2019-08-26 01:18:12 +00:00
|
|
|
|
2019-09-01 04:19:50 +00:00
|
|
|
- job: Publish
|
|
|
|
dependsOn:
|
2019-09-01 04:30:20 +00:00
|
|
|
- Build_CLI
|
|
|
|
- Build_Library
|
2019-11-23 02:59:40 +00:00
|
|
|
condition: |
|
|
|
|
startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
2019-09-01 04:19:50 +00:00
|
|
|
steps:
|
2019-09-01 04:49:57 +00:00
|
|
|
# - download: current
|
|
|
|
- task: DownloadPipelineArtifact@1
|
|
|
|
inputs:
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
2019-09-01 04:19:50 +00:00
|
|
|
- bash: |
|
2019-09-01 04:49:57 +00:00
|
|
|
ls $ARTIFACT_STAGING_DIRECTORY
|
2019-09-01 06:15:48 +00:00
|
|
|
displayName: List Artifacts
|
2019-09-01 04:19:50 +00:00
|
|
|
env:
|
2019-09-01 04:49:57 +00:00
|
|
|
ARTIFACT_STAGING_DIRECTORY: $(Build.ArtifactStagingDirectory)
|
2019-11-11 21:31:38 +00:00
|
|
|
- script: VERSION_TAG=`git describe --tags` && echo "##vso[task.setvariable variable=VERSION_TAG]$VERSION_TAG"
|
|
|
|
displayName: Set the tag name as an environment variable
|
2019-09-01 04:19:50 +00:00
|
|
|
- task: GithubRelease@0
|
|
|
|
displayName: "Create GitHub Release"
|
2019-11-23 02:59:40 +00:00
|
|
|
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
|
2019-09-01 04:19:50 +00:00
|
|
|
inputs:
|
2019-11-11 19:23:46 +00:00
|
|
|
gitHubConnection: 'wasmer'
|
|
|
|
repositoryName: 'wasmerio/wasmer'
|
|
|
|
action: 'create'
|
|
|
|
target: '$(Build.SourceVersion)'
|
2019-11-11 21:31:38 +00:00
|
|
|
title: '$(VERSION_TAG)'
|
|
|
|
addChangeLog: false
|
2019-11-11 19:23:46 +00:00
|
|
|
tagSource: 'auto'
|
|
|
|
# TODO: automate it all by getting the release notes from somewhere else and using the `releaseNotesFile` key
|
|
|
|
isDraft: false
|
|
|
|
isPreRelease: false
|
2019-11-11 22:14:09 +00:00
|
|
|
assets: '$(Build.ArtifactStagingDirectory)/**'
|
2019-08-10 18:11:54 +00:00
|
|
|
|
2019-09-03 23:12:30 +00:00
|
|
|
- job: Docs
|
|
|
|
pool:
|
|
|
|
vmImage: "ubuntu-16.04"
|
|
|
|
variables:
|
|
|
|
rust_toolchain: nightly-2019-08-15
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
- template: .azure/install-rust.yml
|
|
|
|
- template: .azure/install-llvm.yml
|
|
|
|
- template: .azure/install-sccache.yml
|
|
|
|
- template: .azure/install-cmake.yml
|
|
|
|
- bash: |
|
|
|
|
make docs
|
|
|
|
displayName: Build documentation
|
|
|
|
|
2019-09-01 06:34:06 +00:00
|
|
|
# We only run the pipelines on PRs to Master
|
|
|
|
pr:
|
|
|
|
- master
|
|
|
|
|
|
|
|
# Otherwise, we test in any of this branches (master or bors related)
|
2019-08-10 18:11:54 +00:00
|
|
|
trigger:
|
2019-09-01 06:39:35 +00:00
|
|
|
- master
|
|
|
|
- staging
|
|
|
|
- trying
|
2019-11-18 21:19:05 +00:00
|
|
|
- refs/tags/*
|