forked from wasmerio/wasmer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-cmake.yml
43 lines (39 loc) · 1.45 KB
/
install-cmake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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