Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Azure pipelines to handle ARM #1345

Merged
merged 8 commits into from
Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .azure/install-llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions .azure/install-sccache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
75 changes: 0 additions & 75 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
53 changes: 29 additions & 24 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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'])
Expand Down Expand Up @@ -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(
Expand All @@ -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'))
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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'
Expand All @@ -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)

Expand Down
3 changes: 1 addition & 2 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
status = [
"wasmerio.wasmer",
"continuous-integration/travis-ci/push"
"wasmerio.wasmer"
]
required_approvals = 1
timeout_sec = 7200
Expand Down