diff --git a/.azure/install-cmake.yml b/.azure/install-cmake.yml new file mode 100644 index 000000000..707905b55 --- /dev/null +++ b/.azure/install-cmake.yml @@ -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 diff --git a/.azure/install-llvm.yml b/.azure/install-llvm.yml new file mode 100644 index 000000000..7d822e08b --- /dev/null +++ b/.azure/install-llvm.yml @@ -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 diff --git a/.azure/install-rust.yml b/.azure/install-rust.yml index 8bf2244bb..ac3fb3055 100644 --- a/.azure/install-rust.yml +++ b/.azure/install-rust.yml @@ -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 @@ -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 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3a2a94244..3642f0d86 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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