wasmer/.azure/install-llvm.yml

71 lines
2.8 KiB
YAML
Raw Permalink Normal View History

2019-08-10 22:32:09 +00:00
# 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
2019-08-10 22:48:56 +00:00
export LLVM_PATH="`pwd`/clang+llvm-8.0.0-x86_64-apple-darwin/"
echo "##vso[task.prependpath]$LLVM_PATH/bin"
echo "##vso[task.setvariable variable=LLVM_SYS_80_PREFIX]$LLVM_PATH"
2019-08-10 22:32:09 +00:00
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
2019-08-10 22:48:56 +00:00
export LLVM_PATH="`pwd`/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/"
echo "##vso[task.prependpath]$LLVM_PATH/bin"
echo "##vso[task.setvariable variable=LLVM_SYS_80_PREFIX]$LLVM_PATH"
2019-08-10 22:32:09 +00:00
fi
2020-03-30 21:18:36 +00:00
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'))
2019-08-10 22:32:09 +00:00
2019-09-01 18:15:35 +00:00
- bash: |
set -ex
mkdir Win64_Release
cd Win64_Release
curl -OL https://github.com/wasmerio/llvm-build/releases/download/8.x/Win64_Release.zip
7z x Win64_Release.zip
llvm=`pwd`
2019-09-01 18:15:35 +00:00
echo "##vso[task.prependpath]$llvm/bin"
echo "##vso[task.setvariable variable=LLVM_SYS_80_PREFIX;]$llvm"
cd ..
2019-09-01 18:15:35 +00:00
displayName: "Install LLVM (Windows)"
condition: eq(variables['Agent.OS'], 'Windows_NT')
2019-09-01 17:51:16 +00:00
2019-09-01 18:15:35 +00:00
# Just to make sure the paths and vars are set properly
2019-09-01 17:51:16 +00:00
- powershell: |
Write-Host "##vso[task.prependpath]$pwd/Win64_Release/bin"
Write-Host "##vso[task.setvariable variable=LLVM_SYS_80_PREFIX;]$pwd/Win64_Release/"
2019-09-01 17:51:16 +00:00
displayName: Install LLVM (Windows)
2019-08-10 22:32:09 +00:00
condition: eq(variables['Agent.OS'], 'Windows_NT')
- bash: |
set -ex
2019-08-25 08:03:54 +00:00
env
2019-08-10 22:32:09 +00:00
llvm-config --version
displayName: LLVM version