1345: Adding Azure pipelines to handle ARM r=syrusakbary a=syrusakbary

<!-- 
Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test:
https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests

-->

# Description

Adding Azure pipelines to handle ARM
<!-- 
Provide details regarding the change including motivation,
links to related issues, and the context of the PR.
-->

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Syrus <me@syrusakbary.com>
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
This commit is contained in:
bors[bot] 2020-03-30 22:38:26 +00:00 committed by GitHub
commit af03dc11b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 54 additions and 106 deletions

View File

@ -26,8 +26,22 @@ steps:
echo "##vso[task.prependpath]$LLVM_PATH/bin"
echo "##vso[task.setvariable variable=LLVM_SYS_80_PREFIX]$LLVM_PATH"
fi
displayName: "Install LLVM (Linux)"
condition: eq(variables['Agent.OS'], 'Linux')
displayName: "Install LLVM (Linux X64)"
condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['Agent.OSArchitecture'], 'X64'))
- bash: |
set -ex
if [ -x "`command -v llvm-config`" ]; then
echo `command -v llvm-config` `llvm-config --version` installed
else
curl -O https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-aarch64-linux-gnu.tar.xz
tar xf clang+llvm-8.0.0-aarch64-linux-gnu.tar.xz
export LLVM_PATH="`pwd`/clang+llvm-8.0.0-aarch64-linux-gnu/"
echo "##vso[task.prependpath]$LLVM_PATH/bin"
echo "##vso[task.setvariable variable=LLVM_SYS_80_PREFIX]$LLVM_PATH"
fi
displayName: "Install LLVM (Linux ARM)"
condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['Agent.OSArchitecture'], 'ARM64'))
- bash: |
set -ex

View File

@ -9,8 +9,12 @@ steps:
curl -L https://github.com/mozilla/sccache/releases/download/0.2.10/sccache-0.2.10-x86_64-unknown-linux-musl.tar.gz | tar xzf -
sccache=`pwd`/sccache-0.2.10-x86_64-unknown-linux-musl/sccache
echo "##vso[task.setvariable variable=RUSTC_WRAPPER;]$sccache"
displayName: Install sccache - Linux
condition: eq( variables['Agent.OS'], 'Linux' )
displayName: Install sccache - Linux X64
condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['Agent.OSArchitecture'], 'X64'))
# - bash: |
# echo "##vso[task.setvariable variable=RUSTC_WRAPPER;]sccache"
# displayName: Install sccache - Linux ARM
# condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['Agent.OSArchitecture'], 'ARM64'))
- bash: |
set -ex
brew install openssl@1.1
@ -32,7 +36,7 @@ steps:
$RUSTC_WRAPPER -s
cat sccache.log
displayName: "start sccache"
condition: not(eq( variables['Agent.OS'], 'Windows_NT' ))
condition: not(or(eq( variables['Agent.OS'], 'Windows_NT' ), eq(variables['Agent.OSArchitecture'], 'ARM64')))
env:
SCCACHE_AZURE_CONNECTION_STRING: $(SCCACHE_AZURE_CONNECTION_STRING)
SCCACHE_AZURE_BLOB_CONTAINER: $(SCCACHE_AZURE_BLOB_CONTAINER)

View File

@ -1,75 +0,0 @@
arch:
- arm64
language: rust
install: travis_retry
rust:
- nightly-2019-12-19
cache:
directories:
- /home/travis/.sccache/
- /home/travis/.cargo/bin/
script:
# Sccache
# - curl -L https://github.com/mozilla/sccache/releases/download/0.2.10/sccache-0.2.10-x86_64-unknown-linux-musl.tar.gz | tar xzf -
# - export RUSTC_WRAPPER=`pwd`/sccache-0.2.10-x86_64-unknown-linux-musl/sccache
- test -f /home/travis/.cargo/bin/sccache || travis_retry cargo install sccache
- export RUSTC_WRAPPER=/home/travis/.cargo/bin/sccache
- mkdir -p /home/travis/.sccache/
- export SCCACHE_DIR="/home/travis/.sccache/"
- SCCACHE_ERROR_LOG=`pwd`/sccache.log RUST_LOG=debug $RUSTC_WRAPPER --start-server
- $RUSTC_WRAPPER -s
# Tests
- make spectests-singlepass
before_deploy:
# Release
- make release-singlepass
- mkdir -p artifacts
# Make capi
## Disable capi tests for now:
## They are failing because trampolines are not yet implemented for ARM
# - make test-capi-singlepass
- make capi-singlepass
- make build-capi-package
- cp ./wasmer-c-api.tar.gz ./artifacts/$(./scripts/capi-name.sh)
# Build WAPM
- make build-wapm
# Make package
- make build-install-package
- cp ./wasmer.tar.gz ./artifacts/$(./scripts/binary-name.sh)
# before_deploy:
# # Set up git user name and tag this commit
# - git config --local user.name "Syrus Akbary"
# - git config --local user.email "syrus@wasmer.io"
# - export TRAVIS_TAG="0.10.2"
# # - git tag $TRAVIS_TAG
deploy:
provider: releases
file_glob: true
file: artifacts/*
api_key: $GITHUB_OAUTH_TOKEN
# This is set to the previous artifacts are not deleted by travis
skip_cleanup: true
on:
tags: true
# branch: feature/singlepass-aarch64
addons:
apt:
packages:
- cmake
branches:
only:
- master
- staging
- trying
# Making sure Travis runs on new Tags
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/

View File

@ -2,6 +2,7 @@
## **[Unreleased]**
- [#1345](https://github.com/wasmerio/wasmer/pull/1345) Adding ARM testing in Azure Pipelines
- [#1335](https://github.com/wasmerio/wasmer/pull/1335) Change mutability of `memory` to `const` in `wasmer_memory_data_length` in the C API
- [#1329](https://github.com/wasmerio/wasmer/pull/1329) New numbers and strings instructions for WIT
- [#1332](https://github.com/wasmerio/wasmer/pull/1332) Add option to `CompilerConfig` to force compiler IR verification off even when `debug_assertions` are enabled. This can be used to make debug builds faster, which may be important if you're creating a library that wraps Wasmer and depend on the speed of debug builds.

View File

@ -44,23 +44,31 @@ jobs:
strategy:
matrix:
linux:
poolName: "Azure Pipelines"
imageName: "ubuntu-16.04"
rust_toolchain: nightly-2019-12-19
android:
poolName: "Azure Pipelines"
imageName: "ubuntu-16.04"
rust_toolchain: nightly-2019-12-19
ANDROID: true
mac:
poolName: "Azure Pipelines"
imageName: "macos-10.14"
rust_toolchain: nightly-2019-12-19
# 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
arm:
poolName: "Packet"
rust_toolchain: nightly-2019-12-19
windows:
poolName: "Azure Pipelines"
imageName: "vs2017-win2016"
rust_toolchain: '1.41.1'
pool:
name: $(poolName)
vmImage: $(imageName)
condition: in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/staging', 'refs/heads/trying')
steps:
@ -85,7 +93,10 @@ jobs:
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
- bash: make test
displayName: Tests (*nix)
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')), not(variables['ANDROID']))
condition: and(succeeded(), eq(variables['Agent.OSArchitecture'], 'X64'), not(eq(variables['Agent.OS'], 'Windows_NT')), not(variables['ANDROID']))
- bash: make spectests-singlepass
displayName: Tests (Linux ARM)
condition: and(succeeded(), eq(variables['Agent.OSArchitecture'], 'ARM64'), not(variables['ANDROID']))
- bash: make test-android
displayName: Tests (Android)
condition: and(succeeded(), variables['ANDROID'])
@ -113,17 +124,24 @@ jobs:
strategy:
matrix:
linux:
poolName: "Azure Pipelines"
imageName: "ubuntu-16.04"
rust_toolchain: nightly-2019-12-19
mac:
poolName: "Azure Pipelines"
imageName: "macos-10.14"
rust_toolchain: nightly-2019-12-19
MACOSX_DEPLOYMENT_TARGET: 10.10
arm:
poolName: "Packet"
rust_toolchain: nightly-2019-12-19
windows:
poolName: "Azure Pipelines"
imageName: "vs2017-win2016"
rust_toolchain: '1.41.1'
# RUSTFLAGS: -Ctarget-feature=+crt-static
pool:
name: $(poolName)
vmImage: $(imageName)
condition: |
or(
@ -141,11 +159,14 @@ jobs:
mkdir -p artifacts
displayName: Create Artifacts Dir
- bash: make release
displayName: Build (*nix)
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')))
displayName: Build (*nix X64)
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')), eq(variables['Agent.OSArchitecture'], 'X64'))
- bash: sudo apt-get install musl-tools && make release-musl
displayName: Build (Linux, x86_64-unknown-linux-musl)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'), eq(variables['Agent.OSArchitecture'], 'X64'))
- bash: make release-singlepass
displayName: Build (ARM)
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')), eq(variables['Agent.OSArchitecture'], 'ARM64'))
- bash: make release-llvm
displayName: Build (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
@ -176,7 +197,7 @@ jobs:
eq(variables['Agent.OS'], 'Windows_NT')
)
- publish: $(System.DefaultWorkingDirectory)/artifacts
artifact: cli-$(Agent.OS)
artifact: cli-$(Agent.OS)-$(Agent.OSArchitecture)
- job: Build_Library
strategy:
@ -211,7 +232,7 @@ jobs:
- bash: |
make test-capi
displayName: Test c-api
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')))
condition: and(succeeded(), eq(variables['Agent.OSArchitecture'], 'X64'), not(eq(variables['Agent.OS'], 'Windows_NT')))
- bash: |
make capi
displayName: Build c-api
@ -234,7 +255,7 @@ jobs:
eq(variables['Agent.OS'], 'Windows_NT')
)
- publish: $(System.DefaultWorkingDirectory)/artifacts
artifact: library-$(Agent.OS)
artifact: library-$(Agent.OS)-$(Agent.OSArchitecture)
- job: Build_Docs
pool:
@ -277,9 +298,8 @@ jobs:
- script: VERSION_TAG=`git describe --tags` && echo "##vso[task.setvariable variable=VERSION_TAG]$VERSION_TAG"
displayName: Set the tag name as an environment variable
- task: GithubRelease@0
displayName: "Create GitHub Release"
displayName: "Create GitHub Release with artifacts"
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
continueOnError: true
inputs:
gitHubConnection: 'wasmer'
repositoryName: 'wasmerio/wasmer'
@ -291,21 +311,6 @@ jobs:
# TODO: automate it all by getting the release notes from somewhere else and using the `releaseNotesFile` key
isDraft: false
isPreRelease: false
- task: GithubRelease@0
displayName: "Update GitHub Release with assets"
condition: and(succeededOrFailed(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
inputs:
gitHubConnection: 'wasmer'
repositoryName: 'wasmerio/wasmer'
action: 'edit'
target: '$(Build.SourceVersion)'
title: '$(VERSION_TAG)'
tag: $(VERSION_TAG)
addChangeLog: false
tagSource: 'auto'
# TODO: automate it all by getting the release notes from somewhere else and using the `releaseNotesFile` key
isDraft: false
isPreRelease: false
assets: '$(Build.ArtifactStagingDirectory)/**'
assetUploadMode: 'replace' # Don't delete previously uploaded assets (default)

View File

@ -1,6 +1,5 @@
status = [
"wasmerio.wasmer",
"continuous-integration/travis-ci/push"
"wasmerio.wasmer"
]
required_approvals = 1
timeout_sec = 7200