-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor cmake installation into own component
- Loading branch information
1 parent
0d747cc
commit 31f92c5
Showing
10 changed files
with
80 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
install_binary_artifact_cmake() { | ||
source "${DIR}/common-functions" | ||
|
||
# Check if the Ubuntu version is an LTS version - otherwise no cmake version available | ||
if grep -q LTS /etc/os-release; then | ||
if ! grep -qr "apt.kitware.com" /etc/apt; then | ||
with_sudo apt update -y | ||
# Add Kitware's certificate for CMake | ||
dependencies=( | ||
apt-transport-https | ||
ca-certificates | ||
gnupg | ||
lsb-release | ||
software-properties-common | ||
wget | ||
) | ||
|
||
with_sudo apt -y --no-install-recommends install "${dependencies[@]}" | ||
wget -O - "https://apt.kitware.com/keys/kitware-archive-latest.asc" 2> /dev/null \ | ||
| gpg --dearmor - | with_sudo tee /etc/apt/trusted.gpg.d/kitware.gpg > /dev/null | ||
|
||
# Add CMake repository | ||
codename="$(lsb_release --codename --short)" | ||
with_sudo apt-add-repository -y "deb https://apt.kitware.com/ubuntu/ ${codename} main" | ||
fi | ||
fi | ||
|
||
with_sudo apt update -y | ||
|
||
dependencies=( | ||
cmake | ||
) | ||
with_sudo apt -y --no-install-recommends install "${dependencies[@]}" | ||
} | ||
|
||
get_build_artifacts_cmake() { | ||
return 0 | ||
} | ||
|
||
# Check if the binary artifact is installed | ||
is_installed_cmake() { | ||
if which cmake ; then | ||
return 0 | ||
fi | ||
|
||
return 1 | ||
} | ||
|
||
setup_artifact_variables_cmake() { | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Package script for LLVM builds OSX | ||
install_binary_artifact_cmake () { | ||
# Use the brew provided package | ||
LLVM_VERSION_MAJOR="${LLVM_VERSION/.*/}" | ||
brew install "cmake" | ||
} | ||
|
||
# Check if the binary artifact is installed | ||
is_installed_cmake() { | ||
if which cmake ; then | ||
return 0 | ||
fi | ||
|
||
return 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
artifact_dependency_cmake=("") | ||
|
||
required_variables_cmake=("") | ||
|
||
get_docker_config_id_cmake() { | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ required_variables_check_libcxx() { | |
|
||
artifact_dependency_libcxx(){ | ||
echo "clang" | ||
echo "cmake" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters