Skip to content

Commit

Permalink
Improved Azure install requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Aug 10, 2019
1 parent 0ae6629 commit a82907e
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 3 deletions.
43 changes: 43 additions & 0 deletions .azure/install-cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This template installs CMake (if doesn't exist in the systems)

steps:
- bash: |
set -ex
if [ -x "`command -v cmake`" ]; then
echo `command -v cmake` `cmake --version` installed
else
curl -O https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz
tar xf cmake-3.4.1-Darwin-x86_64.tar.gz
export CMAKE_BIN_PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin"
echo "##vso[task.prependpath]$CMAKE_BIN_PATH"
fi
displayName: "Install CMake (macOS)"
condition: eq(variables['Agent.OS'], 'Darwin')
- bash: |
set -ex
if [ -x "`command -v cmake`" ]; then
echo `command -v cmake` `cmake --version` installed
else
curl -O https://cmake.org/files/v3.4/cmake-3.4.1-Linux-x86_64.tar.gz
tar xf cmake-3.4.1-Linux-x86_64.tar.gz
export CMAKE_BIN_PATH="`pwd`/cmake-3.4.1-Linux-x86_64/CMake.app/Contents/bin"
echo "##vso[task.prependpath]$CMAKE_BIN_PATH"
fi
displayName: "Install CMake (Linux)"
condition: eq(variables['Agent.OS'], 'Linux')
- bash: |
set -ex
if [ -x "`command -v cmake`" ]; then
echo `command -v cmake` `cmake --version` installed
else
chocolatey install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
fi
displayName: "Install CMake (Windows)"
condition: eq(variables['Agent.OS'], 'Windows_NT')
- bash: |
set -ex
cmake --version
displayName: CMake version
47 changes: 47 additions & 0 deletions .azure/install-llvm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This template installs LLVM (if doesn't exist in the systems)

steps:
- 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-x86_64-apple-darwin.tar.xz
tar xf clang+llvm-8.0.0-x86_64-apple-darwin.tar.xz
export LLVM_SYS_80_PREFIX="`pwd`/clang+llvm-8.0.0-x86_64-apple-darwin/"
echo "##vso[task.prependpath]$LLVM_SYS_80_PREFIX/bin"
fi
displayName: "Install LLVM (macOS)"
condition: eq(variables['Agent.OS'], 'Darwin')
- 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-x86_64-linux-gnu-ubuntu-16.04.tar.xz
tar xf clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
export LLVM_SYS_80_PREFIX="`pwd`/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/"
echo "##vso[task.prependpath]$LLVM_SYS_80_PREFIX/bin"
fi
displayName: "Install LLVM (Linux)"
condition: eq(variables['Agent.OS'], 'Linux')
- bash: |
set -ex
if [ -x "`command -v llvm-config`" ]; then
echo `command -v cmake` `llvm-config --version` installed
else
curl -O https://github.com/wasmerio/windows-llvm-build/releases/download/v8.0.0/llvm-8.0.0-install.zip
unzip llvm-8.0.0-install.zip
export LLVM_SYS_80_PREFIX="`pwd`/llvm-8.0.0-install/"
echo "##vso[task.prependpath]$LLVM_SYS_80_PREFIX/bin"
# chocolatey install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
fi
displayName: "Install LLVM (Windows)"
condition: eq(variables['Agent.OS'], 'Windows_NT')
- bash: |
set -ex
llvm-config --version
displayName: LLVM version
5 changes: 2 additions & 3 deletions .azure/install-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
# Wasm-bindgen template: https://github.com/rustwasm/wasm-bindgen/blob/master/ci/azure-install-rust.yml

steps:
# Install Rust in Linux, Macos
- script: |
- bash: |
set -ex
if [ -x "`command -v rustup`" ]; then
echo `command -v rustup` `rustup -V` installed
Expand All @@ -18,7 +17,7 @@ steps:
displayName: "Install Rust (Linux, macOS)"
condition: not(eq(variables['Agent.OS'], 'Windows_NT'))
- script: |
- bash: |
set -ex
if [ -x "`command -v rustup`" ]; then
echo `command -v rustup` `rustup -V` installed
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
- checkout: self
submodules: true
- template: .azure/install-rust.yml
- template: .azure/install-cmake.yml
- template: .azure/install-llvm.yml
- bash: make check
displayName: Check with Flags
- bash: make test
Expand Down

0 comments on commit a82907e

Please sign in to comment.