Merge branch 'master' of https://github.com/nikita-bykov/virtual-environments into swift-support

This commit is contained in:
Nikita Bykov
2020-03-26 10:56:50 +03:00
16 changed files with 119 additions and 122 deletions

View File

@@ -12,13 +12,11 @@ function InstallClang {
version=$1
echo "Installing clang-$version..."
# Clang 6.0 is not supported by automatic installation script (`llvm.sh`)
# Thus we have to install it explicitly
if [[ $version == 6* ]]; then
apt-get install -y "clang-$version" "lldb-$version" "lld-$version"
else
if [[ $version =~ 9 ]]; then
./llvm.sh $version
apt-get install -y "clang-format-$version"
else
apt-get install -y "clang-$version" "lldb-$version" "lld-$version" "clang-format-$version"
fi
# Run tests to determine that the software installed as expected
@@ -35,11 +33,6 @@ function InstallClang {
DocumentInstalledItem "Clang $version ($(clang-$version --version | head -n 1 | cut -d ' ' -f 3 | cut -d '-' -f 1))"
}
# Install Clang compiler
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
apt-add-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-6.0 main"
apt-get update -y
# Download script for automatic installation
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh

View File

@@ -12,16 +12,14 @@ set -e
export RUSTUP_HOME=/usr/share/rust/.rustup
export CARGO_HOME=/usr/share/rust/.cargo
curl https://sh.rustup.rs -sSf | sh -s -- -y
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=stable --profile=minimal
# Initialize environment variables
source $CARGO_HOME/env
# Install common tools
rustup component add rustfmt
rustup component add clippy
cargo install bindgen
cargo install cbindgen
rustup component add rustfmt clippy
cargo install bindgen cbindgen
echo "Test installation of the Rust toochain"